added github pages support

This commit is contained in:
didier amyot committed 2018-01-27 11:27:33 -05:00
1 parent b14ebdbf63
commit 6ed638a1cc
373 files changed
+185436 -2343

No files matched your search

+6505
View File
File diff suppressed because it is too large. Load diff
+405
View File
@@ -0,0 +1,405 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:figma="http://www.figma.com/figma/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="39.689999mm"
height="13.23mm"
viewBox="0 0 39.689999 13.23"
version="1.1"
id="svg8"
inkscape:version="0.92.2 (30a58d1, 2017-08-07)"
sodipodi:docname="logo.svg">
<defs
id="defs2">
<path
d="m 1.74498,5.47533 c 0,1.55802 -0.12464,2.06549 -0.44515,2.43941 C 0.943119,8.23595 0.480024,8.41358 0,8.41331 L 0.124642,9.3036 C 0.86884,9.31366 1.59095,9.05078 2.15452,8.56466 2.45775,8.19487 2.6834,7.76781 2.818,7.30893 2.95261,6.85005 2.99341,6.36876 2.93798,5.89377 V 0 h -1.193 v 5.43972 z"
id="path0_fill"
inkscape:connector-curvature="0" />
<path
d="m 5.50204,4.76309 c 0,0.66772 0,1.26422 0.05341,1.78059 H 4.496 L 4.42478,5.48423 C 4.20318,5.85909 3.88627,6.16858 3.50628,6.38125 3.12628,6.59392 2.69675,6.70219 2.26135,6.69503 1.22861,6.69503 0,6.13415 0,3.84608 V 0.0445149 H 1.193 V 3.6057 c 0,1.23752 0.38283,2.06549 1.46009,2.06549 C 2.87472,5.67358 3.09459,5.63168 3.29982,5.54796 3.50505,5.46424 3.69149,5.34039 3.84822,5.18366 4.00494,5.02694 4.1288,4.84049 4.21252,4.63527 4.29623,4.43004 4.33813,4.21016 4.33575,3.98853 V 0 h 1.19299 v 4.72748 z"
id="path1_fill"
inkscape:connector-curvature="0" />
<path
d="m 0.0534178,2.27264 c 0,-0.82798 0,-1.504604 -0.0534178,-2.118909 H 1.06836 L 1.12177,1.2666 C 1.3598,0.864535 1.70247,0.534594 2.11325,0.311954 2.52404,0.0893145 2.98754,-0.0176786 3.45435,0.00238095 c 1.58473,0 2.77773,1.32653905 2.77773,3.30299905 0,2.33258 -1.43338,3.48997 -2.9825,3.48997 C 2.85309,6.81304 2.45874,6.7281 2.10469,6.54874 1.75064,6.36937 1.44888,6.10166 1.22861,5.77151 v 0 3.56118 H 0.0534178 V 2.29935 Z M 1.22861,4.00872 c 0.00323,0.16154 0.02111,0.32245 0.05342,0.48076 0.10101,0.39531 0.33096,0.74565 0.65345,0.99558 0.3225,0.24994 0.71913,0.3852 1.12714,0.38438 1.25532,0 1.99427,-1.02384 1.99427,-2.51064 0,-1.29983 -0.69443,-2.412704 -1.94975,-2.412704 C 2.61036,0.986777 2.14548,1.20726 1.79965,1.5662 1.45382,1.92514 1.25079,2.3979 1.22861,2.89585 Z"
id="path2_fill"
inkscape:connector-curvature="0" />
<path
d="M 1.31764,0.0178059 2.75102,3.85499 C 2.90237,4.28233 3.06262,4.7987 3.16946,5.18153 3.2941,4.7898 3.42764,4.29123 3.5879,3.82828 L 4.88773,0.0178059 H 6.14305 L 4.36246,4.64735 C 3.47216,6.87309 2.92908,8.02158 2.11,8.71601 1.69745,9.09283 1.19448,9.35658 0.649917,9.48166 L 0.356119,8.48453 C 0.736886,8.35942 1.09038,8.16304 1.39777,7.90584 1.8321,7.55188 2.17678,7.10044 2.4038,6.5882 2.45239,6.49949 2.48551,6.40314 2.50173,6.3033 2.49161,6.19586 2.46457,6.0907 2.42161,5.9917 L 0,0 h 1.29983 z"
id="path3_fill"
inkscape:connector-curvature="0" />
<path
d="M 2.19013,0 V 1.86962 H 3.8995 v 0.8903 H 2.19013 v 3.50777 c 0,0.80127 0.23148,1.26422 0.8903,1.26422 C 3.31442,7.53574 3.54789,7.5088 3.77486,7.45179 L 3.82828,8.34208 C 3.48794,8.45999 3.12881,8.51431 2.76882,8.50234 2.53042,8.51726 2.29161,8.48043 2.06878,8.39437 1.84595,8.30831 1.64438,8.17506 1.47789,8.00377 1.11525,7.51873 0.949826,6.91431 1.01494,6.31221 V 2.75102 H 0 V 1.86072 H 1.03274 V 0.275992 Z"
id="path4_fill"
inkscape:connector-curvature="0" />
<path
d="M 1.17716,3.57899 C 1.153,3.88093 1.19468,4.18451 1.29933,4.46876 1.40398,4.75301 1.5691,5.01114 1.78329,5.22532 1.99747,5.43951 2.2556,5.60463 2.53985,5.70928 2.8241,5.81393 3.12768,5.85561 3.42962,5.83145 4.04033,5.84511 4.64706,5.72983 5.21021,5.49313 l 0.20477,0.8903 C 4.72393,6.66809 3.98085,6.80458 3.23375,6.78406 2.79821,6.81388 2.36138,6.74914 1.95322,6.59427 1.54505,6.43941 1.17522,6.19809 0.869071,5.88688 0.562928,5.57566 0.327723,5.2019 0.179591,4.79125 0.0314584,4.38059 -0.0260962,3.94276 0.0108748,3.50777 0.0108748,1.54912 1.17716,0 3.0824,0 c 2.13671,0 2.67089,1.86962 2.67089,3.06262 0.01142,0.18382 0.01142,0.36817 0,0.55199 H 1.15046 Z M 4.66713,2.6887 C 4.70149,2.45067 4.68443,2.20805 4.61709,1.97718 4.54976,1.74631 4.43372,1.53255 4.2768,1.35031 4.11987,1.16808 3.92571,1.0216 3.70739,0.920744 3.48907,0.81989 3.25166,0.767006 3.01118,0.765656 2.52201,0.801064 2.06371,1.01788 1.72609,1.37362 1.38847,1.72935 1.19588,2.19835 1.18607,2.6887 Z"
id="path5_fill"
inkscape:connector-curvature="0" />
<path
d="m 0.0534178,2.19228 c 0,-0.76565 0,-1.424474 -0.0534178,-2.029876 H 1.06836 V 1.43553 H 1.12177 C 1.23391,1.04259 1.4656,0.694314 1.78468,0.439049 2.10376,0.183783 2.4944,0.034196 2.90237,0.0110538 c 0.11229,-0.01473839 0.22602,-0.01473839 0.33831,0 V 1.12393 C 3.10462,1.10817 2.9672,1.10817 2.83114,1.12393 2.427,1.13958 2.04237,1.30182 1.7491,1.58035 1.45583,1.85887 1.27398,2.23462 1.23751,2.63743 1.20422,2.8196 1.18635,3.00425 1.1841,3.18941 V 6.65267 H 0.00890297 V 2.20118 Z"
id="path6_fill"
inkscape:connector-curvature="0" />
<path
d="M 6.03059,2.83565 C 6.06715,3.43376 5.92485,4.02921 5.6218,4.54615 5.31875,5.0631 4.86869,5.47813 4.32893,5.73839 3.78917,5.99864 3.18416,6.09233 2.59097,6.00753 1.99778,5.92272 1.44326,5.66326 0.998048,5.26219 0.552837,4.86113 0.23709,4.33661 0.0910307,3.75546 -0.0550287,3.17431 -0.0247891,2.56283 0.177897,1.99893 0.380583,1.43503 0.746541,0.944221 1.22915,0.589037 1.71176,0.233853 2.28918,0.0303686 2.88784,0.00450543 3.28035,-0.0170932 3.67326,0.0391144 4.04396,0.169896 4.41467,0.300677 4.75587,0.503453 5.04794,0.766561 5.34,1.02967 5.57718,1.34792 5.74582,1.70301 5.91446,2.0581 6.01124,2.44303 6.03059,2.83565 Z"
id="path7_fill"
inkscape:connector-curvature="0" />
<path
d="M 18.6962,7.12238 C 10.6836,7.12238 3.64131,4.24672 0,0 1.41284,3.82041 3.96215,7.1163 7.30479,9.44404 10.6474,11.7718 14.623,13.0196 18.6962,13.0196 c 4.0733,0 8.0488,-1.2478 11.3915,-3.57556 C 33.4303,7.1163 35.9796,3.82041 37.3925,0 33.7601,4.24672 26.7445,7.12238 18.6962,7.12238 Z"
id="path8_fill"
inkscape:connector-curvature="0" />
<path
d="m 18.6962,5.89725 c 8.0127,0 15.055,2.87566 18.6963,7.12235 C 35.9796,9.19922 33.4303,5.90333 30.0877,3.57559 26.745,1.24785 22.7695,0 18.6962,0 14.623,0 10.6474,1.24785 7.30479,3.57559 3.96215,5.90333 1.41284,9.19922 0,13.0196 3.64131,8.76401 10.648,5.89725 18.6962,5.89725 Z"
id="path9_fill"
inkscape:connector-curvature="0" />
<path
d="M 7.59576,3.56656 C 7.64276,4.31992 7.46442,5.07022 7.08347,5.72186 6.70251,6.3735 6.13619,6.89698 5.45666,7.22561 4.77713,7.55424 4.01515,7.67314 3.26781,7.56716 2.52046,7.46117 1.82158,7.13511 1.26021,6.63051 0.698839,6.12591 0.300394,5.46561 0.115637,4.73375 -0.0691191,4.00188 -0.0318219,3.23159 0.222777,2.52099 0.477376,1.8104 0.93775,1.19169 1.54524,0.743685 2.15274,0.295678 2.87985,0.0386595 3.63394,0.00537589 4.12793,-0.0210471 4.62229,0.0501173 5.08878,0.214803 5.55526,0.37949 5.98473,0.63447 6.35264,0.965179 6.72055,1.29589 7.01971,1.69584 7.233,2.1422 7.4463,2.58855 7.56957,3.07256 7.59576,3.56656 Z"
id="path10_fill"
inkscape:connector-curvature="0" />
<path
d="M 2.25061,4.37943 C 1.81886,4.39135 1.39322,4.27535 1.02722,4.04602 0.661224,3.81668 0.371206,3.48424 0.193641,3.09052 0.0160762,2.69679 -0.0411078,2.25935 0.0292804,1.83321 0.0996686,1.40707 0.294486,1.01125 0.589233,0.695542 0.883981,0.37983 1.2655,0.158316 1.68581,0.0588577 2.10611,-0.0406005 2.54644,-0.0135622 2.95143,0.136572 3.35641,0.286707 3.70796,0.553234 3.96186,0.902636 4.21577,1.25204 4.3607,1.66872 4.37842,2.10027 4.39529,2.6838 4.18131,3.25044 3.78293,3.67715 3.38455,4.10387 2.83392,4.35623 2.25061,4.37943 Z"
id="path11_fill"
inkscape:connector-curvature="0" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.7550433"
inkscape:cx="158.88524"
inkscape:cy="-16.849336"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1916"
inkscape:window-height="1035"
inkscape:window-x="0"
inkscape:window-y="20"
inkscape:window-maximized="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-283.77)">
<g
id="g168"
transform="matrix(0.05167969,0,0,0.05167868,26.459998,283.77)">
<path
style="fill:#ffffff"
id="path8"
d="M 127.999,0 C 57.423,0 0,57.423 0,128.001 0,198.585 57.423,256.005 127.999,256.005 198.577,256.005 256,198.585 256,128.001 256,57.423 198.577,0 127.999,0"
inkscape:connector-curvature="0" />
<path
style="fill:#91dc47"
id="path10"
d="m 123.318,130.303 c -1.15,2.492 -2.419,5.292 -3.733,8.272 -4.645,10.524 -9.789,23.33 -11.668,31.534 -0.675,2.922 -1.093,6.543 -1.085,10.558 0,1.588 0.085,3.257 0.22,4.957 6.567,2.413 13.66,3.74 21.067,3.753 6.743,-0.013 13.221,-1.127 19.284,-3.143 -1.425,-1.303 -2.785,-2.692 -4.023,-4.257 -8.22,-10.482 -12.806,-25.844 -20.062,-51.674"
inkscape:connector-curvature="0" />
<path
style="fill:#91dc47"
id="path12"
d="m 92.97,78.225 c -15.699,11.064 -25.972,29.312 -26.011,49.992 0.039,20.371 10.003,38.383 25.307,49.493 3.754,-15.637 13.164,-29.955 27.275,-58.655 -0.838,-2.302 -1.793,-4.822 -2.862,-7.469 -3.909,-9.806 -9.551,-21.194 -14.586,-26.351 -2.567,-2.694 -5.682,-5.022 -9.123,-7.01"
inkscape:connector-curvature="0" />
<path
style="fill:#63b132"
id="path14"
d="m 181.394,198.367 c -8.1,-1.015 -14.785,-2.24 -20.633,-4.303 -9.836,4.884 -20.913,7.643 -32.642,7.643 -40.584,0 -73.483,-32.894 -73.488,-73.49 0,-22.027 9.704,-41.773 25.056,-55.24 -4.106,-0.992 -8.388,-1.571 -12.762,-1.563 -21.562,0.203 -44.323,12.136 -53.799,44.363 -0.886,4.691 -0.675,8.238 -0.675,12.442 0,63.885 51.791,115.676 115.671,115.676 39.122,0 73.682,-19.439 94.611,-49.169 -11.32,2.821 -22.206,4.17 -31.528,4.199 -3.494,0 -6.774,-0.187 -9.811,-0.558"
inkscape:connector-curvature="0" />
<path
style="fill:#90b4fe"
id="path16"
d="m 159.658,175.953 c 0.714,0.354 2.333,0.932 4.586,1.571 15.157,-11.127 25.007,-29.05 25.046,-49.307 h -0.006 c -0.057,-33.771 -27.386,-61.096 -61.165,-61.163 -6.714,0.013 -13.164,1.121 -19.203,3.122 12.419,14.156 18.391,34.386 24.168,56.515 0.003,0.01 0.008,0.018 0.01,0.026 0.011,0.018 1.848,6.145 5.002,14.274 3.132,8.118 7.594,18.168 12.46,25.492 3.195,4.908 6.709,8.435 9.102,9.47"
inkscape:connector-curvature="0" />
<path
style="fill:#5881d8"
id="path18"
d="m 128.122,12.541 c -38.744,0 -73.016,19.073 -94.008,48.318 10.925,-6.842 22.08,-9.31 31.815,-9.222 13.446,0.039 24.017,4.208 29.089,7.06 1.225,0.706 2.388,1.466 3.527,2.247 9.05,-3.986 19.05,-6.215 29.574,-6.215 40.589,0.005 73.493,32.899 73.499,73.488 h -0.006 c 0,20.464 -8.37,38.967 -21.863,52.291 3.312,0.371 6.844,0.602 10.451,0.584 12.811,0.006 26.658,-2.821 37.039,-11.552 6.769,-5.702 12.44,-14.051 15.585,-26.569 0.615,-4.835 0.969,-9.75 0.969,-14.752 0,-63.882 -51.786,-115.678 -115.671,-115.678"
inkscape:connector-curvature="0" />
</g>
<g
figma:type="canvas"
transform="matrix(0.26458333,0,0,0.26458333,-434.05954,-365.43569)"
id="Canvas">
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g239">
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g237">
<g
figma:type="group"
style="mix-blend-mode:normal"
id="Group">
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g">
<g
figma:type="group"
style="mix-blend-mode:normal"
id="path">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path9 fill">
<use
id="use174"
style="mix-blend-mode:normal;fill:#4e4e4e"
transform="translate(1640.54,2474.36)"
xlink:href="#path0_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g181">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path10 fill">
<use
id="use178"
style="mix-blend-mode:normal;fill:#4e4e4e"
transform="translate(1645.68,2474.37)"
xlink:href="#path1_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g186">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path11 fill">
<use
id="use183"
style="mix-blend-mode:normal;fill:#4e4e4e"
transform="translate(1653.39,2474.26)"
xlink:href="#path2_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g191">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path12 fill">
<use
id="use188"
style="mix-blend-mode:normal;fill:#4e4e4e"
transform="translate(1660.43,2474.39)"
xlink:href="#path3_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g196">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path13 fill">
<use
id="use193"
style="mix-blend-mode:normal;fill:#4e4e4e"
transform="translate(1667.55,2472.54)"
xlink:href="#path4_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g201">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path14 fill">
<use
id="use198"
style="mix-blend-mode:normal;fill:#4e4e4e"
transform="translate(1672.47,2474.29)"
xlink:href="#path5_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g206">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path15 fill">
<use
id="use203"
style="mix-blend-mode:normal;fill:#4e4e4e"
transform="translate(1679.98,2474.24)"
xlink:href="#path6_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g235">
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g213">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path16 fill">
<use
id="use210"
style="mix-blend-mode:normal;fill:#767677"
transform="translate(1673.48,2453.69)"
xlink:href="#path7_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g218">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path17 fill">
<use
id="use215"
style="mix-blend-mode:normal;fill:#f37726"
transform="translate(1643.21,2484.27)"
xlink:href="#path8_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g223">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path18 fill">
<use
id="use220"
style="mix-blend-mode:normal;fill:#f37726"
transform="translate(1643.21,2457.88)"
xlink:href="#path9_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g228">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path19 fill">
<use
id="use225"
style="mix-blend-mode:normal;fill:#9e9e9e"
transform="translate(1643.28,2496.09)"
xlink:href="#path10_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
<g
figma:type="group"
style="mix-blend-mode:normal"
id="g233">
<g
figma:type="vector"
style="mix-blend-mode:normal"
id="path20 fill">
<use
id="use230"
style="mix-blend-mode:normal;fill:#616262"
transform="translate(1641.87,2458.43)"
xlink:href="#path11_fill"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</g>
</g>
</g>
</g>
</g>
<path
id="path4064"
d="m 23.933069,291.08216 v -1.39433 c 0,-0.24272 -0.195278,-0.438 -0.438007,-0.438 h -2.514893 v -2.5149 c 0,-0.24273 -0.195279,-0.438 -0.438008,-0.438 h -1.394324 c -0.242729,0 -0.438008,0.19527 -0.438008,0.438 v 2.5149 h -2.514893 c -0.242729,0 -0.438007,0.19528 -0.438007,0.438 v 1.39433 c 0,0.24273 0.195278,0.43801 0.438007,0.43801 h 2.514893 v 2.51489 c 0,0.24273 0.195279,0.43801 0.438008,0.43801 h 1.394324 c 0.242729,0 0.438008,-0.19528 0.438008,-0.43801 v -2.51489 h 2.514893 c 0.242729,0 0.438007,-0.19528 0.438007,-0.43801 z"
inkscape:connector-curvature="0"
style="fill:currentColor;stroke-width:0.01825031" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 21 KiB

+360
View File
@@ -0,0 +1,360 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:figma="http://www.figma.com/figma/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
id="svg8"
version="1.1"
viewBox="0 0 39.689999 13.23"
height="13.23mm"
width="39.689999mm">
<defs
id="defs2">
<path
id="path0_fill"
d="m 1.74498,5.47533 c 0,1.55802 -0.12464,2.06549 -0.44515,2.43941 C 0.943119,8.23595 0.480024,8.41358 0,8.41331 L 0.124642,9.3036 C 0.86884,9.31366 1.59095,9.05078 2.15452,8.56466 2.45775,8.19487 2.6834,7.76781 2.818,7.30893 2.95261,6.85005 2.99341,6.36876 2.93798,5.89377 V 0 h -1.193 v 5.43972 z" />
<path
id="path1_fill"
d="m 5.50204,4.76309 c 0,0.66772 0,1.26422 0.05341,1.78059 H 4.496 L 4.42478,5.48423 C 4.20318,5.85909 3.88627,6.16858 3.50628,6.38125 3.12628,6.59392 2.69675,6.70219 2.26135,6.69503 1.22861,6.69503 0,6.13415 0,3.84608 V 0.0445149 H 1.193 V 3.6057 c 0,1.23752 0.38283,2.06549 1.46009,2.06549 C 2.87472,5.67358 3.09459,5.63168 3.29982,5.54796 3.50505,5.46424 3.69149,5.34039 3.84822,5.18366 4.00494,5.02694 4.1288,4.84049 4.21252,4.63527 4.29623,4.43004 4.33813,4.21016 4.33575,3.98853 V 0 h 1.19299 v 4.72748 z" />
<path
id="path2_fill"
d="m 0.0534178,2.27264 c 0,-0.82798 0,-1.504604 -0.0534178,-2.118909 H 1.06836 L 1.12177,1.2666 C 1.3598,0.864535 1.70247,0.534594 2.11325,0.311954 2.52404,0.0893145 2.98754,-0.0176786 3.45435,0.00238095 c 1.58473,0 2.77773,1.32653905 2.77773,3.30299905 0,2.33258 -1.43338,3.48997 -2.9825,3.48997 C 2.85309,6.81304 2.45874,6.7281 2.10469,6.54874 1.75064,6.36937 1.44888,6.10166 1.22861,5.77151 v 0 3.56118 H 0.0534178 V 2.29935 Z M 1.22861,4.00872 c 0.00323,0.16154 0.02111,0.32245 0.05342,0.48076 0.10101,0.39531 0.33096,0.74565 0.65345,0.99558 0.3225,0.24994 0.71913,0.3852 1.12714,0.38438 1.25532,0 1.99427,-1.02384 1.99427,-2.51064 0,-1.29983 -0.69443,-2.412704 -1.94975,-2.412704 C 2.61036,0.986777 2.14548,1.20726 1.79965,1.5662 1.45382,1.92514 1.25079,2.3979 1.22861,2.89585 Z" />
<path
id="path3_fill"
d="M 1.31764,0.0178059 2.75102,3.85499 C 2.90237,4.28233 3.06262,4.7987 3.16946,5.18153 3.2941,4.7898 3.42764,4.29123 3.5879,3.82828 L 4.88773,0.0178059 H 6.14305 L 4.36246,4.64735 C 3.47216,6.87309 2.92908,8.02158 2.11,8.71601 1.69745,9.09283 1.19448,9.35658 0.649917,9.48166 L 0.356119,8.48453 C 0.736886,8.35942 1.09038,8.16304 1.39777,7.90584 1.8321,7.55188 2.17678,7.10044 2.4038,6.5882 2.45239,6.49949 2.48551,6.40314 2.50173,6.3033 2.49161,6.19586 2.46457,6.0907 2.42161,5.9917 L 0,0 h 1.29983 z" />
<path
id="path4_fill"
d="M 2.19013,0 V 1.86962 H 3.8995 v 0.8903 H 2.19013 v 3.50777 c 0,0.80127 0.23148,1.26422 0.8903,1.26422 C 3.31442,7.53574 3.54789,7.5088 3.77486,7.45179 L 3.82828,8.34208 C 3.48794,8.45999 3.12881,8.51431 2.76882,8.50234 2.53042,8.51726 2.29161,8.48043 2.06878,8.39437 1.84595,8.30831 1.64438,8.17506 1.47789,8.00377 1.11525,7.51873 0.949826,6.91431 1.01494,6.31221 V 2.75102 H 0 V 1.86072 H 1.03274 V 0.275992 Z" />
<path
id="path5_fill"
d="M 1.17716,3.57899 C 1.153,3.88093 1.19468,4.18451 1.29933,4.46876 1.40398,4.75301 1.5691,5.01114 1.78329,5.22532 1.99747,5.43951 2.2556,5.60463 2.53985,5.70928 2.8241,5.81393 3.12768,5.85561 3.42962,5.83145 4.04033,5.84511 4.64706,5.72983 5.21021,5.49313 l 0.20477,0.8903 C 4.72393,6.66809 3.98085,6.80458 3.23375,6.78406 2.79821,6.81388 2.36138,6.74914 1.95322,6.59427 1.54505,6.43941 1.17522,6.19809 0.869071,5.88688 0.562928,5.57566 0.327723,5.2019 0.179591,4.79125 0.0314584,4.38059 -0.0260962,3.94276 0.0108748,3.50777 0.0108748,1.54912 1.17716,0 3.0824,0 c 2.13671,0 2.67089,1.86962 2.67089,3.06262 0.01142,0.18382 0.01142,0.36817 0,0.55199 H 1.15046 Z M 4.66713,2.6887 C 4.70149,2.45067 4.68443,2.20805 4.61709,1.97718 4.54976,1.74631 4.43372,1.53255 4.2768,1.35031 4.11987,1.16808 3.92571,1.0216 3.70739,0.920744 3.48907,0.81989 3.25166,0.767006 3.01118,0.765656 2.52201,0.801064 2.06371,1.01788 1.72609,1.37362 1.38847,1.72935 1.19588,2.19835 1.18607,2.6887 Z" />
<path
id="path6_fill"
d="m 0.0534178,2.19228 c 0,-0.76565 0,-1.424474 -0.0534178,-2.029876 H 1.06836 V 1.43553 H 1.12177 C 1.23391,1.04259 1.4656,0.694314 1.78468,0.439049 2.10376,0.183783 2.4944,0.034196 2.90237,0.0110538 c 0.11229,-0.01473839 0.22602,-0.01473839 0.33831,0 V 1.12393 C 3.10462,1.10817 2.9672,1.10817 2.83114,1.12393 2.427,1.13958 2.04237,1.30182 1.7491,1.58035 1.45583,1.85887 1.27398,2.23462 1.23751,2.63743 1.20422,2.8196 1.18635,3.00425 1.1841,3.18941 V 6.65267 H 0.00890297 V 2.20118 Z" />
<path
id="path7_fill"
d="M 6.03059,2.83565 C 6.06715,3.43376 5.92485,4.02921 5.6218,4.54615 5.31875,5.0631 4.86869,5.47813 4.32893,5.73839 3.78917,5.99864 3.18416,6.09233 2.59097,6.00753 1.99778,5.92272 1.44326,5.66326 0.998048,5.26219 0.552837,4.86113 0.23709,4.33661 0.0910307,3.75546 -0.0550287,3.17431 -0.0247891,2.56283 0.177897,1.99893 0.380583,1.43503 0.746541,0.944221 1.22915,0.589037 1.71176,0.233853 2.28918,0.0303686 2.88784,0.00450543 3.28035,-0.0170932 3.67326,0.0391144 4.04396,0.169896 4.41467,0.300677 4.75587,0.503453 5.04794,0.766561 5.34,1.02967 5.57718,1.34792 5.74582,1.70301 5.91446,2.0581 6.01124,2.44303 6.03059,2.83565 Z" />
<path
id="path8_fill"
d="M 18.6962,7.12238 C 10.6836,7.12238 3.64131,4.24672 0,0 1.41284,3.82041 3.96215,7.1163 7.30479,9.44404 10.6474,11.7718 14.623,13.0196 18.6962,13.0196 c 4.0733,0 8.0488,-1.2478 11.3915,-3.57556 C 33.4303,7.1163 35.9796,3.82041 37.3925,0 33.7601,4.24672 26.7445,7.12238 18.6962,7.12238 Z" />
<path
id="path9_fill"
d="m 18.6962,5.89725 c 8.0127,0 15.055,2.87566 18.6963,7.12235 C 35.9796,9.19922 33.4303,5.90333 30.0877,3.57559 26.745,1.24785 22.7695,0 18.6962,0 14.623,0 10.6474,1.24785 7.30479,3.57559 3.96215,5.90333 1.41284,9.19922 0,13.0196 3.64131,8.76401 10.648,5.89725 18.6962,5.89725 Z" />
<path
id="path10_fill"
d="M 7.59576,3.56656 C 7.64276,4.31992 7.46442,5.07022 7.08347,5.72186 6.70251,6.3735 6.13619,6.89698 5.45666,7.22561 4.77713,7.55424 4.01515,7.67314 3.26781,7.56716 2.52046,7.46117 1.82158,7.13511 1.26021,6.63051 0.698839,6.12591 0.300394,5.46561 0.115637,4.73375 -0.0691191,4.00188 -0.0318219,3.23159 0.222777,2.52099 0.477376,1.8104 0.93775,1.19169 1.54524,0.743685 2.15274,0.295678 2.87985,0.0386595 3.63394,0.00537589 4.12793,-0.0210471 4.62229,0.0501173 5.08878,0.214803 5.55526,0.37949 5.98473,0.63447 6.35264,0.965179 6.72055,1.29589 7.01971,1.69584 7.233,2.1422 7.4463,2.58855 7.56957,3.07256 7.59576,3.56656 Z" />
<path
id="path11_fill"
d="M 2.25061,4.37943 C 1.81886,4.39135 1.39322,4.27535 1.02722,4.04602 0.661224,3.81668 0.371206,3.48424 0.193641,3.09052 0.0160762,2.69679 -0.0411078,2.25935 0.0292804,1.83321 0.0996686,1.40707 0.294486,1.01125 0.589233,0.695542 0.883981,0.37983 1.2655,0.158316 1.68581,0.0588577 2.10611,-0.0406005 2.54644,-0.0135622 2.95143,0.136572 3.35641,0.286707 3.70796,0.553234 3.96186,0.902636 4.21577,1.25204 4.3607,1.66872 4.37842,2.10027 4.39529,2.6838 4.18131,3.25044 3.78293,3.67715 3.38455,4.10387 2.83392,4.35623 2.25061,4.37943 Z" />
</defs>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-283.77)"
id="layer1">
<g
transform="matrix(0.05167969,0,0,0.05167868,26.459998,283.77)"
id="g168">
<path
d="M 127.999,0 C 57.423,0 0,57.423 0,128.001 0,198.585 57.423,256.005 127.999,256.005 198.577,256.005 256,198.585 256,128.001 256,57.423 198.577,0 127.999,0"
id="path8"
style="fill:#ffffff" />
<path
d="m 123.318,130.303 c -1.15,2.492 -2.419,5.292 -3.733,8.272 -4.645,10.524 -9.789,23.33 -11.668,31.534 -0.675,2.922 -1.093,6.543 -1.085,10.558 0,1.588 0.085,3.257 0.22,4.957 6.567,2.413 13.66,3.74 21.067,3.753 6.743,-0.013 13.221,-1.127 19.284,-3.143 -1.425,-1.303 -2.785,-2.692 -4.023,-4.257 -8.22,-10.482 -12.806,-25.844 -20.062,-51.674"
id="path10"
style="fill:#91dc47" />
<path
d="m 92.97,78.225 c -15.699,11.064 -25.972,29.312 -26.011,49.992 0.039,20.371 10.003,38.383 25.307,49.493 3.754,-15.637 13.164,-29.955 27.275,-58.655 -0.838,-2.302 -1.793,-4.822 -2.862,-7.469 -3.909,-9.806 -9.551,-21.194 -14.586,-26.351 -2.567,-2.694 -5.682,-5.022 -9.123,-7.01"
id="path12"
style="fill:#91dc47" />
<path
d="m 181.394,198.367 c -8.1,-1.015 -14.785,-2.24 -20.633,-4.303 -9.836,4.884 -20.913,7.643 -32.642,7.643 -40.584,0 -73.483,-32.894 -73.488,-73.49 0,-22.027 9.704,-41.773 25.056,-55.24 -4.106,-0.992 -8.388,-1.571 -12.762,-1.563 -21.562,0.203 -44.323,12.136 -53.799,44.363 -0.886,4.691 -0.675,8.238 -0.675,12.442 0,63.885 51.791,115.676 115.671,115.676 39.122,0 73.682,-19.439 94.611,-49.169 -11.32,2.821 -22.206,4.17 -31.528,4.199 -3.494,0 -6.774,-0.187 -9.811,-0.558"
id="path14"
style="fill:#63b132" />
<path
d="m 159.658,175.953 c 0.714,0.354 2.333,0.932 4.586,1.571 15.157,-11.127 25.007,-29.05 25.046,-49.307 h -0.006 c -0.057,-33.771 -27.386,-61.096 -61.165,-61.163 -6.714,0.013 -13.164,1.121 -19.203,3.122 12.419,14.156 18.391,34.386 24.168,56.515 0.003,0.01 0.008,0.018 0.01,0.026 0.011,0.018 1.848,6.145 5.002,14.274 3.132,8.118 7.594,18.168 12.46,25.492 3.195,4.908 6.709,8.435 9.102,9.47"
id="path16"
style="fill:#90b4fe" />
<path
d="m 128.122,12.541 c -38.744,0 -73.016,19.073 -94.008,48.318 10.925,-6.842 22.08,-9.31 31.815,-9.222 13.446,0.039 24.017,4.208 29.089,7.06 1.225,0.706 2.388,1.466 3.527,2.247 9.05,-3.986 19.05,-6.215 29.574,-6.215 40.589,0.005 73.493,32.899 73.499,73.488 h -0.006 c 0,20.464 -8.37,38.967 -21.863,52.291 3.312,0.371 6.844,0.602 10.451,0.584 12.811,0.006 26.658,-2.821 37.039,-11.552 6.769,-5.702 12.44,-14.051 15.585,-26.569 0.615,-4.835 0.969,-9.75 0.969,-14.752 0,-63.882 -51.786,-115.678 -115.671,-115.678"
id="path18"
style="fill:#5881d8" />
</g>
<g
id="Canvas"
transform="matrix(0.26458333,0,0,0.26458333,-434.05954,-365.43569)"
figma:type="canvas">
<g
id="g239"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="g237"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="Group"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="g"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path9 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path0_fill"
transform="translate(1640.54,2474.36)"
style="mix-blend-mode:normal;fill:#4e4e4e"
id="use174" />
</g>
</g>
<g
id="g181"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path10 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path1_fill"
transform="translate(1645.68,2474.37)"
style="mix-blend-mode:normal;fill:#4e4e4e"
id="use178" />
</g>
</g>
<g
id="g186"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path11 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path2_fill"
transform="translate(1653.39,2474.26)"
style="mix-blend-mode:normal;fill:#4e4e4e"
id="use183" />
</g>
</g>
<g
id="g191"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path12 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path3_fill"
transform="translate(1660.43,2474.39)"
style="mix-blend-mode:normal;fill:#4e4e4e"
id="use188" />
</g>
</g>
<g
id="g196"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path13 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path4_fill"
transform="translate(1667.55,2472.54)"
style="mix-blend-mode:normal;fill:#4e4e4e"
id="use193" />
</g>
</g>
<g
id="g201"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path14 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path5_fill"
transform="translate(1672.47,2474.29)"
style="mix-blend-mode:normal;fill:#4e4e4e"
id="use198" />
</g>
</g>
<g
id="g206"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path15 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path6_fill"
transform="translate(1679.98,2474.24)"
style="mix-blend-mode:normal;fill:#4e4e4e"
id="use203" />
</g>
</g>
</g>
</g>
<g
id="g235"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="g213"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path16 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path7_fill"
transform="translate(1673.48,2453.69)"
style="mix-blend-mode:normal;fill:#767677"
id="use210" />
</g>
</g>
<g
id="g218"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path17 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path8_fill"
transform="translate(1643.21,2484.27)"
style="mix-blend-mode:normal;fill:#f37726"
id="use215" />
</g>
</g>
<g
id="g223"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path18 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path9_fill"
transform="translate(1643.21,2457.88)"
style="mix-blend-mode:normal;fill:#f37726"
id="use220" />
</g>
</g>
<g
id="g228"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path19 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path10_fill"
transform="translate(1643.28,2496.09)"
style="mix-blend-mode:normal;fill:#9e9e9e"
id="use225" />
</g>
</g>
<g
id="g233"
style="mix-blend-mode:normal"
figma:type="group">
<g
id="path20 fill"
style="mix-blend-mode:normal"
figma:type="vector">
<use
height="100%"
width="100%"
y="0"
x="0"
xlink:href="#path11_fill"
transform="translate(1641.87,2458.43)"
style="mix-blend-mode:normal;fill:#616262"
id="use230" />
</g>
</g>
</g>
</g>
</g>
</g>
<path
style="fill:currentColor;stroke-width:0.01825031"
d="m 23.933069,291.08216 v -1.39433 c 0,-0.24272 -0.195278,-0.438 -0.438007,-0.438 h -2.514893 v -2.5149 c 0,-0.24273 -0.195279,-0.438 -0.438008,-0.438 h -1.394324 c -0.242729,0 -0.438008,0.19527 -0.438008,0.438 v 2.5149 h -2.514893 c -0.242729,0 -0.438007,0.19528 -0.438007,0.438 v 1.39433 c 0,0.24273 0.195278,0.43801 0.438007,0.43801 h 2.514893 v 2.51489 c 0,0.24273 0.195279,0.43801 0.438008,0.43801 h 1.394324 c 0.242729,0 0.438008,-0.19528 0.438008,-0.43801 v -2.51489 h 2.514893 c 0.242729,0 0.438007,-0.19528 0.438007,-0.43801 z"
id="path4064" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="256"
height="256"
id="svg2">
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6" />
<path
d="M 127.999,0 C 57.423,0 0,57.423 0,128.001 0,198.585 57.423,256.005 127.999,256.005 198.577,256.005 256,198.585 256,128.001 256,57.423 198.577,0 127.999,0"
id="path8"
style="fill:#ffffff" />
<path
d="m 123.318,130.303 c -1.15,2.492 -2.419,5.292 -3.733,8.272 -4.645,10.524 -9.789,23.33 -11.668,31.534 -0.675,2.922 -1.093,6.543 -1.085,10.558 0,1.588 0.085,3.257 0.22,4.957 6.567,2.413 13.66,3.74 21.067,3.753 6.743,-0.013 13.221,-1.127 19.284,-3.143 -1.425,-1.303 -2.785,-2.692 -4.023,-4.257 -8.22,-10.482 -12.806,-25.844 -20.062,-51.674"
id="path10"
style="fill:#91dc47" />
<path
d="m 92.97,78.225 c -15.699,11.064 -25.972,29.312 -26.011,49.992 0.039,20.371 10.003,38.383 25.307,49.493 3.754,-15.637 13.164,-29.955 27.275,-58.655 -0.838,-2.302 -1.793,-4.822 -2.862,-7.469 -3.909,-9.806 -9.551,-21.194 -14.586,-26.351 -2.567,-2.694 -5.682,-5.022 -9.123,-7.01"
id="path12"
style="fill:#91dc47" />
<path
d="m 181.394,198.367 c -8.1,-1.015 -14.785,-2.24 -20.633,-4.303 -9.836,4.884 -20.913,7.643 -32.642,7.643 -40.584,0 -73.483,-32.894 -73.488,-73.49 0,-22.027 9.704,-41.773 25.056,-55.24 -4.106,-0.992 -8.388,-1.571 -12.762,-1.563 -21.562,0.203 -44.323,12.136 -53.799,44.363 -0.886,4.691 -0.675,8.238 -0.675,12.442 0,63.885 51.791,115.676 115.671,115.676 39.122,0 73.682,-19.439 94.611,-49.169 -11.32,2.821 -22.206,4.17 -31.528,4.199 -3.494,0 -6.774,-0.187 -9.811,-0.558"
id="path14"
style="fill:#63b132" />
<path
d="m 159.658,175.953 c 0.714,0.354 2.333,0.932 4.586,1.571 15.157,-11.127 25.007,-29.05 25.046,-49.307 l -0.006,0 c -0.057,-33.771 -27.386,-61.096 -61.165,-61.163 -6.714,0.013 -13.164,1.121 -19.203,3.122 12.419,14.156 18.391,34.386 24.168,56.515 0.003,0.01 0.008,0.018 0.01,0.026 0.011,0.018 1.848,6.145 5.002,14.274 3.132,8.118 7.594,18.168 12.46,25.492 3.195,4.908 6.709,8.435 9.102,9.47"
id="path16"
style="fill:#90b4fe" />
<path
d="m 128.122,12.541 c -38.744,0 -73.016,19.073 -94.008,48.318 10.925,-6.842 22.08,-9.31 31.815,-9.222 13.446,0.039 24.017,4.208 29.089,7.06 1.225,0.706 2.388,1.466 3.527,2.247 9.05,-3.986 19.05,-6.215 29.574,-6.215 40.589,0.005 73.493,32.899 73.499,73.488 l -0.006,0 c 0,20.464 -8.37,38.967 -21.863,52.291 3.312,0.371 6.844,0.602 10.451,0.584 12.811,0.006 26.658,-2.821 37.039,-11.552 6.769,-5.702 12.44,-14.051 15.585,-26.569 0.615,-4.835 0.969,-9.75 0.969,-14.752 0,-63.882 -51.786,-115.678 -115.671,-115.678"
id="path18"
style="fill:#5881d8" />
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

+90
View File
@@ -0,0 +1,90 @@
<svg width="44" height="51" viewBox="0 0 44 51" version="2.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns">
<title>Group.svg</title>
<desc>Created using Figma 0.90</desc>
<g id="Canvas" transform="translate(-1640 -2453)" figma:type="canvas">
<g id="Group" style="mix-blend-mode:normal;" figma:type="group">
<g id="Group" style="mix-blend-mode:normal;" figma:type="group">
<g id="Group" style="mix-blend-mode:normal;" figma:type="group">
<g id="g" style="mix-blend-mode:normal;" figma:type="group">
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path9 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path0_fill" transform="translate(1640.54 2474.36)" fill="#4E4E4E" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path10 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path1_fill" transform="translate(1645.68 2474.37)" fill="#4E4E4E" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path11 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path2_fill" transform="translate(1653.39 2474.26)" fill="#4E4E4E" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path12 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path3_fill" transform="translate(1660.43 2474.39)" fill="#4E4E4E" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path13 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path4_fill" transform="translate(1667.55 2472.54)" fill="#4E4E4E" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path14 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path5_fill" transform="translate(1672.47 2474.29)" fill="#4E4E4E" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path15 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path6_fill" transform="translate(1679.98 2474.24)" fill="#4E4E4E" style="mix-blend-mode:normal;"/>
</g>
</g>
</g>
</g>
<g id="g" style="mix-blend-mode:normal;" figma:type="group">
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path16 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path7_fill" transform="translate(1673.48 2453.69)" fill="#767677" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path17 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path8_fill" transform="translate(1643.21 2484.27)" fill="#F37726" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path18 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path9_fill" transform="translate(1643.21 2457.88)" fill="#F37726" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path19 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path10_fill" transform="translate(1643.28 2496.09)" fill="#9E9E9E" style="mix-blend-mode:normal;"/>
</g>
</g>
<g id="path" style="mix-blend-mode:normal;" figma:type="group">
<g id="path20 fill" style="mix-blend-mode:normal;" figma:type="vector">
<use xlink:href="#path11_fill" transform="translate(1641.87 2458.43)" fill="#616262" style="mix-blend-mode:normal;"/>
</g>
</g>
</g>
</g>
</g>
</g>
<defs>
<path id="path0_fill" d="M 1.74498 5.47533C 1.74498 7.03335 1.62034 7.54082 1.29983 7.91474C 0.943119 8.23595 0.480024 8.41358 0 8.41331L 0.124642 9.3036C 0.86884 9.31366 1.59095 9.05078 2.15452 8.56466C 2.45775 8.19487 2.6834 7.76781 2.818 7.30893C 2.95261 6.85005 2.99341 6.36876 2.93798 5.89377L 2.93798 0L 1.74498 0L 1.74498 5.43972L 1.74498 5.47533Z"/>
<path id="path1_fill" d="M 5.50204 4.76309C 5.50204 5.43081 5.50204 6.02731 5.55545 6.54368L 4.496 6.54368L 4.42478 5.48423C 4.20318 5.85909 3.88627 6.16858 3.50628 6.38125C 3.12628 6.59392 2.69675 6.70219 2.26135 6.69503C 1.22861 6.69503 0 6.13415 0 3.84608L 0 0.0445149L 1.193 0.0445149L 1.193 3.6057C 1.193 4.84322 1.57583 5.67119 2.65309 5.67119C 2.87472 5.67358 3.09459 5.63168 3.29982 5.54796C 3.50505 5.46424 3.69149 5.34039 3.84822 5.18366C 4.00494 5.02694 4.1288 4.84049 4.21252 4.63527C 4.29623 4.43004 4.33813 4.21016 4.33575 3.98853L 4.33575 0L 5.52874 0L 5.52874 4.72748L 5.50204 4.76309Z"/>
<path id="path2_fill" d="M 0.0534178 2.27264C 0.0534178 1.44466 0.0534178 0.768036 0 0.153731L 1.06836 0.153731L 1.12177 1.2666C 1.3598 0.864535 1.70247 0.534594 2.11325 0.311954C 2.52404 0.0893145 2.98754 -0.0176786 3.45435 0.00238095C 5.03908 0.00238095 6.23208 1.32892 6.23208 3.30538C 6.23208 5.63796 4.7987 6.79535 3.24958 6.79535C 2.85309 6.81304 2.45874 6.7281 2.10469 6.54874C 1.75064 6.36937 1.44888 6.10166 1.22861 5.77151L 1.22861 5.77151L 1.22861 9.33269L 0.0534178 9.33269L 0.0534178 2.29935L 0.0534178 2.27264ZM 1.22861 4.00872C 1.23184 4.17026 1.24972 4.33117 1.28203 4.48948C 1.38304 4.88479 1.61299 5.23513 1.93548 5.48506C 2.25798 5.735 2.65461 5.87026 3.06262 5.86944C 4.31794 5.86944 5.05689 4.8456 5.05689 3.3588C 5.05689 2.05897 4.36246 0.946096 3.10714 0.946096C 2.61036 0.986777 2.14548 1.20726 1.79965 1.5662C 1.45382 1.92514 1.25079 2.3979 1.22861 2.89585L 1.22861 4.00872Z"/>
<path id="path3_fill" d="M 1.31764 0.0178059L 2.75102 3.85499C 2.90237 4.28233 3.06262 4.7987 3.16946 5.18153C 3.2941 4.7898 3.42764 4.29123 3.5879 3.82828L 4.88773 0.0178059L 6.14305 0.0178059L 4.36246 4.64735C 3.47216 6.87309 2.92908 8.02158 2.11 8.71601C 1.69745 9.09283 1.19448 9.35658 0.649917 9.48166L 0.356119 8.48453C 0.736886 8.35942 1.09038 8.16304 1.39777 7.90584C 1.8321 7.55188 2.17678 7.10044 2.4038 6.5882C 2.45239 6.49949 2.48551 6.40314 2.50173 6.3033C 2.49161 6.19586 2.46457 6.0907 2.42161 5.9917L 0 0L 1.29983 0L 1.31764 0.0178059Z"/>
<path id="path4_fill" d="M 2.19013 0L 2.19013 1.86962L 3.8995 1.86962L 3.8995 2.75992L 2.19013 2.75992L 2.19013 6.26769C 2.19013 7.06896 2.42161 7.53191 3.08043 7.53191C 3.31442 7.53574 3.54789 7.5088 3.77486 7.45179L 3.82828 8.34208C 3.48794 8.45999 3.12881 8.51431 2.76882 8.50234C 2.53042 8.51726 2.29161 8.48043 2.06878 8.39437C 1.84595 8.30831 1.64438 8.17506 1.47789 8.00377C 1.11525 7.51873 0.949826 6.91431 1.01494 6.31221L 1.01494 2.75102L 0 2.75102L 0 1.86072L 1.03274 1.86072L 1.03274 0.275992L 2.19013 0Z"/>
<path id="path5_fill" d="M 1.17716 3.57899C 1.153 3.88093 1.19468 4.18451 1.29933 4.46876C 1.40398 4.75301 1.5691 5.01114 1.78329 5.22532C 1.99747 5.43951 2.2556 5.60463 2.53985 5.70928C 2.8241 5.81393 3.12768 5.85561 3.42962 5.83145C 4.04033 5.84511 4.64706 5.72983 5.21021 5.49313L 5.41498 6.38343C 4.72393 6.66809 3.98085 6.80458 3.23375 6.78406C 2.79821 6.81388 2.36138 6.74914 1.95322 6.59427C 1.54505 6.43941 1.17522 6.19809 0.869071 5.88688C 0.562928 5.57566 0.327723 5.2019 0.179591 4.79125C 0.0314584 4.38059 -0.0260962 3.94276 0.0108748 3.50777C 0.0108748 1.54912 1.17716 0 3.0824 0C 5.21911 0 5.75329 1.86962 5.75329 3.06262C 5.76471 3.24644 5.76471 3.43079 5.75329 3.61461L 1.15046 3.61461L 1.17716 3.57899ZM 4.66713 2.6887C 4.70149 2.45067 4.68443 2.20805 4.61709 1.97718C 4.54976 1.74631 4.43372 1.53255 4.2768 1.35031C 4.11987 1.16808 3.92571 1.0216 3.70739 0.920744C 3.48907 0.81989 3.25166 0.767006 3.01118 0.765656C 2.52201 0.801064 2.06371 1.01788 1.72609 1.37362C 1.38847 1.72935 1.19588 2.19835 1.18607 2.6887L 4.66713 2.6887Z"/>
<path id="path6_fill" d="M 0.0534178 2.19228C 0.0534178 1.42663 0.0534178 0.767806 0 0.162404L 1.06836 0.162404L 1.06836 1.43553L 1.12177 1.43553C 1.23391 1.04259 1.4656 0.694314 1.78468 0.439049C 2.10376 0.183783 2.4944 0.034196 2.90237 0.0110538C 3.01466 -0.00368459 3.12839 -0.00368459 3.24068 0.0110538L 3.24068 1.12393C 3.10462 1.10817 2.9672 1.10817 2.83114 1.12393C 2.427 1.13958 2.04237 1.30182 1.7491 1.58035C 1.45583 1.85887 1.27398 2.23462 1.23751 2.63743C 1.20422 2.8196 1.18635 3.00425 1.1841 3.18941L 1.1841 6.65267L 0.00890297 6.65267L 0.00890297 2.20118L 0.0534178 2.19228Z"/>
<path id="path7_fill" d="M 6.03059 2.83565C 6.06715 3.43376 5.92485 4.02921 5.6218 4.54615C 5.31875 5.0631 4.86869 5.47813 4.32893 5.73839C 3.78917 5.99864 3.18416 6.09233 2.59097 6.00753C 1.99778 5.92272 1.44326 5.66326 0.998048 5.26219C 0.552837 4.86113 0.23709 4.33661 0.0910307 3.75546C -0.0550287 3.17431 -0.0247891 2.56283 0.177897 1.99893C 0.380583 1.43503 0.746541 0.944221 1.22915 0.589037C 1.71176 0.233853 2.28918 0.0303686 2.88784 0.00450543C 3.28035 -0.0170932 3.67326 0.0391144 4.04396 0.169896C 4.41467 0.300677 4.75587 0.503453 5.04794 0.766561C 5.34 1.02967 5.57718 1.34792 5.74582 1.70301C 5.91446 2.0581 6.01124 2.44303 6.03059 2.83565L 6.03059 2.83565Z"/>
<path id="path8_fill" d="M 18.6962 7.12238C 10.6836 7.12238 3.64131 4.24672 0 0C 1.41284 3.82041 3.96215 7.1163 7.30479 9.44404C 10.6474 11.7718 14.623 13.0196 18.6962 13.0196C 22.7695 13.0196 26.745 11.7718 30.0877 9.44404C 33.4303 7.1163 35.9796 3.82041 37.3925 4.0486e-13C 33.7601 4.24672 26.7445 7.12238 18.6962 7.12238Z"/>
<path id="path9_fill" d="M 18.6962 5.89725C 26.7089 5.89725 33.7512 8.77291 37.3925 13.0196C 35.9796 9.19922 33.4303 5.90333 30.0877 3.57559C 26.745 1.24785 22.7695 4.0486e-13 18.6962 0C 14.623 4.0486e-13 10.6474 1.24785 7.30479 3.57559C 3.96215 5.90333 1.41284 9.19922 0 13.0196C 3.64131 8.76401 10.648 5.89725 18.6962 5.89725Z"/>
<path id="path10_fill" d="M 7.59576 3.56656C 7.64276 4.31992 7.46442 5.07022 7.08347 5.72186C 6.70251 6.3735 6.13619 6.89698 5.45666 7.22561C 4.77713 7.55424 4.01515 7.67314 3.26781 7.56716C 2.52046 7.46117 1.82158 7.13511 1.26021 6.63051C 0.698839 6.12591 0.300394 5.46561 0.115637 4.73375C -0.0691191 4.00188 -0.0318219 3.23159 0.222777 2.52099C 0.477376 1.8104 0.93775 1.19169 1.54524 0.743685C 2.15274 0.295678 2.87985 0.0386595 3.63394 0.00537589C 4.12793 -0.0210471 4.62229 0.0501173 5.08878 0.214803C 5.55526 0.37949 5.98473 0.63447 6.35264 0.965179C 6.72055 1.29589 7.01971 1.69584 7.233 2.1422C 7.4463 2.58855 7.56957 3.07256 7.59576 3.56656L 7.59576 3.56656Z"/>
<path id="path11_fill" d="M 2.25061 4.37943C 1.81886 4.39135 1.39322 4.27535 1.02722 4.04602C 0.661224 3.81668 0.371206 3.48424 0.193641 3.09052C 0.0160762 2.69679 -0.0411078 2.25935 0.0292804 1.83321C 0.0996686 1.40707 0.294486 1.01125 0.589233 0.695542C 0.883981 0.37983 1.2655 0.158316 1.68581 0.0588577C 2.10611 -0.0406005 2.54644 -0.0135622 2.95143 0.136572C 3.35641 0.286707 3.70796 0.553234 3.96186 0.902636C 4.21577 1.25204 4.3607 1.66872 4.37842 2.10027C 4.39529 2.6838 4.18131 3.25044 3.78293 3.67715C 3.38455 4.10387 2.83392 4.35623 2.25061 4.37943Z"/>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

+1
View File
@@ -0,0 +1 @@
<svg class="svg-inline--fa fa-plus fa-w-14" style="margin: 0em 0.5em 3em;" aria-hidden="true" data-prefix="fas" data-icon="plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-fa-i2svg=""><path fill="currentColor" d="M448 294.2v-76.4c0-13.3-10.7-24-24-24H286.2V56c0-13.3-10.7-24-24-24h-76.4c-13.3 0-24 10.7-24 24v137.8H24c-13.3 0-24 10.7-24 24v76.4c0 13.3 10.7 24 24 24h137.8V456c0 13.3 10.7 24 24 24h76.4c13.3 0 24-10.7 24-24V318.2H424c13.3 0 24-10.7 24-24z"></path></svg>

After

Width:  |  Height:  |  Size: 499 B

+2
View File
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<html><head><title>Clojupyter</title><meta charset="utf-8"><meta content="width=device-width, initial-scale=1" name="viewport"><script src="https://use.fontawesome.com/releases/v5.0.6/js/all.js" type="text/javascript"></script><link href="/css/site.css" rel="stylesheet" type="text/css"></head><body class="body-container"><div id="app"></div><script src="/js/app.js" type="text/javascript"></script></body></html>
+10
View File
@@ -0,0 +1,10 @@
var CLOSURE_UNCOMPILED_DEFINES = {};
var CLOSURE_NO_DEPS = true;
if(typeof goog == "undefined") document.write('<script src="/js/out/goog/base.js"></script>');
document.write('<script src="/js/out/goog/deps.js"></script>');
document.write('<script src="/js/out/cljs_deps.js"></script>');
document.write('<script>if (typeof goog == "undefined") console.warn("ClojureScript could not load :main, did you forget to specify :asset-path?");</script>');
document.write('<script>goog.require("process.env");</script>');
document.write("<script>if (typeof goog != \"undefined\") { goog.require(\"figwheel.connect.build_app\"); }</script>");
document.write('<script>goog.require("website.dev");</script>');
+1
View File
@@ -0,0 +1 @@
-239952681
+155
View File
@@ -0,0 +1,155 @@
(ns accountant.core
"The only namespace in this library."
(:require [clojure.string :as str]
[goog.events :as events]
[goog.history.EventType :as EventType])
(:import goog.history.Event
goog.history.Html5History
goog.Uri))
(defn- transformer-create-url
[token path-prefix location]
(str path-prefix token))
(defn- transformer-retrieve-token
[path-prefix location]
(str (.-pathname location) (.-search location) (.-hash location)))
(defonce history (let [transformer (goog.history.Html5History.TokenTransformer.)]
(set! (.. transformer -retrieveToken) transformer-retrieve-token)
(set! (.. transformer -createUrl) transformer-create-url)
(Html5History. js/window transformer)))
(defn- dispatch-on-navigate
[history nav-handler]
(events/listen
history
EventType/NAVIGATE
(fn [e]
(let [token (.-token e)]
(nav-handler token)))))
(defn- get-href-attribute
"Given a DOM node, if it is an element node, return its href attribute.
Otherwise, return nil."
[node]
(when (and node (= (.-nodeType node) js/Node.ELEMENT_NODE))
(.getAttribute node "href")))
(defn- find-href-node
"Given a DOM element that may or may not be a link, traverse up the DOM tree
to see if any of its parents are links. If so, return the href content, if
it does not have an explicit `data-trigger` attribute to signify a non-navigational
link element."
[e]
(let [href (get-href-attribute e)
attrs (.-attributes e)
navigation-link? (and href attrs (-> attrs (aget "data-trigger") not))]
(if navigation-link?
e
(when-let [parent (.-parentNode e)]
(recur parent)))))
(defn- uri->query [uri]
(let [query (.getQuery uri)]
(when-not (empty? query)
(str "?" query))))
(defn- uri->fragment [uri]
(let [fragment (.getFragment uri)]
(when-not (empty? fragment)
(str "#" fragment))))
(defn- prevent-reload-on-known-path
"Create a click handler that blocks page reloads for known routes"
[history path-exists?]
(events/listen
js/document
"click"
(fn [e]
(let [target (.-target e)
button (.-button e)
meta-key (.-metaKey e)
alt-key (.-altKey e)
ctrl-key (.-ctrlKey e)
shift-key (.-shiftKey e)
any-key (or meta-key alt-key ctrl-key shift-key)
href-node (find-href-node target)
href (when href-node (.-href href-node))
link-target (when href-node (.-target href-node))
uri (.parse Uri href)
path (.getPath uri)
query (uri->query uri)
fragment (uri->fragment uri)
relative-href (str path query fragment)
title (.-title target)
host (.getDomain uri)
port (.getPort uri)
current-host js/window.location.hostname
current-port js/window.location.port
loc js/window.location
current-relative-href (str (.-pathname loc) (.-query loc) (.-hash loc))]
(when (and (not any-key)
(#{"" "_self"} link-target)
(= button 0)
(= host current-host)
(or (not port)
(= (str port) (str current-port)))
(path-exists? path))
(when (not= current-relative-href relative-href) ;; do not add duplicate html5 history state
(. history (setToken relative-href title)))
(.preventDefault e))))))
(defonce nav-handler nil)
(defonce path-exists? nil)
(defn configure-navigation!
"Create and configure HTML5 history navigation.
nav-handler: a fn of one argument, a path. Called when we've decided
to navigate to another page. You'll want to make your app draw the
new page here.
path-exists?: a fn of one argument, a path. Return truthy if this path is handled by the SPA"
[{:keys [nav-handler path-exists?]}]
(.setUseFragment history false)
(.setPathPrefix history "")
(.setEnabled history true)
(set! accountant.core/nav-handler nav-handler)
(set! accountant.core/path-exists? path-exists?)
(dispatch-on-navigate history nav-handler)
(prevent-reload-on-known-path history path-exists?))
(defn map->params [query]
(let [params (map #(name %) (keys query))
values (vals query)
pairs (partition 2 (interleave params values))]
(str/join "&" (map #(str/join "=" %) pairs))))
(defn navigate!
"add a browser history entry. updates window/location"
([route] (navigate! route {}))
([route query]
(if nav-handler
(let [token (.getToken history)
old-route (first (str/split token "?"))
query-string (map->params (reduce-kv (fn [valid k v]
(if v
(assoc valid k v)
valid)) {} query))
with-params (if (empty? query-string)
route
(str route "?" query-string))]
(if (= old-route route)
(. history (replaceToken with-params))
(. history (setToken with-params))))
(js/console.error "can't navigate! until configure-navigation! called"))))
(defn dispatch-current! []
"Dispatch current URI path."
(let [path (-> js/window .-location .-pathname)
query (-> js/window .-location .-search)
hash (-> js/window .-location .-hash)]
(if nav-handler
(nav-handler (str path query hash))
(js/console.error "can't dispatch-current until configure-navigation! called"))))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {window {location {hostname {}, port {}, pathname {}, query {}, hash {}, search {}}}, Node {ELEMENT_NODE {}}, document {}, Error {}, console {error {}}}, :use-macros {}, :excludes #{}, :name accountant.core, :imports {Event goog.history.Event, Html5History goog.history.Html5History, Uri goog.Uri}, :requires {str clojure.string, clojure.string clojure.string, events goog.events, goog.events goog.events, EventType goog.history.EventType, goog.history.EventType goog.history.EventType, Event goog.history.Event, Html5History goog.history.Html5History, Uri goog.Uri}, :cljs.spec/speced-vars [], :uses nil, :defs {nav-handler {:name accountant.core/nav-handler, :file "target/cljsbuild/public/js/out/accountant/core.cljs", :line 103, :column 1, :end-line 103, :end-column 21, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/accountant/core.cljs", :line 103, :column 10, :end-line 103, :end-column 21}, :tag clj-nil}, transformer-create-url {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/accountant/core.cljs", :line 10, :column 8, :end-line 10, :end-column 30, :private true, :arglists (quote ([token path-prefix location]))}, :private true, :name accountant.core/transformer-create-url, :variadic false, :file "target/cljsbuild/public/js/out/accountant/core.cljs", :end-column 30, :method-params ([token path-prefix location]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 10, :end-line 10, :max-fixed-arity 3, :fn-var true, :arglists (quote ([token path-prefix location]))}, uri->fragment {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/accountant/core.cljs", :line 58, :column 8, :end-line 58, :end-column 21, :private true, :arglists (quote ([uri]))}, :private true, :name accountant.core/uri->fragment, :variadic false, :file "target/cljsbuild/public/js/out/accountant/core.cljs", :end-column 21, :method-params ([uri]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 58, :end-line 58, :max-fixed-arity 1, :fn-var true, :arglists (quote ([uri]))}, map->params {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/accountant/core.cljs", :line 123, :column 7, :end-line 123, :end-column 18, :arglists (quote ([query]))}, :name accountant.core/map->params, :variadic false, :file "target/cljsbuild/public/js/out/accountant/core.cljs", :end-column 18, :method-params ([query]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 123, :end-line 123, :max-fixed-arity 1, :fn-var true, :arglists (quote ([query]))}, path-exists? {:name accountant.core/path-exists?, :file "target/cljsbuild/public/js/out/accountant/core.cljs", :line 104, :column 1, :end-line 104, :end-column 22, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/accountant/core.cljs", :line 104, :column 10, :end-line 104, :end-column 22}, :tag clj-nil}, transformer-retrieve-token {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/accountant/core.cljs", :line 14, :column 8, :end-line 14, :end-column 34, :private true, :arglists (quote ([path-prefix location]))}, :private true, :name accountant.core/transformer-retrieve-token, :variadic false, :file "target/cljsbuild/public/js/out/accountant/core.cljs", :end-column 34, :method-params ([path-prefix location]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 14, :end-line 14, :max-fixed-arity 2, :fn-var true, :arglists (quote ([path-prefix location]))}, get-href-attribute {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/accountant/core.cljs", :line 32, :column 8, :end-line 32, :end-column 26, :private true, :arglists (quote ([node])), :doc "Given a DOM node, if it is an element node, return its href attribute.\n Otherwise, return nil."}, :private true, :name accountant.core/get-href-attribute, :variadic false, :file "target/cljsbuild/public/js/out/accountant/core.cljs", :end-column 26, :method-params ([node]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 32, :end-line 32, :max-fixed-arity 1, :fn-var true, :arglists (quote ([node])), :doc "Given a DOM node, if it is an element node, return its href attribute.\n Otherwise, return nil."}, uri->query {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/accountant/core.cljs", :line 53, :column 8, :end-line 53, :end-column 18, :private true, :arglists (quote ([uri]))}, :private true, :name accountant.core/uri->query, :variadic false, :file "target/cljsbuild/public/js/out/accountant/core.cljs", :end-column 18, :method-params ([uri]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 53, :end-line 53, :max-fixed-arity 1, :fn-var true, :arglists (quote ([uri]))}, history {:name accountant.core/history, :file "target/cljLine truncated
+294
View File
@@ -0,0 +1,294 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('accountant.core');
goog.require('cljs.core');
goog.require('clojure.string');
goog.require('goog.events');
goog.require('goog.history.EventType');
goog.require('goog.history.Event');
goog.require('goog.history.Html5History');
goog.require('goog.Uri');
accountant.core.transformer_create_url = (function accountant$core$transformer_create_url(token,path_prefix,location){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(path_prefix),cljs.core.str.cljs$core$IFn$_invoke$arity$1(token)].join('');
});
accountant.core.transformer_retrieve_token = (function accountant$core$transformer_retrieve_token(path_prefix,location){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(location.pathname),cljs.core.str.cljs$core$IFn$_invoke$arity$1(location.search),cljs.core.str.cljs$core$IFn$_invoke$arity$1(location.hash)].join('');
});
if(typeof accountant.core.history !== 'undefined'){
} else {
accountant.core.history = (function (){var transformer = (new goog.history.Html5History.TokenTransformer());
transformer.retrieveToken = accountant.core.transformer_retrieve_token;
transformer.createUrl = accountant.core.transformer_create_url;
return (new goog.history.Html5History(window,transformer));
})();
}
accountant.core.dispatch_on_navigate = (function accountant$core$dispatch_on_navigate(history,nav_handler){
return goog.events.listen(history,goog.history.EventType.NAVIGATE,(function (e){
var token = e.token;
return nav_handler.call(null,token);
}));
});
/**
* Given a DOM node, if it is an element node, return its href attribute.
* Otherwise, return nil.
*/
accountant.core.get_href_attribute = (function accountant$core$get_href_attribute(node){
if(cljs.core.truth_((function (){var and__35486__auto__ = node;
if(cljs.core.truth_(and__35486__auto__)){
return cljs.core._EQ_.call(null,node.nodeType,Node.ELEMENT_NODE);
} else {
return and__35486__auto__;
}
})())){
return node.getAttribute("href");
} else {
return null;
}
});
/**
* Given a DOM element that may or may not be a link, traverse up the DOM tree
* to see if any of its parents are links. If so, return the href content, if
* it does not have an explicit `data-trigger` attribute to signify a non-navigational
* link element.
*/
accountant.core.find_href_node = (function accountant$core$find_href_node(e){
while(true){
var href = accountant.core.get_href_attribute.call(null,e);
var attrs = e.attributes;
var navigation_link_QMARK_ = (function (){var and__35486__auto__ = href;
if(cljs.core.truth_(and__35486__auto__)){
var and__35486__auto____$1 = attrs;
if(cljs.core.truth_(and__35486__auto____$1)){
return cljs.core.not.call(null,(attrs["data-trigger"]));
} else {
return and__35486__auto____$1;
}
} else {
return and__35486__auto__;
}
})();
if(cljs.core.truth_(navigation_link_QMARK_)){
return e;
} else {
var temp__5457__auto__ = e.parentNode;
if(cljs.core.truth_(temp__5457__auto__)){
var parent = temp__5457__auto__;
var G__37812 = parent;
e = G__37812;
continue;
} else {
return null;
}
}
break;
}
});
accountant.core.uri__GT_query = (function accountant$core$uri__GT_query(uri){
var query = uri.getQuery();
if(cljs.core.empty_QMARK_.call(null,query)){
return null;
} else {
return ["?",cljs.core.str.cljs$core$IFn$_invoke$arity$1(query)].join('');
}
});
accountant.core.uri__GT_fragment = (function accountant$core$uri__GT_fragment(uri){
var fragment = uri.getFragment();
if(cljs.core.empty_QMARK_.call(null,fragment)){
return null;
} else {
return ["#",cljs.core.str.cljs$core$IFn$_invoke$arity$1(fragment)].join('');
}
});
/**
* Create a click handler that blocks page reloads for known routes
*/
accountant.core.prevent_reload_on_known_path = (function accountant$core$prevent_reload_on_known_path(history,path_exists_QMARK_){
return goog.events.listen(document,"click",(function (e){
var target = e.target;
var button = e.button;
var meta_key = e.metaKey;
var alt_key = e.altKey;
var ctrl_key = e.ctrlKey;
var shift_key = e.shiftKey;
var any_key = (function (){var or__35498__auto__ = meta_key;
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
var or__35498__auto____$1 = alt_key;
if(cljs.core.truth_(or__35498__auto____$1)){
return or__35498__auto____$1;
} else {
var or__35498__auto____$2 = ctrl_key;
if(cljs.core.truth_(or__35498__auto____$2)){
return or__35498__auto____$2;
} else {
return shift_key;
}
}
}
})();
var href_node = accountant.core.find_href_node.call(null,target);
var href = (cljs.core.truth_(href_node)?href_node.href:null);
var link_target = (cljs.core.truth_(href_node)?href_node.target:null);
var uri = goog.Uri.parse(href);
var path = uri.getPath();
var query = accountant.core.uri__GT_query.call(null,uri);
var fragment = accountant.core.uri__GT_fragment.call(null,uri);
var relative_href = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(path),cljs.core.str.cljs$core$IFn$_invoke$arity$1(query),cljs.core.str.cljs$core$IFn$_invoke$arity$1(fragment)].join('');
var title = target.title;
var host = uri.getDomain();
var port = uri.getPort();
var current_host = window.location.hostname;
var current_port = window.location.port;
var loc = window.location;
var current_relative_href = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(loc.pathname),cljs.core.str.cljs$core$IFn$_invoke$arity$1(loc.query),cljs.core.str.cljs$core$IFn$_invoke$arity$1(loc.hash)].join('');
if(cljs.core.truth_((function (){var and__35486__auto__ = cljs.core.not.call(null,any_key);
if(and__35486__auto__){
var and__35486__auto____$1 = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["",null,"_self",null], null), null).call(null,link_target);
if(cljs.core.truth_(and__35486__auto____$1)){
var and__35486__auto____$2 = cljs.core._EQ_.call(null,button,(0));
if(and__35486__auto____$2){
var and__35486__auto____$3 = cljs.core._EQ_.call(null,host,current_host);
if(and__35486__auto____$3){
var and__35486__auto____$4 = (cljs.core.not.call(null,port)) || (cljs.core._EQ_.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(port)].join(''),[cljs.core.str.cljs$core$IFn$_invoke$arity$1(current_port)].join('')));
if(and__35486__auto____$4){
return path_exists_QMARK_.call(null,path);
} else {
return and__35486__auto____$4;
}
} else {
return and__35486__auto____$3;
}
} else {
return and__35486__auto____$2;
}
} else {
return and__35486__auto____$1;
}
} else {
return and__35486__auto__;
}
})())){
if(cljs.core.not_EQ_.call(null,current_relative_href,relative_href)){
history.setToken(relative_href,title);
} else {
}
return e.preventDefault();
} else {
return null;
}
}));
});
if(typeof accountant.core.nav_handler !== 'undefined'){
} else {
accountant.core.nav_handler = null;
}
if(typeof accountant.core.path_exists_QMARK_ !== 'undefined'){
} else {
accountant.core.path_exists_QMARK_ = null;
}
/**
* Create and configure HTML5 history navigation.
*
* nav-handler: a fn of one argument, a path. Called when we've decided
* to navigate to another page. You'll want to make your app draw the
* new page here.
*
* path-exists?: a fn of one argument, a path. Return truthy if this path is handled by the SPA
*/
accountant.core.configure_navigation_BANG_ = (function accountant$core$configure_navigation_BANG_(p__37813){
var map__37814 = p__37813;
var map__37814__$1 = ((((!((map__37814 == null)))?((((map__37814.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__37814.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__37814):map__37814);
var nav_handler = cljs.core.get.call(null,map__37814__$1,new cljs.core.Keyword(null,"nav-handler","nav-handler",2039495484));
var path_exists_QMARK_ = cljs.core.get.call(null,map__37814__$1,new cljs.core.Keyword(null,"path-exists?","path-exists?",1473384514));
accountant.core.history.setUseFragment(false);
accountant.core.history.setPathPrefix("");
accountant.core.history.setEnabled(true);
accountant.core.nav_handler = nav_handler;
accountant.core.path_exists_QMARK_ = path_exists_QMARK_;
accountant.core.dispatch_on_navigate.call(null,accountant.core.history,nav_handler);
return accountant.core.prevent_reload_on_known_path.call(null,accountant.core.history,path_exists_QMARK_);
});
accountant.core.map__GT_params = (function accountant$core$map__GT_params(query){
var params = cljs.core.map.call(null,(function (p1__37816_SHARP_){
return cljs.core.name.call(null,p1__37816_SHARP_);
}),cljs.core.keys.call(null,query));
var values = cljs.core.vals.call(null,query);
var pairs = cljs.core.partition.call(null,(2),cljs.core.interleave.call(null,params,values));
return clojure.string.join.call(null,"&",cljs.core.map.call(null,((function (params,values,pairs){
return (function (p1__37817_SHARP_){
return clojure.string.join.call(null,"=",p1__37817_SHARP_);
});})(params,values,pairs))
,pairs));
});
/**
* add a browser history entry. updates window/location
*/
accountant.core.navigate_BANG_ = (function accountant$core$navigate_BANG_(var_args){
var G__37819 = arguments.length;
switch (G__37819) {
case 1:
return accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (route){
return accountant.core.navigate_BANG_.call(null,route,cljs.core.PersistentArrayMap.EMPTY);
});
accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (route,query){
if(cljs.core.truth_(accountant.core.nav_handler)){
var token = accountant.core.history.getToken();
var old_route = cljs.core.first.call(null,clojure.string.split.call(null,token,"?"));
var query_string = accountant.core.map__GT_params.call(null,cljs.core.reduce_kv.call(null,((function (token,old_route){
return (function (valid,k,v){
if(cljs.core.truth_(v)){
return cljs.core.assoc.call(null,valid,k,v);
} else {
return valid;
}
});})(token,old_route))
,cljs.core.PersistentArrayMap.EMPTY,query));
var with_params = ((cljs.core.empty_QMARK_.call(null,query_string))?route:[cljs.core.str.cljs$core$IFn$_invoke$arity$1(route),"?",cljs.core.str.cljs$core$IFn$_invoke$arity$1(query_string)].join(''));
if(cljs.core._EQ_.call(null,old_route,route)){
return accountant.core.history.replaceToken(with_params);
} else {
return accountant.core.history.setToken(with_params);
}
} else {
return console.error("can't navigate! until configure-navigation! called");
}
});
accountant.core.navigate_BANG_.cljs$lang$maxFixedArity = 2;
accountant.core.dispatch_current_BANG_ = (function accountant$core$dispatch_current_BANG_(){
var path = window.location.pathname;
var query = window.location.search;
var hash = window.location.hash;
if(cljs.core.truth_(accountant.core.nav_handler)){
return accountant.core.nav_handler.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(path),cljs.core.str.cljs$core$IFn$_invoke$arity$1(query),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hash)].join(''));
} else {
return console.error("can't dispatch-current until configure-navigation! called");
}
});
//# sourceMappingURL=core.js.map?rel=1517021941432
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/accountant\/core.js","sources":["core.cljs?rel=1517021941433"],"lineCount":294,"mappings":";AAAA;;;;;;;;AASA,yCAAA,zCAAOA,0FACJC,MAAMC,YAAYC;AADrB,AAEE,oDAAKD,yDAAYD;;AAEnB,6CAAA,7CAAOG,kGACJF,YAAYC;AADf,AAEE,oDAAK,AAAYA,+DAAU,AAAUA,6DAAU,AAAQA;;AAEzD,GAAA,OAASE;AAAT;AAAA,AAAA,AAASA,0BAAQ,iBAAMC,cAAY,KAAAC;AAAlB,AACE,AAAM,AAAID,4BAA4BF;;AACtC,AAAM,AAAIE,wBAAwBN;;AAClC,YAAAQ,0BAAeC,OAAUH;;;AAE5C,uCAAA,vCAAOI,sFACJC,QAAQC;AADX,AAEE,OAACC,mBACCF,QACAG,gCACA,WAAKC;AAAL,AACE,IAAMd,QAAM,AAASc;AAArB,AACE,OAACH,sBAAYX;;;AAErB;;;;qCAAA,rCAAOe,kFAGJC;AAHH,AAIE,oBAAM,iBAAAC,qBAAKD;AAAL,AAAA,oBAAAC;AAAU,OAACC,yBAAE,AAAYF,cAAMG;;AAA\/BF;;;AAAN,AACE,yBAAA,lBAAeD;;AADjB;;;AAGF;;;;;;iCAAA,jCAAOI,0EAKJN;;AALH,AAME,IAAMO,OAA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OAAGlF,qCAAsB4F;;AACzB,OAAG5F,iCAAkB4F;;;AACzB,qBAAA,dAACC;;;;AAjBN,AAAA,yDAAA,zDAAMb;;AAAN,AAmBA,yCAAA,zCAAMc;AAAN,AAAA;AAEE,IAAMnD,OAAK,AAAA,AAAIvC;IACTqB,QAAM,AAAA,AAAIrB;IACV2F,OAAK,AAAA,AAAI3F;AAFf,AAGE,oBAAIoD;AACF,OAACA,sCAAY,6CAAKb,kDAAKlB,mDAAMsE;;AAC7B,qBAAA,dAACF","names":["accountant.core\/transformer-create-url","token","path-prefix","location","accountant.core\/transformer-retrieve-token","accountant.core\/history","transformer","goog\/history.Html5History.TokenTransformer","goog\/history.Html5History","js\/window","accountant.core\/dispatch-on-navigate","history","nav-handler","goog.events\/listen","goog.history.EventType\/NAVIGATE","e","accountant.core\/get-href-attribute","node","and__35486__auto__","cljs.core\/=","js\/Node.ELEMENT_NODE","accountant.core\/find-href-node","href","attrs","navigation-link?","cljs.core\/not","temp__5457__auto__","parent","accountant.core\/uri->query","uri","query","cljs.core\/empty?","accountant.core\/uri->fragment","fragment","accountant.core\/prevent-reloadLine truncated
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"target\/cljsbuild\/public\/js\/out\/cljs\/core.js","sources":["core.cljs"],"lineCount":36069,"mappings":";AAQA;;;;;;;;AAUA,8CAAA,9CAAKA;AAOL,qCAAA,rCAAKC;AAIL,yCAAA,zCAAKC;AAGL,sCAAA,tCAAKC;AAEL,AAEA,GAAA,OAASC;AAAT;AAAA,AAAA,8BAAA,9BAASA;;AAET,wBAAA,xBAAKC;AACL,yBAAA,zBAAKC;AAEL,AAAA,AAAA;AAAA;AAAA,AAAAC,YAAA,+BAAA;AAQA;;;;2BAAA,3BAIEC;AAEF;;;4BAAA,5BAGEC;AAEF,+BAAA,\/BAEEC;AAEF,GAAA,OAIEC;AAJF;AAAA,AAAA;;;;;iCAAA,jCAIEA;;AAEF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D1B,AAEE,IAAAL,uBAAYK;AAAZ,AAAA,aAAA,TAAUJ;;AAAV,AAAA,GAAA,UAAAD,TAAUC;AAAV,AACE,CAAMK,QAAQL,UAAE,CAAMG,IAAIH;;AAD5B,cAAA,UAAA,TAAUA;;;;AAAV;;;;AAEAK;;AAEJ;;;;kBAAA,lBAAaC,4CAGVC;AAHH,AAIE,IAAMC,IAAE,KAAAnE,MAAW,AAAS;AAA5B,AACE,QAAA,JAAO2D;;AAAP,AACE,GAAI,CAAGA,IAAE,AAASQ;AAChB,AACE,CAAMA,EAAER,KAAE,CAAM,UAAyBA;;AACzC,cAAO,KAAA,JAAKA;;;;AACdQ;;;;;AAER,uBAAA,vBAAOC,sDACJC;AADH,AAEE,Line truncated
+929
View File
@@ -0,0 +1,929 @@
(ns cljs.core.async
(:refer-clojure :exclude [reduce transduce into merge map take partition partition-by])
(:require [cljs.core.async.impl.protocols :as impl]
[cljs.core.async.impl.channels :as channels]
[cljs.core.async.impl.buffers :as buffers]
[cljs.core.async.impl.timers :as timers]
[cljs.core.async.impl.dispatch :as dispatch]
[cljs.core.async.impl.ioc-helpers :as helpers])
(:require-macros [cljs.core.async.impl.ioc-macros :as ioc]
[cljs.core.async.macros :refer [go go-loop]]))
(defn- fn-handler
([f] (fn-handler f true))
([f blockable]
(reify
impl/Handler
(active? [_] true)
(blockable? [_] blockable)
(commit [_] f))))
(defn buffer
"Returns a fixed buffer of size n. When full, puts will block/park."
[n]
(buffers/fixed-buffer n))
(defn dropping-buffer
"Returns a buffer of size n. When full, puts will complete but
val will be dropped (no transfer)."
[n]
(buffers/dropping-buffer n))
(defn sliding-buffer
"Returns a buffer of size n. When full, puts will complete, and be
buffered, but oldest elements in buffer will be dropped (not
transferred)."
[n]
(buffers/sliding-buffer n))
(defn unblocking-buffer?
"Returns true if a channel created with buff will never block. That is to say,
puts into this buffer will never cause the buffer to be full. "
[buff]
(satisfies? impl/UnblockingBuffer buff))
(defn chan
"Creates a channel with an optional buffer, an optional transducer (like (map f),
(filter p) etc or a composition thereof), and an optional exception handler.
If buf-or-n is a number, will create and use a fixed buffer of that size. If a
transducer is supplied a buffer must be specified. ex-handler must be a
fn of one argument - if an exception occurs during transformation it will be called
with the thrown value as an argument, and any non-nil return value will be placed
in the channel."
([] (chan nil))
([buf-or-n] (chan buf-or-n nil nil))
([buf-or-n xform] (chan buf-or-n xform nil))
([buf-or-n xform ex-handler]
(let [buf-or-n (if (= buf-or-n 0)
nil
buf-or-n)]
(when xform (assert buf-or-n "buffer must be supplied when transducer is"))
(channels/chan (if (number? buf-or-n)
(buffer buf-or-n)
buf-or-n)
xform
ex-handler))))
(defn promise-chan
"Creates a promise channel with an optional transducer, and an optional
exception-handler. A promise channel can take exactly one value that consumers
will receive. Once full, puts complete but val is dropped (no transfer).
Consumers will block until either a value is placed in the channel or the
channel is closed. See chan for the semantics of xform and ex-handler."
([] (promise-chan nil))
([xform] (promise-chan xform nil))
([xform ex-handler]
(chan (buffers/promise-buffer) xform ex-handler)))
(defn timeout
"Returns a channel that will close after msecs"
[msecs]
(timers/timeout msecs))
(defn <!
"takes a val from port. Must be called inside a (go ...) block. Will
return nil if closed. Will park if nothing is available.
Returns true unless port is already closed"
[port]
(throw (js/Error. "<! used not in (go ...) block")))
(defn take!
"Asynchronously takes a val from port, passing to fn1. Will pass nil
if closed. If on-caller? (default true) is true, and value is
immediately available, will call fn1 on calling thread.
Returns nil."
([port fn1] (take! port fn1 true))
([port fn1 on-caller?]
(let [ret (impl/take! port (fn-handler fn1))]
(when ret
(let [val @ret]
(if on-caller?
(fn1 val)
(dispatch/run #(fn1 val)))))
nil)))
(defn- nop [_])
(def ^:private fhnop (fn-handler nop))
(defn >!
"puts a val into port. nil values are not allowed. Must be called
inside a (go ...) block. Will park if no buffer space is available.
Returns true unless port is already closed."
[port val]
(throw (js/Error. ">! used not in (go ...) block")))
(defn put!
"Asynchronously puts a val into port, calling fn0 (if supplied) when
complete. nil values are not allowed. Will throw if closed. If
on-caller? (default true) is true, and the put is immediately
accepted, will call fn0 on calling thread. Returns nil."
([port val]
(if-let [ret (impl/put! port val fhnop)]
@ret
true))
([port val fn1] (put! port val fn1 true))
([port val fn1 on-caller?]
(if-let [retb (impl/put! port val (fn-handler fn1))]
(let [ret @retb]
(if on-caller?
(fn1 ret)
(dispatch/run #(fn1 ret)))
ret)
true)))
(defn close!
([port]
(impl/close! port)))
(defn- random-array
[n]
(let [a (make-array n)]
(dotimes [x n]
(aset a x 0))
(loop [i 1]
(if (= i n)
a
(do
(let [j (rand-int i)]
(aset a i (aget a j))
(aset a j i)
(recur (inc i))))))))
(defn- alt-flag []
(let [flag (atom true)]
(reify
impl/Handler
(active? [_] @flag)
(blockable? [_] true)
(commit [_]
(reset! flag nil)
true))))
(defn- alt-handler [flag cb]
(reify
impl/Handler
(active? [_] (impl/active? flag))
(blockable? [_] true)
(commit [_]
(impl/commit flag)
cb)))
(defn do-alts
"returns derefable [val port] if immediate, nil if enqueued"
[fret ports opts]
(let [flag (alt-flag)
n (count ports)
idxs (random-array n)
priority (:priority opts)
ret
(loop [i 0]
(when (< i n)
(let [idx (if priority i (aget idxs i))
port (nth ports idx)
wport (when (vector? port) (port 0))
vbox (if wport
(let [val (port 1)]
(impl/put! wport val (alt-handler flag #(fret [% wport]))))
(impl/take! port (alt-handler flag #(fret [% port]))))]
(if vbox
(channels/box [@vbox (or wport port)])
(recur (inc i))))))]
(or
ret
(when (contains? opts :default)
(when-let [got (and (impl/active? flag) (impl/commit flag))]
(channels/box [(:default opts) :default]))))))
(defn alts!
"Completes at most one of several channel operations. Must be called
inside a (go ...) block. ports is a vector of channel endpoints,
which can be either a channel to take from or a vector of
[channel-to-put-to val-to-put], in any combination. Takes will be
made as if by <!, and puts will be made as if by >!. Unless
the :priority option is true, if more than one port operation is
ready a non-deterministic choice will be made. If no operation is
ready and a :default value is supplied, [default-val :default] will
be returned, otherwise alts! will park until the first operation to
become ready completes. Returns [val port] of the completed
operation, where val is the value taken for takes, and a
boolean (true unless already closed, as per put!) for puts.
opts are passed as :key val ... Supported options:
:default val - the value to use if none of the operations are immediately ready
:priority true - (default nil) when true, the operations will be tried in order.
Note: there is no guarantee that the port exps or val exprs will be
used, nor in what order should they be, so they should not be
depended upon for side effects."
[ports & {:as opts}]
(throw (js/Error. "alts! used not in (go ...) block")))
(defn offer!
"Puts a val into port if it's possible to do so immediately.
nil values are not allowed. Never blocks. Returns true if offer succeeds."
[port val]
(let [ret (impl/put! port val (fn-handler nop false))]
(when ret @ret)))
(defn poll!
"Takes a val from port if it's possible to do so immediately.
Never blocks. Returns value if successful, nil otherwise."
[port]
(let [ret (impl/take! port (fn-handler nop false))]
(when ret @ret)))
;;;;;;; channel ops
(defn pipe
"Takes elements from the from channel and supplies them to the to
channel. By default, the to channel will be closed when the from
channel closes, but can be determined by the close? parameter. Will
stop consuming the from channel if the to channel closes"
([from to] (pipe from to true))
([from to close?]
(go-loop []
(let [v (<! from)]
(if (nil? v)
(when close? (close! to))
(when (>! to v)
(recur)))))
to))
(defn- pipeline*
([n to xf from close? ex-handler type]
(assert (pos? n))
(let [jobs (chan n)
results (chan n)
process (fn [[v p :as job]]
(if (nil? job)
(do (close! results) nil)
(let [res (chan 1 xf ex-handler)]
(go
(>! res v)
(close! res))
(put! p res)
true)))
async (fn [[v p :as job]]
(if (nil? job)
(do (close! results) nil)
(let [res (chan 1)]
(xf v res)
(put! p res)
true)))]
(dotimes [_ n]
(case type
:compute (go-loop []
(let [job (<! jobs)]
(when (process job)
(recur))))
:async (go-loop []
(let [job (<! jobs)]
(when (async job)
(recur))))))
(go-loop []
(let [v (<! from)]
(if (nil? v)
(close! jobs)
(let [p (chan 1)]
(>! jobs [v p])
(>! results p)
(recur)))))
(go-loop []
(let [p (<! results)]
(if (nil? p)
(when close? (close! to))
(let [res (<! p)]
(loop []
(let [v (<! res)]
(when (and (not (nil? v)) (>! to v))
(recur))))
(recur))))))))
(defn pipeline-async
"Takes elements from the from channel and supplies them to the to
channel, subject to the async function af, with parallelism n. af
must be a function of two arguments, the first an input value and
the second a channel on which to place the result(s). af must close!
the channel before returning. The presumption is that af will
return immediately, having launched some asynchronous operation
whose completion/callback will manipulate the result channel. Outputs
will be returned in order relative to the inputs. By default, the to
channel will be closed when the from channel closes, but can be
determined by the close? parameter. Will stop consuming the from
channel if the to channel closes."
([n to af from] (pipeline-async n to af from true))
([n to af from close?] (pipeline* n to af from close? nil :async)))
(defn pipeline
"Takes elements from the from channel and supplies them to the to
channel, subject to the transducer xf, with parallelism n. Because
it is parallel, the transducer will be applied independently to each
element, not across elements, and may produce zero or more outputs
per input. Outputs will be returned in order relative to the
inputs. By default, the to channel will be closed when the from
channel closes, but can be determined by the close? parameter. Will
stop consuming the from channel if the to channel closes.
Note this is supplied for API compatibility with the Clojure version.
Values of N > 1 will not result in actual concurrency in a
single-threaded runtime."
([n to xf from] (pipeline n to xf from true))
([n to xf from close?] (pipeline n to xf from close? nil))
([n to xf from close? ex-handler] (pipeline* n to xf from close? ex-handler :compute)))
(defn split
"Takes a predicate and a source channel and returns a vector of two
channels, the first of which will contain the values for which the
predicate returned true, the second those for which it returned
false.
The out channels will be unbuffered by default, or two buf-or-ns can
be supplied. The channels will close after the source channel has
closed."
([p ch] (split p ch nil nil))
([p ch t-buf-or-n f-buf-or-n]
(let [tc (chan t-buf-or-n)
fc (chan f-buf-or-n)]
(go-loop []
(let [v (<! ch)]
(if (nil? v)
(do (close! tc) (close! fc))
(when (>! (if (p v) tc fc) v)
(recur)))))
[tc fc])))
(defn reduce
"f should be a function of 2 arguments. Returns a channel containing
the single result of applying f to init and the first item from the
channel, then applying f to that result and the 2nd item, etc. If
the channel closes without yielding items, returns init and f is not
called. ch must close before reduce produces a result."
[f init ch]
(go-loop [ret init]
(let [v (<! ch)]
(if (nil? v)
ret
(let [ret' (f ret v)]
(if (reduced? ret')
@ret'
(recur ret')))))))
(defn transduce
"async/reduces a channel with a transformation (xform f).
Returns a channel containing the result. ch must close before
transduce produces a result."
[xform f init ch]
(let [f (xform f)]
(go
(let [ret (<! (reduce f init ch))]
(f ret)))))
(defn onto-chan
"Puts the contents of coll into the supplied channel.
By default the channel will be closed after the items are copied,
but can be determined by the close? parameter.
Returns a channel which will close after the items are copied."
([ch coll] (onto-chan ch coll true))
([ch coll close?]
(go-loop [vs (seq coll)]
(if (and vs (>! ch (first vs)))
(recur (next vs))
(when close?
(close! ch))))))
(defn to-chan
"Creates and returns a channel which contains the contents of coll,
closing when exhausted."
[coll]
(let [ch (chan (bounded-count 100 coll))]
(onto-chan ch coll)
ch))
(defprotocol Mux
(muxch* [_]))
(defprotocol Mult
(tap* [m ch close?])
(untap* [m ch])
(untap-all* [m]))
(defn mult
"Creates and returns a mult(iple) of the supplied channel. Channels
containing copies of the channel can be created with 'tap', and
detached with 'untap'.
Each item is distributed to all taps in parallel and synchronously,
i.e. each tap must accept before the next item is distributed. Use
buffering/windowing to prevent slow taps from holding up the mult.
Items received when there are no taps get dropped.
If a tap puts to a closed channel, it will be removed from the mult."
[ch]
(let [cs (atom {}) ;;ch->close?
m (reify
Mux
(muxch* [_] ch)
Mult
(tap* [_ ch close?] (swap! cs assoc ch close?) nil)
(untap* [_ ch] (swap! cs dissoc ch) nil)
(untap-all* [_] (reset! cs {}) nil))
dchan (chan 1)
dctr (atom nil)
done (fn [_] (when (zero? (swap! dctr dec))
(put! dchan true)))]
(go-loop []
(let [val (<! ch)]
(if (nil? val)
(doseq [[c close?] @cs]
(when close? (close! c)))
(let [chs (keys @cs)]
(reset! dctr (count chs))
(doseq [c chs]
(when-not (put! c val done)
(done nil)
(untap* m c)))
;;wait for all
(when (seq chs)
(<! dchan))
(recur)))))
m))
(defn tap
"Copies the mult source onto the supplied channel.
By default the channel will be closed when the source closes,
but can be determined by the close? parameter."
([mult ch] (tap mult ch true))
([mult ch close?] (tap* mult ch close?) ch))
(defn untap
"Disconnects a target channel from a mult"
[mult ch]
(untap* mult ch))
(defn untap-all
"Disconnects all target channels from a mult"
[mult] (untap-all* mult))
(defprotocol Mix
(admix* [m ch])
(unmix* [m ch])
(unmix-all* [m])
(toggle* [m state-map])
(solo-mode* [m mode]))
(defn ioc-alts! [state cont-block ports & {:as opts}]
(ioc/aset-all! state helpers/STATE-IDX cont-block)
(when-let [cb (cljs.core.async/do-alts
(fn [val]
(ioc/aset-all! state helpers/VALUE-IDX val)
(helpers/run-state-machine-wrapped state))
ports
opts)]
(ioc/aset-all! state helpers/VALUE-IDX @cb)
:recur))
(defn mix
"Creates and returns a mix of one or more input channels which will
be put on the supplied out channel. Input sources can be added to
the mix with 'admix', and removed with 'unmix'. A mix supports
soloing, muting and pausing multiple inputs atomically using
'toggle', and can solo using either muting or pausing as determined
by 'solo-mode'.
Each channel can have zero or more boolean modes set via 'toggle':
:solo - when true, only this (ond other soloed) channel(s) will appear
in the mix output channel. :mute and :pause states of soloed
channels are ignored. If solo-mode is :mute, non-soloed
channels are muted, if :pause, non-soloed channels are
paused.
:mute - muted channels will have their contents consumed but not included in the mix
:pause - paused channels will not have their contents consumed (and thus also not included in the mix)
"
[out]
(let [cs (atom {}) ;;ch->attrs-map
solo-modes #{:mute :pause}
attrs (conj solo-modes :solo)
solo-mode (atom :mute)
change (chan)
changed #(put! change true)
pick (fn [attr chs]
(reduce-kv
(fn [ret c v]
(if (attr v)
(conj ret c)
ret))
#{} chs))
calc-state (fn []
(let [chs @cs
mode @solo-mode
solos (pick :solo chs)
pauses (pick :pause chs)]
{:solos solos
:mutes (pick :mute chs)
:reads (conj
(if (and (= mode :pause) (not (empty? solos)))
(vec solos)
(vec (remove pauses (keys chs))))
change)}))
m (reify
Mux
(muxch* [_] out)
Mix
(admix* [_ ch] (swap! cs assoc ch {}) (changed))
(unmix* [_ ch] (swap! cs dissoc ch) (changed))
(unmix-all* [_] (reset! cs {}) (changed))
(toggle* [_ state-map] (swap! cs (partial merge-with cljs.core/merge) state-map) (changed))
(solo-mode* [_ mode]
(assert (solo-modes mode) (str "mode must be one of: " solo-modes))
(reset! solo-mode mode)
(changed)))]
(go-loop [{:keys [solos mutes reads] :as state} (calc-state)]
(let [[v c] (alts! reads)]
(if (or (nil? v) (= c change))
(do (when (nil? v)
(swap! cs dissoc c))
(recur (calc-state)))
(if (or (solos c)
(and (empty? solos) (not (mutes c))))
(when (>! out v)
(recur state))
(recur state)))))
m))
(defn admix
"Adds ch as an input to the mix"
[mix ch]
(admix* mix ch))
(defn unmix
"Removes ch as an input to the mix"
[mix ch]
(unmix* mix ch))
(defn unmix-all
"removes all inputs from the mix"
[mix]
(unmix-all* mix))
(defn toggle
"Atomically sets the state(s) of one or more channels in a mix. The
state map is a map of channels -> channel-state-map. A
channel-state-map is a map of attrs -> boolean, where attr is one or
more of :mute, :pause or :solo. Any states supplied are merged with
the current state.
Note that channels can be added to a mix via toggle, which can be
used to add channels in a particular (e.g. paused) state."
[mix state-map]
(toggle* mix state-map))
(defn solo-mode
"Sets the solo mode of the mix. mode must be one of :mute or :pause"
[mix mode]
(solo-mode* mix mode))
(defprotocol Pub
(sub* [p v ch close?])
(unsub* [p v ch])
(unsub-all* [p] [p v]))
(defn pub
"Creates and returns a pub(lication) of the supplied channel,
partitioned into topics by the topic-fn. topic-fn will be applied to
each value on the channel and the result will determine the 'topic'
on which that value will be put. Channels can be subscribed to
receive copies of topics using 'sub', and unsubscribed using
'unsub'. Each topic will be handled by an internal mult on a
dedicated channel. By default these internal channels are
unbuffered, but a buf-fn can be supplied which, given a topic,
creates a buffer with desired properties.
Each item is distributed to all subs in parallel and synchronously,
i.e. each sub must accept before the next item is distributed. Use
buffering/windowing to prevent slow subs from holding up the pub.
Items received when there are no matching subs get dropped.
Note that if buf-fns are used then each topic is handled
asynchronously, i.e. if a channel is subscribed to more than one
topic it should not expect them to be interleaved identically with
the source."
([ch topic-fn] (pub ch topic-fn (constantly nil)))
([ch topic-fn buf-fn]
(let [mults (atom {}) ;;topic->mult
ensure-mult (fn [topic]
(or (get @mults topic)
(get (swap! mults
#(if (% topic) % (assoc % topic (mult (chan (buf-fn topic))))))
topic)))
p (reify
Mux
(muxch* [_] ch)
Pub
(sub* [p topic ch close?]
(let [m (ensure-mult topic)]
(tap m ch close?)))
(unsub* [p topic ch]
(when-let [m (get @mults topic)]
(untap m ch)))
(unsub-all* [_] (reset! mults {}))
(unsub-all* [_ topic] (swap! mults dissoc topic)))]
(go-loop []
(let [val (<! ch)]
(if (nil? val)
(doseq [m (vals @mults)]
(close! (muxch* m)))
(let [topic (topic-fn val)
m (get @mults topic)]
(when m
(when-not (>! (muxch* m) val)
(swap! mults dissoc topic)))
(recur)))))
p)))
(defn sub
"Subscribes a channel to a topic of a pub.
By default the channel will be closed when the source closes,
but can be determined by the close? parameter."
([p topic ch] (sub p topic ch true))
([p topic ch close?] (sub* p topic ch close?)))
(defn unsub
"Unsubscribes a channel from a topic of a pub"
[p topic ch]
(unsub* p topic ch))
(defn unsub-all
"Unsubscribes all channels from a pub, or a topic of a pub"
([p] (unsub-all* p))
([p topic] (unsub-all* p topic)))
;;;;
(defn map
"Takes a function and a collection of source channels, and returns a
channel which contains the values produced by applying f to the set
of first items taken from each source channel, followed by applying
f to the set of second items from each channel, until any one of the
channels is closed, at which point the output channel will be
closed. The returned channel will be unbuffered by default, or a
buf-or-n can be supplied"
([f chs] (map f chs nil))
([f chs buf-or-n]
(let [chs (vec chs)
out (chan buf-or-n)
cnt (count chs)
rets (object-array cnt)
dchan (chan 1)
dctr (atom nil)
done (mapv (fn [i]
(fn [ret]
(aset rets i ret)
(when (zero? (swap! dctr dec))
(put! dchan (.slice rets 0)))))
(range cnt))]
(go-loop []
(reset! dctr cnt)
(dotimes [i cnt]
(try
(take! (chs i) (done i))
(catch js/Object e
(swap! dctr dec))))
(let [rets (<! dchan)]
(if (some nil? rets)
(close! out)
(do (>! out (apply f rets))
(recur)))))
out)))
(defn merge
"Takes a collection of source channels and returns a channel which
contains all values taken from them. The returned channel will be
unbuffered by default, or a buf-or-n can be supplied. The channel
will close after all the source channels have closed."
([chs] (merge chs nil))
([chs buf-or-n]
(let [out (chan buf-or-n)]
(go-loop [cs (vec chs)]
(if (pos? (count cs))
(let [[v c] (alts! cs)]
(if (nil? v)
(recur (filterv #(not= c %) cs))
(do (>! out v)
(recur cs))))
(close! out)))
out)))
(defn into
"Returns a channel containing the single (collection) result of the
items taken from the channel conjoined to the supplied
collection. ch must close before into produces a result."
[coll ch]
(reduce conj coll ch))
(defn take
"Returns a channel that will return, at most, n items from ch. After n items
have been returned, or ch has been closed, the return chanel will close.
The output channel is unbuffered by default, unless buf-or-n is given."
([n ch]
(take n ch nil))
([n ch buf-or-n]
(let [out (chan buf-or-n)]
(go (loop [x 0]
(when (< x n)
(let [v (<! ch)]
(when (not (nil? v))
(>! out v)
(recur (inc x))))))
(close! out))
out)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; deprecated - do not use ;;;;;;;;;;;;;;;;;;;;;;;;;
(defn map<
"Deprecated - this function will be removed. Use transducer instead"
[f ch]
(reify
impl/Channel
(close! [_] (impl/close! ch))
(closed? [_] (impl/closed? ch))
impl/ReadPort
(take! [_ fn1]
(let [ret
(impl/take! ch
(reify
impl/Handler
(active? [_] (impl/active? fn1))
(blockable? [_] true)
#_(lock-id [_] (impl/lock-id fn1))
(commit [_]
(let [f1 (impl/commit fn1)]
#(f1 (if (nil? %) nil (f %)))))))]
(if (and ret (not (nil? @ret)))
(channels/box (f @ret))
ret)))
impl/WritePort
(put! [_ val fn1] (impl/put! ch val fn1))))
(defn map>
"Deprecated - this function will be removed. Use transducer instead"
[f ch]
(reify
impl/Channel
(close! [_] (impl/close! ch))
impl/ReadPort
(take! [_ fn1] (impl/take! ch fn1))
impl/WritePort
(put! [_ val fn1]
(impl/put! ch (f val) fn1))))
(defn filter>
"Deprecated - this function will be removed. Use transducer instead"
[p ch]
(reify
impl/Channel
(close! [_] (impl/close! ch))
(closed? [_] (impl/closed? ch))
impl/ReadPort
(take! [_ fn1] (impl/take! ch fn1))
impl/WritePort
(put! [_ val fn1]
(if (p val)
(impl/put! ch val fn1)
(channels/box (not (impl/closed? ch)))))))
(defn remove>
"Deprecated - this function will be removed. Use transducer instead"
[p ch]
(filter> (complement p) ch))
(defn filter<
"Deprecated - this function will be removed. Use transducer instead"
([p ch] (filter< p ch nil))
([p ch buf-or-n]
(let [out (chan buf-or-n)]
(go-loop []
(let [val (<! ch)]
(if (nil? val)
(close! out)
(do (when (p val)
(>! out val))
(recur)))))
out)))
(defn remove<
"Deprecated - this function will be removed. Use transducer instead"
([p ch] (remove< p ch nil))
([p ch buf-or-n] (filter< (complement p) ch buf-or-n)))
(defn- mapcat* [f in out]
(go-loop []
(let [val (<! in)]
(if (nil? val)
(close! out)
(do (doseq [v (f val)]
(>! out v))
(when-not (impl/closed? out)
(recur)))))))
(defn mapcat<
"Deprecated - this function will be removed. Use transducer instead"
([f in] (mapcat< f in nil))
([f in buf-or-n]
(let [out (chan buf-or-n)]
(mapcat* f in out)
out)))
(defn mapcat>
"Deprecated - this function will be removed. Use transducer instead"
([f out] (mapcat> f out nil))
([f out buf-or-n]
(let [in (chan buf-or-n)]
(mapcat* f in out)
in)))
(defn unique
"Deprecated - this function will be removed. Use transducer instead"
([ch]
(unique ch nil))
([ch buf-or-n]
(let [out (chan buf-or-n)]
(go (loop [last nil]
(let [v (<! ch)]
(when (not (nil? v))
(if (= v last)
(recur last)
(do (>! out v)
(recur v))))))
(close! out))
out)))
(defn partition
"Deprecated - this function will be removed. Use transducer instead"
([n ch]
(partition n ch nil))
([n ch buf-or-n]
(let [out (chan buf-or-n)]
(go (loop [arr (make-array n)
idx 0]
(let [v (<! ch)]
(if (not (nil? v))
(do (aset ^objects arr idx v)
(let [new-idx (inc idx)]
(if (< new-idx n)
(recur arr new-idx)
(do (>! out (vec arr))
(recur (make-array n) 0)))))
(do (when (> idx 0)
(>! out (vec arr)))
(close! out))))))
out)))
(defn partition-by
"Deprecated - this function will be removed. Use transducer instead"
([f ch]
(partition-by f ch nil))
([f ch buf-or-n]
(let [out (chan buf-or-n)]
(go (loop [lst (make-array 0)
last ::nothing]
(let [v (<! ch)]
(if (not (nil? v))
(let [new-itm (f v)]
(if (or (= new-itm last)
(keyword-identical? last ::nothing))
(do (.push lst v)
(recur lst new-itm))
(do (>! out (vec lst))
(let [new-lst (make-array 0)]
(.push new-lst v)
(recur new-lst new-itm)))))
(do (when (> (alength lst) 0)
(>! out (vec lst)))
(close! out))))))
out)))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}, Array {}, Object {}}, :use-macros {go cljs.core.async.macros, go-loop cljs.core.async.macros}, :excludes #{reduce take map transduce into partition merge partition-by}, :name cljs.core.async, :imports nil, :requires {cljs.core.async.impl.channels cljs.core.async.impl.channels, cljs.core.async.impl.dispatch cljs.core.async.impl.dispatch, helpers cljs.core.async.impl.ioc-helpers, impl cljs.core.async.impl.protocols, channels cljs.core.async.impl.channels, cljs.core.async.impl.buffers cljs.core.async.impl.buffers, cljs.core.async.impl.protocols cljs.core.async.impl.protocols, timers cljs.core.async.impl.timers, dispatch cljs.core.async.impl.dispatch, cljs.core.async.impl.ioc-helpers cljs.core.async.impl.ioc-helpers, buffers cljs.core.async.impl.buffers, cljs.core.async.impl.timers cljs.core.async.impl.timers}, :cljs.spec/speced-vars [], :uses nil, :defs {Pub {:meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async.cljs", :line 599, :column 14, :end-line 599, :end-column 17, :doc nil, :protocol-symbol true, :jsdoc ("@interface"), :protocol-info {:methods {sub* [[p v ch close?]], unsub* [[p v ch]], unsub-all* [[p] [p v]]}}}, :protocol-symbol true, :name cljs.core.async/Pub, :file "target/cljsbuild/public/js/out/cljs/core/async.cljs", :end-column 17, :column 1, :line 599, :protocol-info {:methods {sub* [[p v ch close?]], unsub* [[p v ch]], unsub-all* [[p] [p v]]}}, :info nil, :end-line 599, :tag any, :impls #{cljs.core.async/t_cljs$core$async43363}, :doc nil, :jsdoc ("@interface")}, ->t_cljs$core$async43744 {:protocol-inline nil, :meta {:anonymous true, :protocols #{cljs.core.async.impl.protocols/Channel cljs.core.async.impl.protocols/WritePort cljs.core.async.impl.protocols/ReadPort cljs.core/IMeta cljs.core/IWithMeta}, :skip-protocol-flag #{cljs.core/IMeta cljs.core/IWithMeta}, :factory :positional, :arglists (quote ([p ch meta43745])), :file nil}, :protocols #{cljs.core.async.impl.protocols/Channel cljs.core.async.impl.protocols/WritePort cljs.core.async.impl.protocols/ReadPort cljs.core/IMeta cljs.core/IWithMeta}, :name cljs.core.async/->t_cljs$core$async43744, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async.cljs", :method-params ([p ch meta43745]), :protocol-impl nil, :arglists-meta (nil nil), :anonymous true, :column 3, :factory :positional, :line 805, :max-fixed-arity 3, :fn-var true, :arglists (quote ([p ch meta43745])), :skip-protocol-flag #{cljs.core/IMeta cljs.core/IWithMeta}}, reduce {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async.cljs", :line 359, :column 7, :end-line 359, :end-column 13, :arglists (quote ([f init ch])), :doc "f should be a function of 2 arguments. Returns a channel containing\n the single result of applying f to init and the first item from the\n channel, then applying f to that result and the 2nd item, etc. If\n the channel closes without yielding items, returns init and f is not\n called. ch must close before reduce produces a result."}, :name cljs.core.async/reduce, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async.cljs", :end-column 13, :method-params ([f init ch]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 359, :end-line 359, :max-fixed-arity 3, :fn-var true, :arglists (quote ([f init ch])), :doc "f should be a function of 2 arguments. Returns a channel containing\n the single result of applying f to init and the first item from the\n channel, then applying f to that result and the 2nd item, etc. If\n the channel closes without yielding items, returns init and f is not\n called. ch must close before reduce produces a result."}, remove> {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async.cljs", :line 819, :column 7, :end-line 819, :end-column 14, :arglists (quote ([p ch])), :doc "Deprecated - this function will be removed. Use transducer instead"}, :name cljs.core.async/remove>, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async.cljs", :end-column 14, :method-params ([p ch]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 819, :end-line 819, :max-fixed-arity 2, :fn-var true, :arglists (quote ([p ch])), :doc "Deprecated - this function will be removed. Use transducer instead"}, timeout {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async.cljs", :line 78, :column 7, :end-line 78, :end-column 14, :arglists (quote ([msecs])), :doc "Returns a channel that will close after msecs"}, :name cljs.core.async/timeout, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async.cljs", :end-column 14, :method-params ([msecs]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 78, :end-line 78, :max-fixed-arity 1, :fn-var true, :arglists (quote ([msecs])), :doc "Returns a channel thLine truncated
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/core\/async.js","sources":["async.cljs?rel=1517021946128"],"lineCount":9016,"mappings":";AAAA;;;;;;;;AAWA,AAAA,6BAAA,qCAAAA,lEAAOE;AAAP,AAAA,IAAAD,WAAA,AAAA;AAAA,AAAA,QAAAA;KAAA;AAAA,OAAAC,yDAAA,CAAA,UAAA;;;KAAA;AAAA,OAAAA,yDAAA,CAAA,UAAA,MAAA,CAAA,UAAA;;;;AAAA,MAAA,KAAAC,MAAA,CAAA,8DAAA,AAAA;;;;;AAAA,AAAA,2DAAA,3DAAOD,sEACHE;AADJ,AACO,8CAAA,vCAACF,qCAAWE;;;AADnB,AAAA,2DAAA,3DAAOF,sEAEHE,EAAEC;AAFN,AAGG,AAAA,GAAA,OAAAC;AAAA;AAAA,AAAA,AAAA;;;;;;;;;;;;;;AAAA,AAAA,AAAA,AAAA,AAAAA,0FAAA,WAAAC,OAAAC;;AAAA,AAAA,IAAAD,aAAA;mDADCH,SAAEC,5DACH,AAAA,YAAAC,iEAAAE;;;AAAA,AAAA,AAA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,yBAAEkC,EAAEjD;AACP6C;;AACA,AACE,IAAMK,IAAE,AAACC,6BAASF;AAAlB,AACE,CAAMJ,EAAEI,KAAE,CAAMJ,EAAEK;;AAClB,CAAML,EAAEK,KAAED;;AACV,eAAO,KAAA,JAAKA;;;;;;;AAExLine truncated
@@ -0,0 +1,159 @@
;; Copyright (c) Rich Hickey and contributors. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.core.async.impl.buffers
(:require [cljs.core.async.impl.protocols :as impl]))
;; -----------------------------------------------------------------------------
;; DO NOT USE, this is internal buffer representation
(defn acopy [src src-start dest dest-start len]
(loop [cnt 0]
(when (< cnt len)
(aset dest
(+ dest-start cnt)
(aget src (+ src-start cnt)))
(recur (inc cnt)))))
(deftype RingBuffer [^:mutable head ^:mutable tail ^:mutable length ^:mutable arr]
Object
(pop [_]
(when-not (zero? length)
(let [x (aget arr tail)]
(aset arr tail nil)
(set! tail (js-mod (inc tail) (alength arr)))
(set! length (dec length))
x)))
(unshift [_ x]
(aset arr head x)
(set! head (js-mod (inc head) (alength arr)))
(set! length (inc length))
nil)
(unbounded-unshift [this x]
(if (== (inc length) (alength arr))
(.resize this))
(.unshift this x))
;; Doubles the size of the buffer while retaining all the existing values
(resize
[_]
(let [new-arr-size (* (alength arr) 2)
new-arr (make-array new-arr-size)]
(cond
(< tail head)
(do (acopy arr tail new-arr 0 length)
(set! tail 0)
(set! head length)
(set! arr new-arr))
(> tail head)
(do (acopy arr tail new-arr 0 (- (alength arr) tail))
(acopy arr 0 new-arr (- (alength arr) tail) head)
(set! tail 0)
(set! head length)
(set! arr new-arr))
(== tail head)
(do (set! tail 0)
(set! head 0)
(set! arr new-arr)))))
(cleanup [this keep?]
(dotimes [x length]
(let [v (.pop this)]
(when ^boolean (keep? v)
(.unshift this v))))))
(defn ring-buffer [n]
(assert (> n 0) "Can't create a ring buffer of size 0")
(RingBuffer. 0 0 0 (make-array n)))
;; -----------------------------------------------------------------------------
(deftype FixedBuffer [buf n]
impl/Buffer
(full? [this]
(== (.-length buf) n))
(remove! [this]
(.pop buf))
(add!* [this itm]
(.unbounded-unshift buf itm)
this)
(close-buf! [this])
cljs.core/ICounted
(-count [this]
(.-length buf)))
(defn fixed-buffer [n]
(FixedBuffer. (ring-buffer n) n))
(deftype DroppingBuffer [buf n]
impl/UnblockingBuffer
impl/Buffer
(full? [this]
false)
(remove! [this]
(.pop buf))
(add!* [this itm]
(when-not (== (.-length buf) n)
(.unshift buf itm))
this)
(close-buf! [this])
cljs.core/ICounted
(-count [this]
(.-length buf)))
(defn dropping-buffer [n]
(DroppingBuffer. (ring-buffer n) n))
(deftype SlidingBuffer [buf n]
impl/UnblockingBuffer
impl/Buffer
(full? [this]
false)
(remove! [this]
(.pop buf))
(add!* [this itm]
(when (== (.-length buf) n)
(impl/remove! this))
(.unshift buf itm)
this)
(close-buf! [this])
cljs.core/ICounted
(-count [this]
(.-length buf)))
(defn sliding-buffer [n]
(SlidingBuffer. (ring-buffer n) n))
(defonce ^:private NO-VAL (js/Object.))
(defn- undelivered? [val]
(identical? NO-VAL val))
(deftype PromiseBuffer [^:mutable val]
impl/UnblockingBuffer
impl/Buffer
(full? [_]
false)
(remove! [_]
val)
(add!* [this itm]
(when (undelivered? val)
(set! val itm))
this)
(close-buf! [_]
(when (undelivered? val)
(set! val nil)))
cljs.core/ICounted
(-count [_]
(if (undelivered? val) 0 1)))
(defn promise-buffer []
(PromiseBuffer. NO-VAL))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Array {}, Error {}, Object {}}, :use-macros {}, :excludes #{}, :name cljs.core.async.impl.buffers, :imports nil, :requires {impl cljs.core.async.impl.protocols, cljs.core.async.impl.protocols cljs.core.async.impl.protocols}, :cljs.spec/speced-vars [], :uses nil, :defs {->PromiseBuffer {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :line 140, :column 10, :end-line 140, :end-column 23, :protocols #{cljs.core/ICounted cljs.core.async.impl.protocols/UnblockingBuffer cljs.core.async.impl.protocols/Buffer}, :skip-protocol-flag #{cljs.core/ICounted}, :factory :positional, :arglists (quote ([val]))}, :protocols #{cljs.core/ICounted cljs.core.async.impl.protocols/UnblockingBuffer cljs.core.async.impl.protocols/Buffer}, :name cljs.core.async.impl.buffers/->PromiseBuffer, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :end-column 23, :method-params ([val]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :factory :positional, :line 140, :end-line 140, :max-fixed-arity 1, :fn-var true, :arglists (quote ([val])), :skip-protocol-flag #{cljs.core/ICounted}}, RingBuffer {:num-fields 4, :protocols #{cljs.core.async.impl.buffers/Object}, :name cljs.core.async.impl.buffers/RingBuffer, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :end-column 20, :type true, :column 10, :line 23, :record false, :end-line 23, :skip-protocol-flag nil}, undelivered? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :line 137, :column 8, :end-line 137, :end-column 20, :private true, :arglists (quote ([val]))}, :private true, :name cljs.core.async.impl.buffers/undelivered?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :end-column 20, :method-params ([val]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 137, :end-line 137, :max-fixed-arity 1, :fn-var true, :arglists (quote ([val]))}, ->DroppingBuffer {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :line 97, :column 10, :end-line 97, :end-column 24, :protocols #{cljs.core/ICounted cljs.core.async.impl.protocols/UnblockingBuffer cljs.core.async.impl.protocols/Buffer}, :skip-protocol-flag #{cljs.core/ICounted}, :factory :positional, :arglists (quote ([buf n]))}, :protocols #{cljs.core/ICounted cljs.core.async.impl.protocols/UnblockingBuffer cljs.core.async.impl.protocols/Buffer}, :name cljs.core.async.impl.buffers/->DroppingBuffer, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :end-column 24, :method-params ([buf n]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :factory :positional, :line 97, :end-line 97, :max-fixed-arity 2, :fn-var true, :arglists (quote ([buf n])), :skip-protocol-flag #{cljs.core/ICounted}}, dropping-buffer {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :line 113, :column 7, :end-line 113, :end-column 22, :arglists (quote ([n]))}, :name cljs.core.async.impl.buffers/dropping-buffer, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :end-column 22, :method-params ([n]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 113, :end-line 113, :max-fixed-arity 1, :fn-var true, :arglists (quote ([n]))}, fixed-buffer {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :line 94, :column 7, :end-line 94, :end-column 19, :arglists (quote ([n]))}, :name cljs.core.async.impl.buffers/fixed-buffer, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :end-column 19, :method-params ([n]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 94, :end-line 94, :max-fixed-arity 1, :fn-var true, :arglists (quote ([n]))}, ->FixedBuffer {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :line 80, :column 10, :end-line 80, :end-column 21, :protocols #{cljs.core/ICounted cljs.core.async.impl.protocols/Buffer}, :skip-protocol-flag #{cljs.core/ICounted}, :factory :positional, :arglists (quote ([buf n]))}, :protocols #{cljs.core/ICounted cljs.core.async.impl.protocols/Buffer}, :name cljs.core.async.impl.buffers/->FixedBuffer, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/buffers.cljs", :end-column 21, :method-params ([buf n]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :factory :positional, :line 80, :end-line 80, :max-fixed-arity 2, :fn-var true, :arglists (quote ([buf n])), :skip-protocol-flag #{cljs.core/ICounteLine truncated
+451
View File
@@ -0,0 +1,451 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.core.async.impl.buffers');
goog.require('cljs.core');
goog.require('cljs.core.async.impl.protocols');
cljs.core.async.impl.buffers.acopy = (function cljs$core$async$impl$buffers$acopy(src,src_start,dest,dest_start,len){
var cnt = (0);
while(true){
if((cnt < len)){
(dest[(dest_start + cnt)] = (src[(src_start + cnt)]));
var G__40835 = (cnt + (1));
cnt = G__40835;
continue;
} else {
return null;
}
break;
}
});
/**
* @constructor
* @implements {cljs.core.async.impl.buffers.Object}
*/
cljs.core.async.impl.buffers.RingBuffer = (function (head,tail,length,arr){
this.head = head;
this.tail = tail;
this.length = length;
this.arr = arr;
});
cljs.core.async.impl.buffers.RingBuffer.prototype.pop = (function (){
var self__ = this;
var _ = this;
if((self__.length === (0))){
return null;
} else {
var x = (self__.arr[self__.tail]);
(self__.arr[self__.tail] = null);
self__.tail = ((self__.tail + (1)) % self__.arr.length);
self__.length = (self__.length - (1));
return x;
}
});
cljs.core.async.impl.buffers.RingBuffer.prototype.unshift = (function (x){
var self__ = this;
var _ = this;
(self__.arr[self__.head] = x);
self__.head = ((self__.head + (1)) % self__.arr.length);
self__.length = (self__.length + (1));
return null;
});
cljs.core.async.impl.buffers.RingBuffer.prototype.unbounded_unshift = (function (x){
var self__ = this;
var this$ = this;
if(((self__.length + (1)) === self__.arr.length)){
this$.resize();
} else {
}
return this$.unshift(x);
});
cljs.core.async.impl.buffers.RingBuffer.prototype.resize = (function (){
var self__ = this;
var _ = this;
var new_arr_size = (self__.arr.length * (2));
var new_arr = (new Array(new_arr_size));
if((self__.tail < self__.head)){
cljs.core.async.impl.buffers.acopy.call(null,self__.arr,self__.tail,new_arr,(0),self__.length);
self__.tail = (0);
self__.head = self__.length;
return self__.arr = new_arr;
} else {
if((self__.tail > self__.head)){
cljs.core.async.impl.buffers.acopy.call(null,self__.arr,self__.tail,new_arr,(0),(self__.arr.length - self__.tail));
cljs.core.async.impl.buffers.acopy.call(null,self__.arr,(0),new_arr,(self__.arr.length - self__.tail),self__.head);
self__.tail = (0);
self__.head = self__.length;
return self__.arr = new_arr;
} else {
if((self__.tail === self__.head)){
self__.tail = (0);
self__.head = (0);
return self__.arr = new_arr;
} else {
return null;
}
}
}
});
cljs.core.async.impl.buffers.RingBuffer.prototype.cleanup = (function (keep_QMARK_){
var self__ = this;
var this$ = this;
var n__36543__auto__ = self__.length;
var x = (0);
while(true){
if((x < n__36543__auto__)){
var v_40836 = this$.pop();
if(keep_QMARK_.call(null,v_40836)){
this$.unshift(v_40836);
} else {
}
var G__40837 = (x + (1));
x = G__40837;
continue;
} else {
return null;
}
break;
}
});
cljs.core.async.impl.buffers.RingBuffer.getBasis = (function (){
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null,"head","head",869147608,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"tail","tail",494507963,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"length","length",-2065447907,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"arr","arr",2115492975,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null))], null);
});
cljs.core.async.impl.buffers.RingBuffer.cljs$lang$type = true;
cljs.core.async.impl.buffers.RingBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/RingBuffer";
cljs.core.async.impl.buffers.RingBuffer.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.buffers/RingBuffer");
});
cljs.core.async.impl.buffers.__GT_RingBuffer = (function cljs$core$async$impl$buffers$__GT_RingBuffer(head,tail,length,arr){
return (new cljs.core.async.impl.buffers.RingBuffer(head,tail,length,arr));
});
cljs.core.async.impl.buffers.ring_buffer = (function cljs$core$async$impl$buffers$ring_buffer(n){
if((n > (0))){
} else {
throw (new Error(["Assert failed: ","Can't create a ring buffer of size 0","\n","(> n 0)"].join('')));
}
return (new cljs.core.async.impl.buffers.RingBuffer((0),(0),(0),(new Array(n))));
});
/**
* @constructor
* @implements {cljs.core.ICounted}
* @implements {cljs.core.async.impl.protocols.Buffer}
*/
cljs.core.async.impl.buffers.FixedBuffer = (function (buf,n){
this.buf = buf;
this.n = n;
this.cljs$lang$protocol_mask$partition0$ = 2;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return (self__.buf.length === self__.n);
});
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return self__.buf.pop();
});
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 = (function (this$,itm){
var self__ = this;
var this$__$1 = this;
self__.buf.unbounded_unshift(itm);
return this$__$1;
});
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return null;
});
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return self__.buf.length;
});
cljs.core.async.impl.buffers.FixedBuffer.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"buf","buf",1426618187,null),new cljs.core.Symbol(null,"n","n",-2092305744,null)], null);
});
cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$type = true;
cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/FixedBuffer";
cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.buffers/FixedBuffer");
});
cljs.core.async.impl.buffers.__GT_FixedBuffer = (function cljs$core$async$impl$buffers$__GT_FixedBuffer(buf,n){
return (new cljs.core.async.impl.buffers.FixedBuffer(buf,n));
});
cljs.core.async.impl.buffers.fixed_buffer = (function cljs$core$async$impl$buffers$fixed_buffer(n){
return (new cljs.core.async.impl.buffers.FixedBuffer(cljs.core.async.impl.buffers.ring_buffer.call(null,n),n));
});
/**
* @constructor
* @implements {cljs.core.ICounted}
* @implements {cljs.core.async.impl.protocols.UnblockingBuffer}
* @implements {cljs.core.async.impl.protocols.Buffer}
*/
cljs.core.async.impl.buffers.DroppingBuffer = (function (buf,n){
this.buf = buf;
this.n = n;
this.cljs$lang$protocol_mask$partition0$ = 2;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$UnblockingBuffer$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return false;
});
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return self__.buf.pop();
});
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 = (function (this$,itm){
var self__ = this;
var this$__$1 = this;
if((self__.buf.length === self__.n)){
} else {
self__.buf.unshift(itm);
}
return this$__$1;
});
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return null;
});
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return self__.buf.length;
});
cljs.core.async.impl.buffers.DroppingBuffer.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"buf","buf",1426618187,null),new cljs.core.Symbol(null,"n","n",-2092305744,null)], null);
});
cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$type = true;
cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/DroppingBuffer";
cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.buffers/DroppingBuffer");
});
cljs.core.async.impl.buffers.__GT_DroppingBuffer = (function cljs$core$async$impl$buffers$__GT_DroppingBuffer(buf,n){
return (new cljs.core.async.impl.buffers.DroppingBuffer(buf,n));
});
cljs.core.async.impl.buffers.dropping_buffer = (function cljs$core$async$impl$buffers$dropping_buffer(n){
return (new cljs.core.async.impl.buffers.DroppingBuffer(cljs.core.async.impl.buffers.ring_buffer.call(null,n),n));
});
/**
* @constructor
* @implements {cljs.core.ICounted}
* @implements {cljs.core.async.impl.protocols.UnblockingBuffer}
* @implements {cljs.core.async.impl.protocols.Buffer}
*/
cljs.core.async.impl.buffers.SlidingBuffer = (function (buf,n){
this.buf = buf;
this.n = n;
this.cljs$lang$protocol_mask$partition0$ = 2;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$UnblockingBuffer$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return false;
});
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return self__.buf.pop();
});
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 = (function (this$,itm){
var self__ = this;
var this$__$1 = this;
if((self__.buf.length === self__.n)){
cljs.core.async.impl.protocols.remove_BANG_.call(null,this$__$1);
} else {
}
self__.buf.unshift(itm);
return this$__$1;
});
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return null;
});
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
return self__.buf.length;
});
cljs.core.async.impl.buffers.SlidingBuffer.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"buf","buf",1426618187,null),new cljs.core.Symbol(null,"n","n",-2092305744,null)], null);
});
cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$type = true;
cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/SlidingBuffer";
cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.buffers/SlidingBuffer");
});
cljs.core.async.impl.buffers.__GT_SlidingBuffer = (function cljs$core$async$impl$buffers$__GT_SlidingBuffer(buf,n){
return (new cljs.core.async.impl.buffers.SlidingBuffer(buf,n));
});
cljs.core.async.impl.buffers.sliding_buffer = (function cljs$core$async$impl$buffers$sliding_buffer(n){
return (new cljs.core.async.impl.buffers.SlidingBuffer(cljs.core.async.impl.buffers.ring_buffer.call(null,n),n));
});
if(typeof cljs.core.async.impl.buffers.NO_VAL !== 'undefined'){
} else {
cljs.core.async.impl.buffers.NO_VAL = (new Object());
}
cljs.core.async.impl.buffers.undelivered_QMARK_ = (function cljs$core$async$impl$buffers$undelivered_QMARK_(val){
return (cljs.core.async.impl.buffers.NO_VAL === val);
});
/**
* @constructor
* @implements {cljs.core.ICounted}
* @implements {cljs.core.async.impl.protocols.UnblockingBuffer}
* @implements {cljs.core.async.impl.protocols.Buffer}
*/
cljs.core.async.impl.buffers.PromiseBuffer = (function (val){
this.val = val;
this.cljs$lang$protocol_mask$partition0$ = 2;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$UnblockingBuffer$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
return false;
});
cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
return self__.val;
});
cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 = (function (this$,itm){
var self__ = this;
var this$__$1 = this;
if(cljs.core.truth_(cljs.core.async.impl.buffers.undelivered_QMARK_.call(null,self__.val))){
self__.val = itm;
} else {
}
return this$__$1;
});
cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
if(cljs.core.truth_(cljs.core.async.impl.buffers.undelivered_QMARK_.call(null,self__.val))){
return self__.val = null;
} else {
return null;
}
});
cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
if(cljs.core.truth_(cljs.core.async.impl.buffers.undelivered_QMARK_.call(null,self__.val))){
return (0);
} else {
return (1);
}
});
cljs.core.async.impl.buffers.PromiseBuffer.getBasis = (function (){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null,"val","val",1769233139,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null))], null);
});
cljs.core.async.impl.buffers.PromiseBuffer.cljs$lang$type = true;
cljs.core.async.impl.buffers.PromiseBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/PromiseBuffer";
cljs.core.async.impl.buffers.PromiseBuffer.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.buffers/PromiseBuffer");
});
cljs.core.async.impl.buffers.__GT_PromiseBuffer = (function cljs$core$async$impl$buffers$__GT_PromiseBuffer(val){
return (new cljs.core.async.impl.buffers.PromiseBuffer(val));
});
cljs.core.async.impl.buffers.promise_buffer = (function cljs$core$async$impl$buffers$promise_buffer(){
return (new cljs.core.async.impl.buffers.PromiseBuffer(cljs.core.async.impl.buffers.NO_VAL));
});
//# sourceMappingURL=buffers.js.map?rel=1517021944749
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/core\/async\/impl\/buffers.js","sources":["buffers.cljs?rel=1517021944750"],"lineCount":451,"mappings":";AAQA;;;AAMA,qCAAA,rCAAMA,kFAAOC,IAAIC,UAAUC,KAAKC,WAAWC;AAA3C,AACE,UAAA,NAAOC;;AAAP,AACE,GAAM,CAAGA,MAAID;AAAb,AACE,CAAMF,KACA,CAAGC,aAAWE,QACd,CAAML,IAAI,CAAGC,YAAUI;;AAC7B,eAAO,OAAA,NAAKA;;;;AAJd;;;;;AAMJ,AAAA;;;;;;;;;;;AAAA,AAAA,AAAA,AAAA,wDAAA,xDAASK;;AAAT,AAAA,QAAA,JAEQM;AAFR,AAGI,GAAU,mBAAA,lBAAOF;AAAjB;;AAAA,AACE,IAAMG,IAAE,CAAMF,WAAIF;AAAlB,AACE,2BAAA,1BAAME,WAAIF;;AACV,AAAMA,cAAK,CAAQ,eAAA,dAAKA,qBAAM,AAASE;;AACvC,AAAMD,gBAAO,iBAAA,hBAAKA;;AAClBG;;;;AARR,AAAA,AAAA,4DAAA,5DAASP,uEAUKO;;AAVd,AAAA,QAAA,JAUYD;AAVZ,AAWI,CAAMD,WAAIH,eAAKK;;AACf,AAAML,cAAK,CAAQ,eAAA,dAAKA,qBAAM,AAASG;;AACvC,AAAMD,gBAAO,iBAAA,hBAAKA;;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FAASiB;Line truncated
@@ -0,0 +1,192 @@
;; Copyright (c) Rich Hickey and contributors. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.core.async.impl.channels
(:require [cljs.core.async.impl.protocols :as impl]
[cljs.core.async.impl.dispatch :as dispatch]
[cljs.core.async.impl.buffers :as buffers]))
(defn box [val]
(reify cljs.core/IDeref
(-deref [_] val)))
(deftype PutBox [handler val])
(defn put-active? [box]
(impl/active? (.-handler box)))
(def ^:const MAX_DIRTY 64)
(defprotocol MMC
(abort [this]))
(deftype ManyToManyChannel [takes ^:mutable dirty-takes puts ^:mutable dirty-puts ^not-native buf ^:mutable closed add!]
MMC
(abort [this]
(loop []
(let [putter (.pop puts)]
(when-not (nil? putter)
(let [^not-native put-handler (.-handler putter)
val (.-val putter)]
(if ^boolean (impl/active? put-handler)
(let [put-cb (impl/commit put-handler)]
(dispatch/run #(put-cb true)))
(recur))))))
(.cleanup puts (constantly false))
(impl/close! this))
impl/WritePort
(put! [this val ^not-native handler]
(assert (not (nil? val)) "Can't put nil in on a channel")
;; bug in CLJS compiler boolean inference - David
(let [^boolean closed closed]
(if (or closed (not ^boolean (impl/active? handler)))
(box (not closed))
(if (and buf (not (impl/full? buf)))
(do
(impl/commit handler)
(let [done? (reduced? (add! buf val))
take-cbs (loop [takers []]
(if (and (pos? (.-length takes)) (pos? (count buf)))
(let [^not-native taker (.pop takes)]
(if ^boolean (impl/active? taker)
(let [ret (impl/commit taker)
val (impl/remove! buf)]
(recur (conj takers (fn [] (ret val)))))
(recur takers)))
takers))]
(when done? (abort this))
(when (seq take-cbs)
(doseq [f take-cbs]
(dispatch/run f)))
(box true)))
(let [taker (loop []
(let [^not-native taker (.pop takes)]
(when taker
(if (impl/active? taker)
taker
(recur)))))]
(if taker
(let [take-cb (impl/commit taker)]
(impl/commit handler)
(dispatch/run (fn [] (take-cb val)))
(box true))
(do
(if (> dirty-puts MAX_DIRTY)
(do (set! dirty-puts 0)
(.cleanup puts put-active?))
(set! dirty-puts (inc dirty-puts)))
(when (impl/blockable? handler)
(assert (< (.-length puts) impl/MAX-QUEUE-SIZE)
(str "No more than " impl/MAX-QUEUE-SIZE
" pending puts are allowed on a single channel."
" Consider using a windowed buffer."))
(.unbounded-unshift puts (PutBox. handler val)))
nil)))))))
impl/ReadPort
(take! [this ^not-native handler]
(if (not ^boolean (impl/active? handler))
nil
(if (and (not (nil? buf)) (pos? (count buf)))
(do
(if-let [take-cb (impl/commit handler)]
(let [val (impl/remove! buf)
[done? cbs] (when (pos? (.-length puts))
(loop [cbs []]
(let [putter (.pop puts)
^not-native put-handler (.-handler putter)
val (.-val putter)
cb (and ^boolean (impl/active? put-handler) (impl/commit put-handler))
cbs (if cb (conj cbs cb) cbs)
done? (when cb (reduced? (add! buf val)))]
(if (and (not done?) (not (impl/full? buf)) (pos? (.-length puts)))
(recur cbs)
[done? cbs]))))]
(when done?
(abort this))
(doseq [cb cbs]
(dispatch/run #(cb true)))
(box val))))
(let [putter (loop []
(let [putter (.pop puts)]
(when putter
(if ^boolean (impl/active? (.-handler putter))
putter
(recur)))))]
(if putter
(let [put-cb (impl/commit (.-handler putter))]
(impl/commit handler)
(dispatch/run #(put-cb true))
(box (.-val putter)))
(if closed
(do
(when buf (add! buf))
(if (and (impl/active? handler) (impl/commit handler))
(let [has-val (and buf (pos? (count buf)))]
(let [val (when has-val (impl/remove! buf))]
(box val)))
nil))
(do
(if (> dirty-takes MAX_DIRTY)
(do (set! dirty-takes 0)
(.cleanup takes impl/active?))
(set! dirty-takes (inc dirty-takes)))
(when (impl/blockable? handler)
(assert (< (.-length takes) impl/MAX-QUEUE-SIZE)
(str "No more than " impl/MAX-QUEUE-SIZE
" pending takes are allowed on a single channel."))
(.unbounded-unshift takes handler))
nil)))))))
impl/Channel
(closed? [_] closed)
(close! [this]
(if ^boolean closed
nil
(do (set! closed true)
(when (and buf (zero? (.-length puts)))
(add! buf))
(loop []
(let [^not-native taker (.pop takes)]
(when-not (nil? taker)
(when ^boolean (impl/active? taker)
(let [take-cb (impl/commit taker)
val (when (and buf (pos? (count buf))) (impl/remove! buf))]
(dispatch/run (fn [] (take-cb val)))))
(recur))))
(when buf (impl/close-buf! buf))
nil))))
(defn- ex-handler [ex]
(.log js/console ex)
nil)
(defn- handle [buf exh t]
(let [else ((or exh ex-handler) t)]
(if (nil? else)
buf
(impl/add! buf else))))
(defn chan
([buf] (chan buf nil))
([buf xform] (chan buf xform nil))
([buf xform exh]
(ManyToManyChannel. (buffers/ring-buffer 32) 0 (buffers/ring-buffer 32)
0 buf false
(let [add! (if xform (xform impl/add!) impl/add!)]
(fn
([buf]
(try
(add! buf)
(catch :default t
(handle buf exh t))))
([buf val]
(try
(add! buf val)
(catch :default t
(handle buf exh t)))))))))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}, console {log {}}}, :use-macros {}, :excludes #{}, :name cljs.core.async.impl.channels, :imports nil, :requires {impl cljs.core.async.impl.protocols, cljs.core.async.impl.protocols cljs.core.async.impl.protocols, dispatch cljs.core.async.impl.dispatch, cljs.core.async.impl.dispatch cljs.core.async.impl.dispatch, buffers cljs.core.async.impl.buffers, cljs.core.async.impl.buffers cljs.core.async.impl.buffers}, :cljs.spec/speced-vars [], :uses nil, :defs {put-active? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :line 22, :column 7, :end-line 22, :end-column 18, :arglists (quote ([box]))}, :name cljs.core.async.impl.channels/put-active?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :end-column 18, :method-params ([box]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 22, :end-line 22, :max-fixed-arity 1, :fn-var true, :arglists (quote ([box]))}, chan {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :line 175, :column 7, :end-line 175, :end-column 11, :arglists (quote ([buf] [buf xform] [buf xform exh])), :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([buf] [buf xform] [buf xform exh]), :arglists ([buf] [buf xform] [buf xform exh]), :arglists-meta (nil nil nil)}}, :name cljs.core.async.impl.channels/chan, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :end-column 11, :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([buf] [buf xform] [buf xform exh]), :arglists ([buf] [buf xform] [buf xform exh]), :arglists-meta (nil nil nil)}, :method-params ([buf] [buf xform] [buf xform exh]), :protocol-impl nil, :arglists-meta (nil nil nil), :column 1, :line 175, :end-line 175, :max-fixed-arity 3, :fn-var true, :arglists ([buf] [buf xform] [buf xform exh])}, t_cljs$core$async$impl$channels40845 {:num-fields 2, :protocols #{cljs.core/IMeta cljs.core/IDeref cljs.core/IWithMeta}, :name cljs.core.async.impl.channels/t_cljs$core$async$impl$channels40845, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :type true, :anonymous true, :column 3, :line 17, :record false, :skip-protocol-flag #{cljs.core/IMeta cljs.core/IDeref cljs.core/IWithMeta}}, box {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :line 16, :column 7, :end-line 16, :end-column 10, :arglists (quote ([val]))}, :name cljs.core.async.impl.channels/box, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :end-column 10, :method-params ([val]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 16, :end-line 16, :max-fixed-arity 1, :fn-var true, :arglists (quote ([val]))}, MMC {:meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :line 27, :column 14, :end-line 27, :end-column 17, :doc nil, :protocol-symbol true, :jsdoc ("@interface"), :protocol-info {:methods {abort [[this]]}}}, :protocol-symbol true, :name cljs.core.async.impl.channels/MMC, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :end-column 17, :column 1, :line 27, :protocol-info {:methods {abort [[this]]}}, :info nil, :end-line 27, :tag any, :impls #{cljs.core.async.impl.channels/ManyToManyChannel}, :doc nil, :jsdoc ("@interface")}, ->PutBox {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :line 20, :column 10, :end-line 20, :end-column 16, :protocols #{}, :skip-protocol-flag nil, :factory :positional, :arglists (quote ([handler val]))}, :protocols #{}, :name cljs.core.async.impl.channels/->PutBox, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :end-column 16, :method-params ([handler val]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :factory :positional, :line 20, :end-line 20, :max-fixed-arity 2, :fn-var true, :arglists (quote ([handler val])), :skip-protocol-flag nil}, abort {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :line 28, :column 4, :end-line 28, :end-column 9, :protocol cljs.core.async.impl.channels/MMC, :doc nil, :arglists (quote ([this]))}, :protocol cljs.core.async.impl.channels/MMC, :name cljs.core.async.impl.channels/abort, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/channels.cljs", :end-column 9, :method-params ([this]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 27, :end-line 28, :max-fixed-arity 1, :fn-var true, :arglists (quote ([this])), :doc nil}, ex-handler {:protocol-inline nil, :meta {:file Line truncated
@@ -0,0 +1,672 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.core.async.impl.channels');
goog.require('cljs.core');
goog.require('cljs.core.async.impl.protocols');
goog.require('cljs.core.async.impl.dispatch');
goog.require('cljs.core.async.impl.buffers');
cljs.core.async.impl.channels.box = (function cljs$core$async$impl$channels$box(val){
if(typeof cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845 !== 'undefined'){
} else {
/**
* @constructor
* @implements {cljs.core.IMeta}
* @implements {cljs.core.IDeref}
* @implements {cljs.core.IWithMeta}
*/
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845 = (function (val,meta40846){
this.val = val;
this.meta40846 = meta40846;
this.cljs$lang$protocol_mask$partition0$ = 425984;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_40847,meta40846__$1){
var self__ = this;
var _40847__$1 = this;
return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845(self__.val,meta40846__$1));
});
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_40847){
var self__ = this;
var _40847__$1 = this;
return self__.meta40846;
});
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845.prototype.cljs$core$IDeref$_deref$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
return self__.val;
});
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"val","val",1769233139,null),new cljs.core.Symbol(null,"meta40846","meta40846",1979741167,null)], null);
});
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845.cljs$lang$type = true;
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845.cljs$lang$ctorStr = "cljs.core.async.impl.channels/t_cljs$core$async$impl$channels40845";
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.channels/t_cljs$core$async$impl$channels40845");
});
cljs.core.async.impl.channels.__GT_t_cljs$core$async$impl$channels40845 = (function cljs$core$async$impl$channels$box_$___GT_t_cljs$core$async$impl$channels40845(val__$1,meta40846){
return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845(val__$1,meta40846));
});
}
return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels40845(val,cljs.core.PersistentArrayMap.EMPTY));
});
/**
* @constructor
*/
cljs.core.async.impl.channels.PutBox = (function (handler,val){
this.handler = handler;
this.val = val;
});
cljs.core.async.impl.channels.PutBox.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"handler","handler",1444934915,null),new cljs.core.Symbol(null,"val","val",1769233139,null)], null);
});
cljs.core.async.impl.channels.PutBox.cljs$lang$type = true;
cljs.core.async.impl.channels.PutBox.cljs$lang$ctorStr = "cljs.core.async.impl.channels/PutBox";
cljs.core.async.impl.channels.PutBox.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.channels/PutBox");
});
cljs.core.async.impl.channels.__GT_PutBox = (function cljs$core$async$impl$channels$__GT_PutBox(handler,val){
return (new cljs.core.async.impl.channels.PutBox(handler,val));
});
cljs.core.async.impl.channels.put_active_QMARK_ = (function cljs$core$async$impl$channels$put_active_QMARK_(box){
return cljs.core.async.impl.protocols.active_QMARK_.call(null,box.handler);
});
cljs.core.async.impl.channels.MAX_DIRTY = (64);
/**
* @interface
*/
cljs.core.async.impl.channels.MMC = function(){};
cljs.core.async.impl.channels.abort = (function cljs$core$async$impl$channels$abort(this$){
if((!((this$ == null))) && (!((this$.cljs$core$async$impl$channels$MMC$abort$arity$1 == null)))){
return this$.cljs$core$async$impl$channels$MMC$abort$arity$1(this$);
} else {
var x__36231__auto__ = (((this$ == null))?null:this$);
var m__36232__auto__ = (cljs.core.async.impl.channels.abort[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,this$);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.channels.abort["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,this$);
} else {
throw cljs.core.missing_protocol.call(null,"MMC.abort",this$);
}
}
}
});
/**
* @constructor
* @implements {cljs.core.async.impl.channels.MMC}
* @implements {cljs.core.async.impl.protocols.Channel}
* @implements {cljs.core.async.impl.protocols.WritePort}
* @implements {cljs.core.async.impl.protocols.ReadPort}
*/
cljs.core.async.impl.channels.ManyToManyChannel = (function (takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_){
this.takes = takes;
this.dirty_takes = dirty_takes;
this.puts = puts;
this.dirty_puts = dirty_puts;
this.buf = buf;
this.closed = closed;
this.add_BANG_ = add_BANG_;
});
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$channels$MMC$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$channels$MMC$abort$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
while(true){
var putter_40859 = self__.puts.pop();
if((putter_40859 == null)){
} else {
var put_handler_40860 = putter_40859.handler;
var val_40861 = putter_40859.val;
if(cljs.core.async.impl.protocols.active_QMARK_.call(null,put_handler_40860)){
var put_cb_40862 = cljs.core.async.impl.protocols.commit.call(null,put_handler_40860);
cljs.core.async.impl.dispatch.run.call(null,((function (put_cb_40862,put_handler_40860,val_40861,putter_40859,this$__$1){
return (function (){
return put_cb_40862.call(null,true);
});})(put_cb_40862,put_handler_40860,val_40861,putter_40859,this$__$1))
);
} else {
continue;
}
}
break;
}
self__.puts.cleanup(cljs.core.constantly.call(null,false));
return cljs.core.async.impl.protocols.close_BANG_.call(null,this$__$1);
});
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$WritePort$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 = (function (this$,val,handler){
var self__ = this;
var this$__$1 = this;
if(!((val == null))){
} else {
throw (new Error(["Assert failed: ","Can't put nil in on a channel","\n","(not (nil? val))"].join('')));
}
var closed__$1 = self__.closed;
if((closed__$1) || (!(cljs.core.async.impl.protocols.active_QMARK_.call(null,handler)))){
return cljs.core.async.impl.channels.box.call(null,!(closed__$1));
} else {
if(cljs.core.truth_((function (){var and__35486__auto__ = self__.buf;
if(cljs.core.truth_(and__35486__auto__)){
return cljs.core.not.call(null,cljs.core.async.impl.protocols.full_QMARK_.call(null,self__.buf));
} else {
return and__35486__auto__;
}
})())){
cljs.core.async.impl.protocols.commit.call(null,handler);
var done_QMARK_ = cljs.core.reduced_QMARK_.call(null,self__.add_BANG_.call(null,self__.buf,val));
var take_cbs = (function (){var takers = cljs.core.PersistentVector.EMPTY;
while(true){
if(((self__.takes.length > (0))) && ((cljs.core.count.call(null,self__.buf) > (0)))){
var taker = self__.takes.pop();
if(cljs.core.async.impl.protocols.active_QMARK_.call(null,taker)){
var ret = cljs.core.async.impl.protocols.commit.call(null,taker);
var val__$1 = cljs.core.async.impl.protocols.remove_BANG_.call(null,self__.buf);
var G__40863 = cljs.core.conj.call(null,takers,((function (takers,ret,val__$1,taker,done_QMARK_,closed__$1,this$__$1){
return (function (){
return ret.call(null,val__$1);
});})(takers,ret,val__$1,taker,done_QMARK_,closed__$1,this$__$1))
);
takers = G__40863;
continue;
} else {
var G__40864 = takers;
takers = G__40864;
continue;
}
} else {
return takers;
}
break;
}
})();
if(done_QMARK_){
cljs.core.async.impl.channels.abort.call(null,this$__$1);
} else {
}
if(cljs.core.seq.call(null,take_cbs)){
var seq__40848_40865 = cljs.core.seq.call(null,take_cbs);
var chunk__40849_40866 = null;
var count__40850_40867 = (0);
var i__40851_40868 = (0);
while(true){
if((i__40851_40868 < count__40850_40867)){
var f_40869 = cljs.core._nth.call(null,chunk__40849_40866,i__40851_40868);
cljs.core.async.impl.dispatch.run.call(null,f_40869);
var G__40870 = seq__40848_40865;
var G__40871 = chunk__40849_40866;
var G__40872 = count__40850_40867;
var G__40873 = (i__40851_40868 + (1));
seq__40848_40865 = G__40870;
chunk__40849_40866 = G__40871;
count__40850_40867 = G__40872;
i__40851_40868 = G__40873;
continue;
} else {
var temp__5457__auto___40874 = cljs.core.seq.call(null,seq__40848_40865);
if(temp__5457__auto___40874){
var seq__40848_40875__$1 = temp__5457__auto___40874;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__40848_40875__$1)){
var c__36429__auto___40876 = cljs.core.chunk_first.call(null,seq__40848_40875__$1);
var G__40877 = cljs.core.chunk_rest.call(null,seq__40848_40875__$1);
var G__40878 = c__36429__auto___40876;
var G__40879 = cljs.core.count.call(null,c__36429__auto___40876);
var G__40880 = (0);
seq__40848_40865 = G__40877;
chunk__40849_40866 = G__40878;
count__40850_40867 = G__40879;
i__40851_40868 = G__40880;
continue;
} else {
var f_40881 = cljs.core.first.call(null,seq__40848_40875__$1);
cljs.core.async.impl.dispatch.run.call(null,f_40881);
var G__40882 = cljs.core.next.call(null,seq__40848_40875__$1);
var G__40883 = null;
var G__40884 = (0);
var G__40885 = (0);
seq__40848_40865 = G__40882;
chunk__40849_40866 = G__40883;
count__40850_40867 = G__40884;
i__40851_40868 = G__40885;
continue;
}
} else {
}
}
break;
}
} else {
}
return cljs.core.async.impl.channels.box.call(null,true);
} else {
var taker = (function (){while(true){
var taker = self__.takes.pop();
if(cljs.core.truth_(taker)){
if(cljs.core.truth_(cljs.core.async.impl.protocols.active_QMARK_.call(null,taker))){
return taker;
} else {
continue;
}
} else {
return null;
}
break;
}
})();
if(cljs.core.truth_(taker)){
var take_cb = cljs.core.async.impl.protocols.commit.call(null,taker);
cljs.core.async.impl.protocols.commit.call(null,handler);
cljs.core.async.impl.dispatch.run.call(null,((function (take_cb,taker,closed__$1,this$__$1){
return (function (){
return take_cb.call(null,val);
});})(take_cb,taker,closed__$1,this$__$1))
);
return cljs.core.async.impl.channels.box.call(null,true);
} else {
if((self__.dirty_puts > (64))){
self__.dirty_puts = (0);
self__.puts.cleanup(cljs.core.async.impl.channels.put_active_QMARK_);
} else {
self__.dirty_puts = (self__.dirty_puts + (1));
}
if(cljs.core.truth_(cljs.core.async.impl.protocols.blockable_QMARK_.call(null,handler))){
if((self__.puts.length < (1024))){
} else {
throw (new Error(["Assert failed: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(["No more than ",cljs.core.str.cljs$core$IFn$_invoke$arity$1((1024))," pending puts are allowed on a single channel."," Consider using a windowed buffer."].join('')),"\n","(< (.-length puts) impl/MAX-QUEUE-SIZE)"].join('')));
}
self__.puts.unbounded_unshift((new cljs.core.async.impl.channels.PutBox(handler,val)));
} else {
}
return null;
}
}
}
});
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$ReadPort$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 = (function (this$,handler){
var self__ = this;
var this$__$1 = this;
if(!(cljs.core.async.impl.protocols.active_QMARK_.call(null,handler))){
return null;
} else {
if((!((self__.buf == null))) && ((cljs.core.count.call(null,self__.buf) > (0)))){
var temp__5455__auto__ = cljs.core.async.impl.protocols.commit.call(null,handler);
if(cljs.core.truth_(temp__5455__auto__)){
var take_cb = temp__5455__auto__;
var val = cljs.core.async.impl.protocols.remove_BANG_.call(null,self__.buf);
var vec__40852 = (((self__.puts.length > (0)))?(function (){var cbs = cljs.core.PersistentVector.EMPTY;
while(true){
var putter = self__.puts.pop();
var put_handler = putter.handler;
var val__$1 = putter.val;
var cb = (function (){var and__35486__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null,put_handler);
if(and__35486__auto__){
return cljs.core.async.impl.protocols.commit.call(null,put_handler);
} else {
return and__35486__auto__;
}
})();
var cbs__$1 = (cljs.core.truth_(cb)?cljs.core.conj.call(null,cbs,cb):cbs);
var done_QMARK_ = (cljs.core.truth_(cb)?cljs.core.reduced_QMARK_.call(null,self__.add_BANG_.call(null,self__.buf,val__$1)):null);
if((cljs.core.not.call(null,done_QMARK_)) && (cljs.core.not.call(null,cljs.core.async.impl.protocols.full_QMARK_.call(null,self__.buf))) && ((self__.puts.length > (0)))){
var G__40886 = cbs__$1;
cbs = G__40886;
continue;
} else {
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [done_QMARK_,cbs__$1], null);
}
break;
}
})():null);
var done_QMARK_ = cljs.core.nth.call(null,vec__40852,(0),null);
var cbs = cljs.core.nth.call(null,vec__40852,(1),null);
if(cljs.core.truth_(done_QMARK_)){
cljs.core.async.impl.channels.abort.call(null,this$__$1);
} else {
}
var seq__40855_40887 = cljs.core.seq.call(null,cbs);
var chunk__40856_40888 = null;
var count__40857_40889 = (0);
var i__40858_40890 = (0);
while(true){
if((i__40858_40890 < count__40857_40889)){
var cb_40891 = cljs.core._nth.call(null,chunk__40856_40888,i__40858_40890);
cljs.core.async.impl.dispatch.run.call(null,((function (seq__40855_40887,chunk__40856_40888,count__40857_40889,i__40858_40890,cb_40891,val,vec__40852,done_QMARK_,cbs,take_cb,temp__5455__auto__,this$__$1){
return (function (){
return cb_40891.call(null,true);
});})(seq__40855_40887,chunk__40856_40888,count__40857_40889,i__40858_40890,cb_40891,val,vec__40852,done_QMARK_,cbs,take_cb,temp__5455__auto__,this$__$1))
);
var G__40892 = seq__40855_40887;
var G__40893 = chunk__40856_40888;
var G__40894 = count__40857_40889;
var G__40895 = (i__40858_40890 + (1));
seq__40855_40887 = G__40892;
chunk__40856_40888 = G__40893;
count__40857_40889 = G__40894;
i__40858_40890 = G__40895;
continue;
} else {
var temp__5457__auto___40896 = cljs.core.seq.call(null,seq__40855_40887);
if(temp__5457__auto___40896){
var seq__40855_40897__$1 = temp__5457__auto___40896;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__40855_40897__$1)){
var c__36429__auto___40898 = cljs.core.chunk_first.call(null,seq__40855_40897__$1);
var G__40899 = cljs.core.chunk_rest.call(null,seq__40855_40897__$1);
var G__40900 = c__36429__auto___40898;
var G__40901 = cljs.core.count.call(null,c__36429__auto___40898);
var G__40902 = (0);
seq__40855_40887 = G__40899;
chunk__40856_40888 = G__40900;
count__40857_40889 = G__40901;
i__40858_40890 = G__40902;
continue;
} else {
var cb_40903 = cljs.core.first.call(null,seq__40855_40897__$1);
cljs.core.async.impl.dispatch.run.call(null,((function (seq__40855_40887,chunk__40856_40888,count__40857_40889,i__40858_40890,cb_40903,seq__40855_40897__$1,temp__5457__auto___40896,val,vec__40852,done_QMARK_,cbs,take_cb,temp__5455__auto__,this$__$1){
return (function (){
return cb_40903.call(null,true);
});})(seq__40855_40887,chunk__40856_40888,count__40857_40889,i__40858_40890,cb_40903,seq__40855_40897__$1,temp__5457__auto___40896,val,vec__40852,done_QMARK_,cbs,take_cb,temp__5455__auto__,this$__$1))
);
var G__40904 = cljs.core.next.call(null,seq__40855_40897__$1);
var G__40905 = null;
var G__40906 = (0);
var G__40907 = (0);
seq__40855_40887 = G__40904;
chunk__40856_40888 = G__40905;
count__40857_40889 = G__40906;
i__40858_40890 = G__40907;
continue;
}
} else {
}
}
break;
}
return cljs.core.async.impl.channels.box.call(null,val);
} else {
return null;
}
} else {
var putter = (function (){while(true){
var putter = self__.puts.pop();
if(cljs.core.truth_(putter)){
if(cljs.core.async.impl.protocols.active_QMARK_.call(null,putter.handler)){
return putter;
} else {
continue;
}
} else {
return null;
}
break;
}
})();
if(cljs.core.truth_(putter)){
var put_cb = cljs.core.async.impl.protocols.commit.call(null,putter.handler);
cljs.core.async.impl.protocols.commit.call(null,handler);
cljs.core.async.impl.dispatch.run.call(null,((function (put_cb,putter,this$__$1){
return (function (){
return put_cb.call(null,true);
});})(put_cb,putter,this$__$1))
);
return cljs.core.async.impl.channels.box.call(null,putter.val);
} else {
if(cljs.core.truth_(self__.closed)){
if(cljs.core.truth_(self__.buf)){
self__.add_BANG_.call(null,self__.buf);
} else {
}
if(cljs.core.truth_((function (){var and__35486__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null,handler);
if(cljs.core.truth_(and__35486__auto__)){
return cljs.core.async.impl.protocols.commit.call(null,handler);
} else {
return and__35486__auto__;
}
})())){
var has_val = (function (){var and__35486__auto__ = self__.buf;
if(cljs.core.truth_(and__35486__auto__)){
return (cljs.core.count.call(null,self__.buf) > (0));
} else {
return and__35486__auto__;
}
})();
var val = (cljs.core.truth_(has_val)?cljs.core.async.impl.protocols.remove_BANG_.call(null,self__.buf):null);
return cljs.core.async.impl.channels.box.call(null,val);
} else {
return null;
}
} else {
if((self__.dirty_takes > (64))){
self__.dirty_takes = (0);
self__.takes.cleanup(cljs.core.async.impl.protocols.active_QMARK_);
} else {
self__.dirty_takes = (self__.dirty_takes + (1));
}
if(cljs.core.truth_(cljs.core.async.impl.protocols.blockable_QMARK_.call(null,handler))){
if((self__.takes.length < (1024))){
} else {
throw (new Error(["Assert failed: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(["No more than ",cljs.core.str.cljs$core$IFn$_invoke$arity$1((1024))," pending takes are allowed on a single channel."].join('')),"\n","(< (.-length takes) impl/MAX-QUEUE-SIZE)"].join('')));
}
self__.takes.unbounded_unshift(handler);
} else {
}
return null;
}
}
}
}
});
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
return self__.closed;
});
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 = (function (this$){
var self__ = this;
var this$__$1 = this;
if(self__.closed){
return null;
} else {
self__.closed = true;
if(cljs.core.truth_((function (){var and__35486__auto__ = self__.buf;
if(cljs.core.truth_(and__35486__auto__)){
return (self__.puts.length === (0));
} else {
return and__35486__auto__;
}
})())){
self__.add_BANG_.call(null,self__.buf);
} else {
}
while(true){
var taker_40908 = self__.takes.pop();
if((taker_40908 == null)){
} else {
if(cljs.core.async.impl.protocols.active_QMARK_.call(null,taker_40908)){
var take_cb_40909 = cljs.core.async.impl.protocols.commit.call(null,taker_40908);
var val_40910 = (cljs.core.truth_((function (){var and__35486__auto__ = self__.buf;
if(cljs.core.truth_(and__35486__auto__)){
return (cljs.core.count.call(null,self__.buf) > (0));
} else {
return and__35486__auto__;
}
})())?cljs.core.async.impl.protocols.remove_BANG_.call(null,self__.buf):null);
cljs.core.async.impl.dispatch.run.call(null,((function (take_cb_40909,val_40910,taker_40908,this$__$1){
return (function (){
return take_cb_40909.call(null,val_40910);
});})(take_cb_40909,val_40910,taker_40908,this$__$1))
);
} else {
}
continue;
}
break;
}
if(cljs.core.truth_(self__.buf)){
cljs.core.async.impl.protocols.close_buf_BANG_.call(null,self__.buf);
} else {
}
return null;
}
});
cljs.core.async.impl.channels.ManyToManyChannel.getBasis = (function (){
return new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"takes","takes",298247964,null),cljs.core.with_meta(new cljs.core.Symbol(null,"dirty-takes","dirty-takes",575642138,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),new cljs.core.Symbol(null,"puts","puts",-1883877054,null),cljs.core.with_meta(new cljs.core.Symbol(null,"dirty-puts","dirty-puts",57041148,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"buf","buf",1426618187,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"tag","tag",-1290361223),new cljs.core.Symbol(null,"not-native","not-native",-236392494,null)], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"closed","closed",720856168,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),new cljs.core.Symbol(null,"add!","add!",2046056845,null)], null);
});
cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$type = true;
cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$ctorStr = "cljs.core.async.impl.channels/ManyToManyChannel";
cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.channels/ManyToManyChannel");
});
cljs.core.async.impl.channels.__GT_ManyToManyChannel = (function cljs$core$async$impl$channels$__GT_ManyToManyChannel(takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_){
return (new cljs.core.async.impl.channels.ManyToManyChannel(takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_));
});
cljs.core.async.impl.channels.ex_handler = (function cljs$core$async$impl$channels$ex_handler(ex){
console.log(ex);
return null;
});
cljs.core.async.impl.channels.handle = (function cljs$core$async$impl$channels$handle(buf,exh,t){
var else$ = (function (){var or__35498__auto__ = exh;
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return cljs.core.async.impl.channels.ex_handler;
}
})().call(null,t);
if((else$ == null)){
return buf;
} else {
return cljs.core.async.impl.protocols.add_BANG_.call(null,buf,else$);
}
});
cljs.core.async.impl.channels.chan = (function cljs$core$async$impl$channels$chan(var_args){
var G__40912 = arguments.length;
switch (G__40912) {
case 1:
return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
case 3:
return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$1 = (function (buf){
return cljs.core.async.impl.channels.chan.call(null,buf,null);
});
cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$2 = (function (buf,xform){
return cljs.core.async.impl.channels.chan.call(null,buf,xform,null);
});
cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3 = (function (buf,xform,exh){
return (new cljs.core.async.impl.channels.ManyToManyChannel(cljs.core.async.impl.buffers.ring_buffer.call(null,(32)),(0),cljs.core.async.impl.buffers.ring_buffer.call(null,(32)),(0),buf,false,(function (){var add_BANG_ = (cljs.core.truth_(xform)?xform.call(null,cljs.core.async.impl.protocols.add_BANG_):cljs.core.async.impl.protocols.add_BANG_);
return ((function (add_BANG_){
return (function() {
var G__40916 = null;
var G__40916__1 = (function (buf__$1){
try{return add_BANG_.call(null,buf__$1);
}catch (e40913){var t = e40913;
return cljs.core.async.impl.channels.handle.call(null,buf__$1,exh,t);
}});
var G__40916__2 = (function (buf__$1,val){
try{return add_BANG_.call(null,buf__$1,val);
}catch (e40914){var t = e40914;
return cljs.core.async.impl.channels.handle.call(null,buf__$1,exh,t);
}});
G__40916 = function(buf__$1,val){
switch(arguments.length){
case 1:
return G__40916__1.call(this,buf__$1);
case 2:
return G__40916__2.call(this,buf__$1,val);
}
throw(new Error('Invalid arity: ' + (arguments.length - 1)));
};
G__40916.cljs$core$IFn$_invoke$arity$1 = G__40916__1;
G__40916.cljs$core$IFn$_invoke$arity$2 = G__40916__2;
return G__40916;
})()
;})(add_BANG_))
})()));
});
cljs.core.async.impl.channels.chan.cljs$lang$maxFixedArity = 3;
//# sourceMappingURL=channels.js.map?rel=1517021944834
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/core\/async\/impl\/channels.js","sources":["channels.cljs?rel=1517021944836"],"lineCount":672,"mappings":";AAQA;;;;;AAOA,oCAAA,pCAAMA,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UAAI,kBAAIC,IAAG,AAACtB,yBAAKqB,IAAIC,IAAID;IACzB7B,cAAM,sBAAA,mFAAA,vFAAM8B,IAAG,AAAC7B,mCAAS,AAACb,2BAAKF,WAAIhC;AALzC,AAME,GAAI,CAAK,AAAC4C,wBAAIE,kBAAO,AAACF,wBAAI,AAACC,qDAAWb,kBAAM,sBAAA,rBAAM,AAAUF;AAC1D,eAAO6C;;;;AADT,0FAEG7B,YAAM6B;;;;KAVf;kBADlB,AAAAD,wBAAAD,WAAA,IAAA,rDACO3B;UADP,AAAA4B,wBAAAD,WAAA,IAAA,7CACaE;AADb,AAYE,oBAAM7B;AAAN,AACE,AAACvB,8CAAMC;;AADT;;AAEA,IAAAqD,mBAAA,AAAAtB,wBAAWoB;IAAXG,qBAAA;IAAAC,qBAAA;IAAAC,iBAAA;;AAAA,AAAA,GAAA,AAAA,CAAAA,iBAAAD;AAAA,eAAA,AAAAnB,yBAAAkB,mBAAAE,vDAAQJ;AAAR,AAAA,AACE,4CAAA,5CAACrC;;AAALine truncated
@@ -0,0 +1,37 @@
(ns cljs.core.async.impl.dispatch
(:require [cljs.core.async.impl.buffers :as buffers]
[goog.async.nextTick]))
(def tasks (buffers/ring-buffer 32))
(def running? false)
(def queued? false)
(def TASK_BATCH_SIZE 1024)
(declare queue-dispatcher)
(defn process-messages []
(set! running? true)
(set! queued? false)
(loop [count 0]
(let [m (.pop tasks)]
(when-not (nil? m)
(m)
(when (< count TASK_BATCH_SIZE)
(recur (inc count))))))
(set! running? false)
(when (> (.-length tasks) 0)
(queue-dispatcher)))
(defn queue-dispatcher []
(when-not (and queued? running?)
(set! queued? true)
(goog.async.nextTick process-messages)))
(defn run [f]
(.unbounded-unshift tasks f)
(queue-dispatcher))
(defn queue-delay [f delay]
(js/setTimeout f delay))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {setTimeout {}}, :use-macros {}, :excludes #{}, :name cljs.core.async.impl.dispatch, :imports nil, :requires {buffers cljs.core.async.impl.buffers, cljs.core.async.impl.buffers cljs.core.async.impl.buffers, goog.async.nextTick goog.async.nextTick}, :cljs.spec/speced-vars [], :uses nil, :defs {tasks {:name cljs.core.async.impl.dispatch/tasks, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 5, :column 1, :end-line 5, :end-column 11, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 5, :column 6, :end-line 5, :end-column 11}, :tag any}, running? {:name cljs.core.async.impl.dispatch/running?, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 6, :column 1, :end-line 6, :end-column 14, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 6, :column 6, :end-line 6, :end-column 14}, :tag boolean}, queued? {:name cljs.core.async.impl.dispatch/queued?, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 7, :column 1, :end-line 7, :end-column 13, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 7, :column 6, :end-line 7, :end-column 13}, :tag boolean}, TASK_BATCH_SIZE {:name cljs.core.async.impl.dispatch/TASK_BATCH_SIZE, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 9, :column 1, :end-line 9, :end-column 21, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 9, :column 6, :end-line 9, :end-column 21}, :tag number}, queue-dispatcher {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 26, :column 7, :end-line 26, :end-column 23, :arglists (quote ([]))}, :name cljs.core.async.impl.dispatch/queue-dispatcher, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :end-column 23, :method-params ([]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 26, :end-line 26, :max-fixed-arity 0, :fn-var true, :arglists (quote ([]))}, process-messages {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 13, :column 7, :end-line 13, :end-column 23, :arglists (quote ([]))}, :name cljs.core.async.impl.dispatch/process-messages, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :end-column 23, :method-params ([]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 13, :end-line 13, :max-fixed-arity 0, :fn-var true, :arglists (quote ([]))}, run {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 31, :column 7, :end-line 31, :end-column 10, :arglists (quote ([f]))}, :name cljs.core.async.impl.dispatch/run, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :end-column 10, :method-params ([f]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 31, :end-line 31, :max-fixed-arity 1, :fn-var true, :arglists (quote ([f]))}, queue-delay {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :line 35, :column 7, :end-line 35, :end-column 18, :arglists (quote ([f delay]))}, :name cljs.core.async.impl.dispatch/queue-delay, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/dispatch.cljs", :end-column 18, :method-params ([f delay]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 35, :end-line 35, :max-fixed-arity 2, :fn-var true, :arglists (quote ([f delay]))}}, :cljs.spec/registry-ref [], :require-macros nil, :doc nil}
@@ -0,0 +1,58 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.core.async.impl.dispatch');
goog.require('cljs.core');
goog.require('cljs.core.async.impl.buffers');
goog.require('goog.async.nextTick');
cljs.core.async.impl.dispatch.tasks = cljs.core.async.impl.buffers.ring_buffer.call(null,(32));
cljs.core.async.impl.dispatch.running_QMARK_ = false;
cljs.core.async.impl.dispatch.queued_QMARK_ = false;
cljs.core.async.impl.dispatch.TASK_BATCH_SIZE = (1024);
cljs.core.async.impl.dispatch.process_messages = (function cljs$core$async$impl$dispatch$process_messages(){
cljs.core.async.impl.dispatch.running_QMARK_ = true;
cljs.core.async.impl.dispatch.queued_QMARK_ = false;
var count_40840 = (0);
while(true){
var m_40841 = cljs.core.async.impl.dispatch.tasks.pop();
if((m_40841 == null)){
} else {
m_40841.call(null);
if((count_40840 < cljs.core.async.impl.dispatch.TASK_BATCH_SIZE)){
var G__40842 = (count_40840 + (1));
count_40840 = G__40842;
continue;
} else {
}
}
break;
}
cljs.core.async.impl.dispatch.running_QMARK_ = false;
if((cljs.core.async.impl.dispatch.tasks.length > (0))){
return cljs.core.async.impl.dispatch.queue_dispatcher.call(null);
} else {
return null;
}
});
cljs.core.async.impl.dispatch.queue_dispatcher = (function cljs$core$async$impl$dispatch$queue_dispatcher(){
if((cljs.core.async.impl.dispatch.queued_QMARK_) && (cljs.core.async.impl.dispatch.running_QMARK_)){
return null;
} else {
cljs.core.async.impl.dispatch.queued_QMARK_ = true;
return goog.async.nextTick(cljs.core.async.impl.dispatch.process_messages);
}
});
cljs.core.async.impl.dispatch.run = (function cljs$core$async$impl$dispatch$run(f){
cljs.core.async.impl.dispatch.tasks.unbounded_unshift(f);
return cljs.core.async.impl.dispatch.queue_dispatcher.call(null);
});
cljs.core.async.impl.dispatch.queue_delay = (function cljs$core$async$impl$dispatch$queue_delay(f,delay){
return setTimeout(f,delay);
});
//# sourceMappingURL=dispatch.js.map?rel=1517021944765
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/core\/async\/impl\/dispatch.js","sources":["dispatch.cljs?rel=1517021944765"],"lineCount":58,"mappings":";AAAA;;;;AAIA,AAAKA,sCAAM,mDAAA,nDAACC;AACZ,+CAAA,\/CAAKC;AACL,8CAAA,9CAAKC;AAEL,gDAAA,hDAAKC;AAEL,AAAA,AAEA,iDAAA,jDAAMC;AAAN,AACE,+CAAA,\/CAAMH;;AACN,8CAAA,9CAAMC;;AACN,kBAAA,dAAOG;;AAAP,AACE,IAAMC,UAAE,AAAMP;AAAd,AACE,GAAU,YAAA,XAAMO;AAAhB;AAAA,AACE,AAACA;;AACD,GAAM,CAAGD,cAAMF;AAAf,AACE,eAAO,eAAA,dAAKE;;;;AADd;;;;;AAEN,+CAAA,\/CAAMJ;;AACN,GAAM,8CAAA,7CAAG,AAAUF;AAAnB,AACE,OAACQ;;AADH;;;AAGF,iDAAA,jDAAMA;AAAN,AACE,GAAU,CAAKL,iDAAQD;AAAvB;;AAAA,AACE,8CAAA,9CAAMC;;AACN,OAACM,oBAAoBJ;;;AAEzB,oCAAA,pCAAMK,gFAAKC;AAAX,AACE,AAAoBX,sDAAMW;;AAC1B,OAACH;;AAEH,4CAAA,5CAAMI,gGAAaD,EAAEE;AAArB,AACE,OAACC,WAAcH,EAAEE","names":["cljs.core.async.impl.dispatch\/tasks","cljs.core.async.impl.buffers\/ring-buffer","cljs.core.async.impl.dispatch\/running?","cljs.core.async.impl.dispatch\/queued?","cljs.core.async.impl.dispatch\/TASK_BATCH_SIZE","cljs.core.async.impl.dispatch\/process-messages","count","m","cljs.core.async.impl.dispatch\/queue-dispatcher","goog\/async.nextTick","cljs.core.async.impl.dispatch\/run","f","cljs.core.async.impl.dispatch\/queue-delay","delay","js\/setTimeout"]}
@@ -0,0 +1,146 @@
(ns cljs.core.async.impl.ioc-helpers
(:require [cljs.core.async.impl.protocols :as impl])
(:require-macros [cljs.core.async.impl.ioc-macros :as ioc]))
(def ^:const FN-IDX 0)
(def ^:const STATE-IDX 1)
(def ^:const VALUE-IDX 2)
(def ^:const BINDINGS-IDX 3)
(def ^:const EXCEPTION-FRAMES 4)
(def ^:const CURRENT-EXCEPTION 5)
(def ^:const USER-START-IDX 6)
(defn aset-object [arr idx o]
(aget arr idx o))
(defn aget-object [arr idx]
(aget arr idx))
(defn finished?
"Returns true if the machine is in a finished state"
[state-array]
(keyword-identical? (aget state-array STATE-IDX) :finished))
(defn- fn-handler
[f]
(reify
impl/Handler
(active? [_] true)
(blockable? [_] true)
(commit [_] f)))
(defn run-state-machine [state]
((aget-object state FN-IDX) state))
(defn run-state-machine-wrapped [state]
(try
(run-state-machine state)
(catch js/Object ex
(impl/close! ^not-native (aget-object state USER-START-IDX))
(throw ex))))
(defn take! [state blk ^not-native c]
(if-let [cb (impl/take! c (fn-handler
(fn [x]
(ioc/aset-all! state VALUE-IDX x STATE-IDX blk)
(run-state-machine-wrapped state))))]
(do (ioc/aset-all! state VALUE-IDX @cb STATE-IDX blk)
:recur)
nil))
(defn put! [state blk ^not-native c val]
(if-let [cb (impl/put! c val (fn-handler (fn [ret-val]
(ioc/aset-all! state VALUE-IDX ret-val STATE-IDX blk)
(run-state-machine-wrapped state))))]
(do (ioc/aset-all! state VALUE-IDX @cb STATE-IDX blk)
:recur)
nil))
(defn return-chan [state value]
(let [^not-native c (aget state USER-START-IDX)]
(when-not (nil? value)
(impl/put! c value (fn-handler (fn [] nil))))
(impl/close! c)
c))
(defrecord ExceptionFrame [catch-block
^Class catch-exception
finally-block
continue-block
prev])
(defn add-exception-frame [state catch-block catch-exception finally-block continue-block]
(ioc/aset-all! state
EXCEPTION-FRAMES
(->ExceptionFrame catch-block
catch-exception
finally-block
continue-block
(aget-object state EXCEPTION-FRAMES))))
(defn process-exception [state]
(let [exception-frame (aget-object state EXCEPTION-FRAMES)
catch-block (:catch-block exception-frame)
catch-exception (:catch-exception exception-frame)
exception (aget-object state CURRENT-EXCEPTION)]
(cond
(and exception
(not exception-frame))
(throw exception)
(and exception
catch-block
(or (= :default catch-exception)
(instance? catch-exception exception)))
(ioc/aset-all! state
STATE-IDX
catch-block
VALUE-IDX
exception
CURRENT-EXCEPTION
nil
EXCEPTION-FRAMES
(assoc exception-frame
:catch-block nil
:catch-exception nil))
(and exception
(not catch-block)
(not (:finally-block exception-frame)))
(do (ioc/aset-all! state
EXCEPTION-FRAMES
(:prev exception-frame))
(recur state))
(and exception
(not catch-block)
(:finally-block exception-frame))
(ioc/aset-all! state
STATE-IDX
(:finally-block exception-frame)
EXCEPTION-FRAMES
(assoc exception-frame
:finally-block nil))
(and (not exception)
(:finally-block exception-frame))
(do (ioc/aset-all! state
STATE-IDX
(:finally-block exception-frame)
EXCEPTION-FRAMES
(assoc exception-frame
:finally-block nil)))
(and (not exception)
(not (:finally-block exception-frame)))
(do (ioc/aset-all! state
STATE-IDX
(:continue-block exception-frame)
EXCEPTION-FRAMES
(:prev exception-frame)))
:else (throw (js/Error. "No matching clause")))))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Object {}, Error {}}, :use-macros {}, :excludes #{}, :name cljs.core.async.impl.ioc-helpers, :imports nil, :requires {impl cljs.core.async.impl.protocols, cljs.core.async.impl.protocols cljs.core.async.impl.protocols}, :cljs.spec/speced-vars [], :uses nil, :defs {EXCEPTION-FRAMES {:meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :line 9, :column 14, :end-line 9, :end-column 30, :const true}, :name cljs.core.async.impl.ioc-helpers/EXCEPTION-FRAMES, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :end-column 30, :const-expr {:op :constant, :env {:context :expr}, :form 4, :tag number}, :column 1, :const true, :line 9, :end-line 9, :tag number}, process-exception {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :line 83, :column 7, :end-line 83, :end-column 24, :arglists (quote ([state]))}, :name cljs.core.async.impl.ioc-helpers/process-exception, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :end-column 24, :method-params ([state]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 83, :end-line 83, :max-fixed-arity 1, :fn-var true, :arglists (quote ([state]))}, ExceptionFrame {:num-fields 5, :protocols #{cljs.core/IRecord cljs.core/IEquiv cljs.core/IHash cljs.core/ICollection cljs.core/ICounted cljs.core/ISeqable cljs.core/IMeta cljs.core/ICloneable cljs.core/IPrintWithWriter cljs.core/IIterable cljs.core/IWithMeta cljs.core/IAssociative cljs.core/IMap cljs.core/ILookup}, :name cljs.core.async.impl.ioc-helpers/ExceptionFrame, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :end-column 26, :type true, :column 12, :internal-ctor true, :line 68, :record true, :end-line 68, :skip-protocol-flag #{cljs.core/IRecord cljs.core/IEquiv cljs.core/IHash cljs.core/ICollection cljs.core/ICounted cljs.core/ISeqable cljs.core/IMeta cljs.core/ICloneable cljs.core/IPrintWithWriter cljs.core/IIterable cljs.core/IWithMeta cljs.core/IAssociative cljs.core/IMap cljs.core/ILookup}}, STATE-IDX {:meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :line 6, :column 14, :end-line 6, :end-column 23, :const true}, :name cljs.core.async.impl.ioc-helpers/STATE-IDX, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :end-column 23, :const-expr {:op :constant, :env {:context :expr}, :form 1, :tag number}, :column 1, :const true, :line 6, :end-line 6, :tag number}, map->ExceptionFrame {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :line 68, :column 12, :end-line 68, :end-column 26, :internal-ctor true, :factory :map, :arglists (quote ([G__42190]))}, :name cljs.core.async.impl.ioc-helpers/map->ExceptionFrame, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :end-column 26, :method-params ([G__42190]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :internal-ctor true, :factory :map, :line 68, :end-line 68, :max-fixed-arity 1, :fn-var true, :arglists (quote ([G__42190]))}, aset-object {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :line 13, :column 7, :end-line 13, :end-column 18, :arglists (quote ([arr idx o]))}, :name cljs.core.async.impl.ioc-helpers/aset-object, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :end-column 18, :method-params ([arr idx o]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 13, :end-line 13, :max-fixed-arity 3, :fn-var true, :arglists (quote ([arr idx o]))}, ->t_cljs$core$async$impl$ioc_helpers42174 {:protocol-inline nil, :meta {:anonymous true, :protocols #{cljs.core.async.impl.protocols/Handler cljs.core/IMeta cljs.core/IWithMeta}, :skip-protocol-flag #{cljs.core/IMeta cljs.core/IWithMeta}, :factory :positional, :arglists (quote ([f meta42175])), :file nil}, :protocols #{cljs.core.async.impl.protocols/Handler cljs.core/IMeta cljs.core/IWithMeta}, :name cljs.core.async.impl.ioc-helpers/->t_cljs$core$async$impl$ioc_helpers42174, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :method-params ([f meta42175]), :protocol-impl nil, :arglists-meta (nil nil), :anonymous true, :column 3, :factory :positional, :line 27, :max-fixed-arity 2, :fn-var true, :arglists (quote ([f meta42175])), :skip-protocol-flag #{cljs.core/IMeta cljs.core/IWithMeta}}, add-exception-frame {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/ioc_helpers.cljs", :line 74, :column 7, :end-line 74, :end-column 26, :arglists (quoteLine truncated
@@ -0,0 +1,489 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.core.async.impl.ioc_helpers');
goog.require('cljs.core');
goog.require('cljs.core.async.impl.protocols');
cljs.core.async.impl.ioc_helpers.FN_IDX = (0);
cljs.core.async.impl.ioc_helpers.STATE_IDX = (1);
cljs.core.async.impl.ioc_helpers.VALUE_IDX = (2);
cljs.core.async.impl.ioc_helpers.BINDINGS_IDX = (3);
cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES = (4);
cljs.core.async.impl.ioc_helpers.CURRENT_EXCEPTION = (5);
cljs.core.async.impl.ioc_helpers.USER_START_IDX = (6);
cljs.core.async.impl.ioc_helpers.aset_object = (function cljs$core$async$impl$ioc_helpers$aset_object(arr,idx,o){
return (arr[idx][o]);
});
cljs.core.async.impl.ioc_helpers.aget_object = (function cljs$core$async$impl$ioc_helpers$aget_object(arr,idx){
return (arr[idx]);
});
/**
* Returns true if the machine is in a finished state
*/
cljs.core.async.impl.ioc_helpers.finished_QMARK_ = (function cljs$core$async$impl$ioc_helpers$finished_QMARK_(state_array){
return cljs.core.keyword_identical_QMARK_.call(null,(state_array[(1)]),new cljs.core.Keyword(null,"finished","finished",-1018867731));
});
cljs.core.async.impl.ioc_helpers.fn_handler = (function cljs$core$async$impl$ioc_helpers$fn_handler(f){
if(typeof cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174 !== 'undefined'){
} else {
/**
* @constructor
* @implements {cljs.core.async.impl.protocols.Handler}
* @implements {cljs.core.IMeta}
* @implements {cljs.core.IWithMeta}
*/
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174 = (function (f,meta42175){
this.f = f;
this.meta42175 = meta42175;
this.cljs$lang$protocol_mask$partition0$ = 393216;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_42176,meta42175__$1){
var self__ = this;
var _42176__$1 = this;
return (new cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174(self__.f,meta42175__$1));
});
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_42176){
var self__ = this;
var _42176__$1 = this;
return self__.meta42175;
});
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.prototype.cljs$core$async$impl$protocols$Handler$ = cljs.core.PROTOCOL_SENTINEL;
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
return true;
});
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.prototype.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
return true;
});
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = (function (_){
var self__ = this;
var ___$1 = this;
return self__.f;
});
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null),new cljs.core.Symbol(null,"meta42175","meta42175",1647365147,null)], null);
});
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.cljs$lang$type = true;
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.cljs$lang$ctorStr = "cljs.core.async.impl.ioc-helpers/t_cljs$core$async$impl$ioc_helpers42174";
cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.ioc-helpers/t_cljs$core$async$impl$ioc_helpers42174");
});
cljs.core.async.impl.ioc_helpers.__GT_t_cljs$core$async$impl$ioc_helpers42174 = (function cljs$core$async$impl$ioc_helpers$fn_handler_$___GT_t_cljs$core$async$impl$ioc_helpers42174(f__$1,meta42175){
return (new cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174(f__$1,meta42175));
});
}
return (new cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers42174(f,cljs.core.PersistentArrayMap.EMPTY));
});
cljs.core.async.impl.ioc_helpers.run_state_machine = (function cljs$core$async$impl$ioc_helpers$run_state_machine(state){
return cljs.core.async.impl.ioc_helpers.aget_object.call(null,state,(0)).call(null,state);
});
cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped = (function cljs$core$async$impl$ioc_helpers$run_state_machine_wrapped(state){
try{return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null,state);
}catch (e42177){if((e42177 instanceof Object)){
var ex = e42177;
cljs.core.async.impl.protocols.close_BANG_.call(null,cljs.core.async.impl.ioc_helpers.aget_object.call(null,state,(6)));
throw ex;
} else {
throw e42177;
}
}});
cljs.core.async.impl.ioc_helpers.take_BANG_ = (function cljs$core$async$impl$ioc_helpers$take_BANG_(state,blk,c){
var temp__5455__auto__ = cljs.core.async.impl.protocols.take_BANG_.call(null,c,cljs.core.async.impl.ioc_helpers.fn_handler.call(null,(function (x){
var statearr_42178_42180 = state;
(statearr_42178_42180[(2)] = x);
(statearr_42178_42180[(1)] = blk);
return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped.call(null,state);
})));
if(cljs.core.truth_(temp__5455__auto__)){
var cb = temp__5455__auto__;
var statearr_42179_42181 = state;
(statearr_42179_42181[(2)] = cljs.core.deref.call(null,cb));
(statearr_42179_42181[(1)] = blk);
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
return null;
}
});
cljs.core.async.impl.ioc_helpers.put_BANG_ = (function cljs$core$async$impl$ioc_helpers$put_BANG_(state,blk,c,val){
var temp__5455__auto__ = cljs.core.async.impl.protocols.put_BANG_.call(null,c,val,cljs.core.async.impl.ioc_helpers.fn_handler.call(null,(function (ret_val){
var statearr_42182_42184 = state;
(statearr_42182_42184[(2)] = ret_val);
(statearr_42182_42184[(1)] = blk);
return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped.call(null,state);
})));
if(cljs.core.truth_(temp__5455__auto__)){
var cb = temp__5455__auto__;
var statearr_42183_42185 = state;
(statearr_42183_42185[(2)] = cljs.core.deref.call(null,cb));
(statearr_42183_42185[(1)] = blk);
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
return null;
}
});
cljs.core.async.impl.ioc_helpers.return_chan = (function cljs$core$async$impl$ioc_helpers$return_chan(state,value){
var c = (state[(6)]);
if((value == null)){
} else {
cljs.core.async.impl.protocols.put_BANG_.call(null,c,value,cljs.core.async.impl.ioc_helpers.fn_handler.call(null,((function (c){
return (function (){
return null;
});})(c))
));
}
cljs.core.async.impl.protocols.close_BANG_.call(null,c);
return c;
});
/**
* @constructor
* @implements {cljs.core.IRecord}
* @implements {cljs.core.IEquiv}
* @implements {cljs.core.IHash}
* @implements {cljs.core.ICollection}
* @implements {cljs.core.ICounted}
* @implements {cljs.core.ISeqable}
* @implements {cljs.core.IMeta}
* @implements {cljs.core.ICloneable}
* @implements {cljs.core.IPrintWithWriter}
* @implements {cljs.core.IIterable}
* @implements {cljs.core.IWithMeta}
* @implements {cljs.core.IAssociative}
* @implements {cljs.core.IMap}
* @implements {cljs.core.ILookup}
*/
cljs.core.async.impl.ioc_helpers.ExceptionFrame = (function (catch_block,catch_exception,finally_block,continue_block,prev,__meta,__extmap,__hash){
this.catch_block = catch_block;
this.catch_exception = catch_exception;
this.finally_block = finally_block;
this.continue_block = continue_block;
this.prev = prev;
this.__meta = __meta;
this.__extmap = __extmap;
this.__hash = __hash;
this.cljs$lang$protocol_mask$partition0$ = 2229667594;
this.cljs$lang$protocol_mask$partition1$ = 139264;
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__36186__auto__,k__36187__auto__){
var self__ = this;
var this__36186__auto____$1 = this;
return this__36186__auto____$1.cljs$core$ILookup$_lookup$arity$3(null,k__36187__auto__,null);
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__36188__auto__,k42187,else__36189__auto__){
var self__ = this;
var this__36188__auto____$1 = this;
var G__42191 = k42187;
var G__42191__$1 = (((G__42191 instanceof cljs.core.Keyword))?G__42191.fqn:null);
switch (G__42191__$1) {
case "catch-block":
return self__.catch_block;
break;
case "catch-exception":
return self__.catch_exception;
break;
case "finally-block":
return self__.finally_block;
break;
case "continue-block":
return self__.continue_block;
break;
case "prev":
return self__.prev;
break;
default:
return cljs.core.get.call(null,self__.__extmap,k42187,else__36189__auto__);
}
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__36200__auto__,writer__36201__auto__,opts__36202__auto__){
var self__ = this;
var this__36200__auto____$1 = this;
var pr_pair__36203__auto__ = ((function (this__36200__auto____$1){
return (function (keyval__36204__auto__){
return cljs.core.pr_sequential_writer.call(null,writer__36201__auto__,cljs.core.pr_writer,""," ","",opts__36202__auto__,keyval__36204__auto__);
});})(this__36200__auto____$1))
;
return cljs.core.pr_sequential_writer.call(null,writer__36201__auto__,pr_pair__36203__auto__,"#cljs.core.async.impl.ioc-helpers.ExceptionFrame{",", ","}",opts__36202__auto__,cljs.core.concat.call(null,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"catch-block","catch-block",1175212748),self__.catch_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795),self__.catch_exception],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"finally-block","finally-block",832982472),self__.finally_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850),self__.continue_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"prev","prev",-1597069226),self__.prev],null))], null),self__.__extmap));
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__42186){
var self__ = this;
var G__42186__$1 = this;
return (new cljs.core.RecordIter((0),G__42186__$1,5,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"catch-block","catch-block",1175212748),new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795),new cljs.core.Keyword(null,"finally-block","finally-block",832982472),new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850),new cljs.core.Keyword(null,"prev","prev",-1597069226)], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator.call(null,self__.__extmap):cljs.core.nil_iter.call(null))));
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__36184__auto__){
var self__ = this;
var this__36184__auto____$1 = this;
return self__.__meta;
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__36181__auto__){
var self__ = this;
var this__36181__auto____$1 = this;
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,self__.__extmap,self__.__hash));
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__36190__auto__){
var self__ = this;
var this__36190__auto____$1 = this;
return (5 + cljs.core.count.call(null,self__.__extmap));
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__36182__auto__){
var self__ = this;
var this__36182__auto____$1 = this;
var h__35954__auto__ = self__.__hash;
if(!((h__35954__auto__ == null))){
return h__35954__auto__;
} else {
var h__35954__auto____$1 = ((function (h__35954__auto__,this__36182__auto____$1){
return (function (coll__36183__auto__){
return (846900531 ^ cljs.core.hash_unordered_coll.call(null,coll__36183__auto__));
});})(h__35954__auto__,this__36182__auto____$1))
.call(null,this__36182__auto____$1);
self__.__hash = h__35954__auto____$1;
return h__35954__auto____$1;
}
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this42188,other42189){
var self__ = this;
var this42188__$1 = this;
return (!((other42189 == null))) && ((this42188__$1.constructor === other42189.constructor)) && (cljs.core._EQ_.call(null,this42188__$1.catch_block,other42189.catch_block)) && (cljs.core._EQ_.call(null,this42188__$1.catch_exception,other42189.catch_exception)) && (cljs.core._EQ_.call(null,this42188__$1.finally_block,other42189.finally_block)) && (cljs.core._EQ_.call(null,this42188__$1.continue_block,other42189.continue_block)) && (cljs.core._EQ_.call(null,this42188__$1.prev,other42189.prev)) && (cljs.core._EQ_.call(null,this42188__$1.__extmap,other42189.__extmap));
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__36195__auto__,k__36196__auto__){
var self__ = this;
var this__36195__auto____$1 = this;
if(cljs.core.contains_QMARK_.call(null,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"finally-block","finally-block",832982472),null,new cljs.core.Keyword(null,"catch-block","catch-block",1175212748),null,new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795),null,new cljs.core.Keyword(null,"prev","prev",-1597069226),null,new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850),null], null), null),k__36196__auto__)){
return cljs.core.dissoc.call(null,cljs.core._with_meta.call(null,cljs.core.into.call(null,cljs.core.PersistentArrayMap.EMPTY,this__36195__auto____$1),self__.__meta),k__36196__auto__);
} else {
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,cljs.core.not_empty.call(null,cljs.core.dissoc.call(null,self__.__extmap,k__36196__auto__)),null));
}
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__36193__auto__,k__36194__auto__,G__42186){
var self__ = this;
var this__36193__auto____$1 = this;
var pred__42192 = cljs.core.keyword_identical_QMARK_;
var expr__42193 = k__36194__auto__;
if(cljs.core.truth_(pred__42192.call(null,new cljs.core.Keyword(null,"catch-block","catch-block",1175212748),expr__42193))){
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(G__42186,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,self__.__extmap,null));
} else {
if(cljs.core.truth_(pred__42192.call(null,new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795),expr__42193))){
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,G__42186,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,self__.__extmap,null));
} else {
if(cljs.core.truth_(pred__42192.call(null,new cljs.core.Keyword(null,"finally-block","finally-block",832982472),expr__42193))){
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,G__42186,self__.continue_block,self__.prev,self__.__meta,self__.__extmap,null));
} else {
if(cljs.core.truth_(pred__42192.call(null,new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850),expr__42193))){
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,G__42186,self__.prev,self__.__meta,self__.__extmap,null));
} else {
if(cljs.core.truth_(pred__42192.call(null,new cljs.core.Keyword(null,"prev","prev",-1597069226),expr__42193))){
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,G__42186,self__.__meta,self__.__extmap,null));
} else {
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,cljs.core.assoc.call(null,self__.__extmap,k__36194__auto__,G__42186),null));
}
}
}
}
}
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__36198__auto__){
var self__ = this;
var this__36198__auto____$1 = this;
return cljs.core.seq.call(null,cljs.core.concat.call(null,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"catch-block","catch-block",1175212748),self__.catch_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795),self__.catch_exception],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"finally-block","finally-block",832982472),self__.finally_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850),self__.continue_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"prev","prev",-1597069226),self__.prev],null))], null),self__.__extmap));
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__36185__auto__,G__42186){
var self__ = this;
var this__36185__auto____$1 = this;
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,G__42186,self__.__extmap,self__.__hash));
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__36191__auto__,entry__36192__auto__){
var self__ = this;
var this__36191__auto____$1 = this;
if(cljs.core.vector_QMARK_.call(null,entry__36192__auto__)){
return this__36191__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.call(null,entry__36192__auto__,(0)),cljs.core._nth.call(null,entry__36192__auto__,(1)));
} else {
return cljs.core.reduce.call(null,cljs.core._conj,this__36191__auto____$1,entry__36192__auto__);
}
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.getBasis = (function (){
return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"catch-block","catch-block",-1479223021,null),cljs.core.with_meta(new cljs.core.Symbol(null,"catch-exception","catch-exception",-356775268,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"tag","tag",-1290361223),new cljs.core.Symbol(null,"Class","Class",2064526977,null)], null)),new cljs.core.Symbol(null,"finally-block","finally-block",-1821453297,null),new cljs.core.Symbol(null,"continue-block","continue-block",-211516323,null),new cljs.core.Symbol(null,"prev","prev",43462301,null)], null);
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.cljs$lang$type = true;
cljs.core.async.impl.ioc_helpers.ExceptionFrame.cljs$lang$ctorPrSeq = (function (this__36224__auto__){
return cljs.core._conj.call(null,cljs.core.List.EMPTY,"cljs.core.async.impl.ioc-helpers/ExceptionFrame");
});
cljs.core.async.impl.ioc_helpers.ExceptionFrame.cljs$lang$ctorPrWriter = (function (this__36224__auto__,writer__36225__auto__){
return cljs.core._write.call(null,writer__36225__auto__,"cljs.core.async.impl.ioc-helpers/ExceptionFrame");
});
cljs.core.async.impl.ioc_helpers.__GT_ExceptionFrame = (function cljs$core$async$impl$ioc_helpers$__GT_ExceptionFrame(catch_block,catch_exception,finally_block,continue_block,prev){
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(catch_block,catch_exception,finally_block,continue_block,prev,null,null,null));
});
cljs.core.async.impl.ioc_helpers.map__GT_ExceptionFrame = (function cljs$core$async$impl$ioc_helpers$map__GT_ExceptionFrame(G__42190){
return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(new cljs.core.Keyword(null,"catch-block","catch-block",1175212748).cljs$core$IFn$_invoke$arity$1(G__42190),new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795).cljs$core$IFn$_invoke$arity$1(G__42190),new cljs.core.Keyword(null,"finally-block","finally-block",832982472).cljs$core$IFn$_invoke$arity$1(G__42190),new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850).cljs$core$IFn$_invoke$arity$1(G__42190),new cljs.core.Keyword(null,"prev","prev",-1597069226).cljs$core$IFn$_invoke$arity$1(G__42190),null,cljs.core.not_empty.call(null,cljs.core.dissoc.call(null,G__42190,new cljs.core.Keyword(null,"catch-block","catch-block",1175212748),new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795),new cljs.core.Keyword(null,"finally-block","finally-block",832982472),new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850),new cljs.core.Keyword(null,"prev","prev",-1597069226))),null));
});
cljs.core.async.impl.ioc_helpers.add_exception_frame = (function cljs$core$async$impl$ioc_helpers$add_exception_frame(state,catch_block,catch_exception,finally_block,continue_block){
var statearr_42196 = state;
(statearr_42196[(4)] = cljs.core.async.impl.ioc_helpers.__GT_ExceptionFrame.call(null,catch_block,catch_exception,finally_block,continue_block,cljs.core.async.impl.ioc_helpers.aget_object.call(null,state,(4))));
return statearr_42196;
});
cljs.core.async.impl.ioc_helpers.process_exception = (function cljs$core$async$impl$ioc_helpers$process_exception(state){
while(true){
var exception_frame = cljs.core.async.impl.ioc_helpers.aget_object.call(null,state,(4));
var catch_block = new cljs.core.Keyword(null,"catch-block","catch-block",1175212748).cljs$core$IFn$_invoke$arity$1(exception_frame);
var catch_exception = new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795).cljs$core$IFn$_invoke$arity$1(exception_frame);
var exception = cljs.core.async.impl.ioc_helpers.aget_object.call(null,state,(5));
if(cljs.core.truth_((function (){var and__35486__auto__ = exception;
if(cljs.core.truth_(and__35486__auto__)){
return cljs.core.not.call(null,exception_frame);
} else {
return and__35486__auto__;
}
})())){
throw exception;
} else {
if(cljs.core.truth_((function (){var and__35486__auto__ = exception;
if(cljs.core.truth_(and__35486__auto__)){
var and__35486__auto____$1 = catch_block;
if(cljs.core.truth_(and__35486__auto____$1)){
return (cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"default","default",-1987822328),catch_exception)) || ((exception instanceof catch_exception));
} else {
return and__35486__auto____$1;
}
} else {
return and__35486__auto__;
}
})())){
var statearr_42197 = state;
(statearr_42197[(1)] = catch_block);
(statearr_42197[(2)] = exception);
(statearr_42197[(5)] = null);
(statearr_42197[(4)] = cljs.core.assoc.call(null,exception_frame,new cljs.core.Keyword(null,"catch-block","catch-block",1175212748),null,new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795),null));
return statearr_42197;
} else {
if(cljs.core.truth_((function (){var and__35486__auto__ = exception;
if(cljs.core.truth_(and__35486__auto__)){
return (cljs.core.not.call(null,catch_block)) && (cljs.core.not.call(null,new cljs.core.Keyword(null,"finally-block","finally-block",832982472).cljs$core$IFn$_invoke$arity$1(exception_frame)));
} else {
return and__35486__auto__;
}
})())){
var statearr_42198_42202 = state;
(statearr_42198_42202[(4)] = new cljs.core.Keyword(null,"prev","prev",-1597069226).cljs$core$IFn$_invoke$arity$1(exception_frame));
var G__42203 = state;
state = G__42203;
continue;
} else {
if(cljs.core.truth_((function (){var and__35486__auto__ = exception;
if(cljs.core.truth_(and__35486__auto__)){
var and__35486__auto____$1 = cljs.core.not.call(null,catch_block);
if(and__35486__auto____$1){
return new cljs.core.Keyword(null,"finally-block","finally-block",832982472).cljs$core$IFn$_invoke$arity$1(exception_frame);
} else {
return and__35486__auto____$1;
}
} else {
return and__35486__auto__;
}
})())){
var statearr_42199 = state;
(statearr_42199[(1)] = new cljs.core.Keyword(null,"finally-block","finally-block",832982472).cljs$core$IFn$_invoke$arity$1(exception_frame));
(statearr_42199[(4)] = cljs.core.assoc.call(null,exception_frame,new cljs.core.Keyword(null,"finally-block","finally-block",832982472),null));
return statearr_42199;
} else {
if(cljs.core.truth_((function (){var and__35486__auto__ = cljs.core.not.call(null,exception);
if(and__35486__auto__){
return new cljs.core.Keyword(null,"finally-block","finally-block",832982472).cljs$core$IFn$_invoke$arity$1(exception_frame);
} else {
return and__35486__auto__;
}
})())){
var statearr_42200 = state;
(statearr_42200[(1)] = new cljs.core.Keyword(null,"finally-block","finally-block",832982472).cljs$core$IFn$_invoke$arity$1(exception_frame));
(statearr_42200[(4)] = cljs.core.assoc.call(null,exception_frame,new cljs.core.Keyword(null,"finally-block","finally-block",832982472),null));
return statearr_42200;
} else {
if((cljs.core.not.call(null,exception)) && (cljs.core.not.call(null,new cljs.core.Keyword(null,"finally-block","finally-block",832982472).cljs$core$IFn$_invoke$arity$1(exception_frame)))){
var statearr_42201 = state;
(statearr_42201[(1)] = new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850).cljs$core$IFn$_invoke$arity$1(exception_frame));
(statearr_42201[(4)] = new cljs.core.Keyword(null,"prev","prev",-1597069226).cljs$core$IFn$_invoke$arity$1(exception_frame));
return statearr_42201;
} else {
throw (new Error("No matching clause"));
}
}
}
}
}
}
break;
}
});
//# sourceMappingURL=ioc_helpers.js.map?rel=1517021945188
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/core\/async\/impl\/ioc_helpers.js","sources":["ioc_helpers.cljs?rel=1517021945190"],"lineCount":489,"mappings":";AAAA;;;AAIA,0CAAA,1CAAaA;AACb,6CAAA,7CAAaC;AACb,6CAAA,7CAAaC;AACb,gDAAA,hDAAaC;AACb,oDAAA,pDAAaC;AACb,qDAAA,rDAAaC;AACb,kDAAA,lDAAaC;AAEb,+CAAA,\/CAAMC,sGAAaC,IAAIC,IAAIC;AAA3B,AACE,QAAMF,IAAIC,KAAIC;;AAEhB,+CAAA,\/CAAMC,sGAAaH,IAAIC;AAAvB,AACE,QAAMD,IAAIC;;AAGZ;;;mDAAA,nDAAM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AA,AAAA,GAAA,AAAAE,oCAAA,iFAAA,2EAAA,wEAAA,iFAAA,2DAAA,8FAAAD;AAAA,OAAAE,2BAAA,AAAAC,+BAAA,AAAAC,yBAAA,mCAAAL,yBAAAZ,eAAAa;;AAAA,4DAAAlC,mBAAAC,uBAAAC,qBAAAC,sBAAAC,YAAAiB,cAAA,AAAAkB,8BAAA,AAAAH,2BAAA9B,gBAAA4B,mBAAA,3PAAWoB;;;;AAAX,AAAA,AAAA,kGAAA,WAAAd,oBAAAC,iBAAAzB,lJAAWsC;;AAAX,AAAA,IAAAd,0BAAA;AAAA,AAAA,IAAAE,cAAAvF;IAAAwF,cAAAF;AAAA,AAAA,oBAAA,AAAAC,sBAAA,mEAAACLine truncated
@@ -0,0 +1,43 @@
;; Copyright (c) Rich Hickey and contributors. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.core.async.impl.protocols)
(def ^:const MAX-QUEUE-SIZE 1024)
(defprotocol ReadPort
(take! [port fn1-handler] "derefable val if taken, nil if take was enqueued"))
(defprotocol WritePort
(put! [port val fn1-handler] "derefable boolean (false if already closed) if handled, nil if put was enqueued.
Must throw on nil val."))
(defprotocol Channel
(close! [chan])
(closed? [chan]))
(defprotocol Handler
(active? [h] "returns true if has callback. Must work w/o lock")
(blockable? [h] "returns true if this handler may be blocked, otherwise it must not block")
#_(lock-id [h] "a unique id for lock acquisition order, 0 if no lock")
(commit [h] "commit to fulfilling its end of the transfer, returns cb. Must be called within lock"))
(defprotocol Buffer
(full? [b] "returns true if buffer cannot accept put")
(remove! [b] "remove and return next item from buffer, called under chan mutex")
(add!* [b itm] "if room, add item to the buffer, returns b, called under chan mutex")
(close-buf! [b] "called on chan closed under chan mutex, return ignored"))
(defn add!
([b] b)
([b itm]
(assert (not (nil? itm)))
(add!* b itm)))
;; Defines a buffer that will never block (return true to full?)
(defprotocol UnblockingBuffer)
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}}, :use-macros {}, :excludes #{}, :name cljs.core.async.impl.protocols, :imports nil, :requires nil, :cljs.spec/speced-vars [], :uses nil, :defs {remove! {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :line 32, :column 4, :end-line 32, :end-column 11, :protocol cljs.core.async.impl.protocols/Buffer, :doc "remove and return next item from buffer, called under chan mutex", :arglists (quote ([b]))}, :protocol cljs.core.async.impl.protocols/Buffer, :name cljs.core.async.impl.protocols/remove!, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :end-column 11, :method-params ([b]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 30, :end-line 32, :max-fixed-arity 1, :fn-var true, :arglists (quote ([b])), :doc "remove and return next item from buffer, called under chan mutex"}, close-buf! {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :line 34, :column 4, :end-line 34, :end-column 14, :protocol cljs.core.async.impl.protocols/Buffer, :doc "called on chan closed under chan mutex, return ignored", :arglists (quote ([b]))}, :protocol cljs.core.async.impl.protocols/Buffer, :name cljs.core.async.impl.protocols/close-buf!, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :end-column 14, :method-params ([b]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 30, :end-line 34, :max-fixed-arity 1, :fn-var true, :arglists (quote ([b])), :doc "called on chan closed under chan mutex, return ignored"}, close! {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :line 21, :column 4, :end-line 21, :end-column 10, :protocol cljs.core.async.impl.protocols/Channel, :doc nil, :arglists (quote ([chan]))}, :protocol cljs.core.async.impl.protocols/Channel, :name cljs.core.async.impl.protocols/close!, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :end-column 10, :method-params ([chan]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 20, :end-line 21, :max-fixed-arity 1, :fn-var true, :arglists (quote ([chan])), :doc nil}, Handler {:meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :line 24, :column 14, :end-line 24, :end-column 21, :doc nil, :protocol-symbol true, :jsdoc ("@interface"), :protocol-info {:methods {active? [[h]], blockable? [[h]], commit [[h]]}}}, :protocol-symbol true, :name cljs.core.async.impl.protocols/Handler, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :end-column 21, :column 1, :line 24, :protocol-info {:methods {active? [[h]], blockable? [[h]], commit [[h]]}}, :info nil, :end-line 24, :tag any, :impls #{}, :doc nil, :jsdoc ("@interface")}, blockable? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :line 26, :column 4, :end-line 26, :end-column 14, :protocol cljs.core.async.impl.protocols/Handler, :doc "returns true if this handler may be blocked, otherwise it must not block", :arglists (quote ([h]))}, :protocol cljs.core.async.impl.protocols/Handler, :name cljs.core.async.impl.protocols/blockable?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :end-column 14, :method-params ([h]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 24, :end-line 26, :max-fixed-arity 1, :fn-var true, :arglists (quote ([h])), :doc "returns true if this handler may be blocked, otherwise it must not block"}, active? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :line 25, :column 4, :end-line 25, :end-column 11, :protocol cljs.core.async.impl.protocols/Handler, :doc "returns true if has callback. Must work w/o lock", :arglists (quote ([h]))}, :protocol cljs.core.async.impl.protocols/Handler, :name cljs.core.async.impl.protocols/active?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :end-column 11, :method-params ([h]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 24, :end-line 25, :max-fixed-arity 1, :fn-var true, :arglists (quote ([h])), :doc "returns true if has callback. Must work w/o lock"}, Buffer {:meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/protocols.cljs", :line 30, :column 14, :end-line 30, :end-column 20, :doc nil, :protocol-symbol true, :jsdoc ("@interface"), :protocol-info {:methods {full? [[b]], remove! [[b]], add!* [[b itm]], close-buf! [[b]]}}}, :protocol-symbol true, :name cljs.core.async.Line truncated
@@ -0,0 +1,311 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.core.async.impl.protocols');
goog.require('cljs.core');
cljs.core.async.impl.protocols.MAX_QUEUE_SIZE = (1024);
/**
* @interface
*/
cljs.core.async.impl.protocols.ReadPort = function(){};
/**
* derefable val if taken, nil if take was enqueued
*/
cljs.core.async.impl.protocols.take_BANG_ = (function cljs$core$async$impl$protocols$take_BANG_(port,fn1_handler){
if((!((port == null))) && (!((port.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 == null)))){
return port.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2(port,fn1_handler);
} else {
var x__36231__auto__ = (((port == null))?null:port);
var m__36232__auto__ = (cljs.core.async.impl.protocols.take_BANG_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,port,fn1_handler);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.take_BANG_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,port,fn1_handler);
} else {
throw cljs.core.missing_protocol.call(null,"ReadPort.take!",port);
}
}
}
});
/**
* @interface
*/
cljs.core.async.impl.protocols.WritePort = function(){};
/**
* derefable boolean (false if already closed) if handled, nil if put was enqueued.
* Must throw on nil val.
*/
cljs.core.async.impl.protocols.put_BANG_ = (function cljs$core$async$impl$protocols$put_BANG_(port,val,fn1_handler){
if((!((port == null))) && (!((port.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 == null)))){
return port.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3(port,val,fn1_handler);
} else {
var x__36231__auto__ = (((port == null))?null:port);
var m__36232__auto__ = (cljs.core.async.impl.protocols.put_BANG_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,port,val,fn1_handler);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.put_BANG_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,port,val,fn1_handler);
} else {
throw cljs.core.missing_protocol.call(null,"WritePort.put!",port);
}
}
}
});
/**
* @interface
*/
cljs.core.async.impl.protocols.Channel = function(){};
cljs.core.async.impl.protocols.close_BANG_ = (function cljs$core$async$impl$protocols$close_BANG_(chan){
if((!((chan == null))) && (!((chan.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 == null)))){
return chan.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1(chan);
} else {
var x__36231__auto__ = (((chan == null))?null:chan);
var m__36232__auto__ = (cljs.core.async.impl.protocols.close_BANG_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,chan);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.close_BANG_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,chan);
} else {
throw cljs.core.missing_protocol.call(null,"Channel.close!",chan);
}
}
}
});
cljs.core.async.impl.protocols.closed_QMARK_ = (function cljs$core$async$impl$protocols$closed_QMARK_(chan){
if((!((chan == null))) && (!((chan.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1 == null)))){
return chan.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1(chan);
} else {
var x__36231__auto__ = (((chan == null))?null:chan);
var m__36232__auto__ = (cljs.core.async.impl.protocols.closed_QMARK_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,chan);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.closed_QMARK_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,chan);
} else {
throw cljs.core.missing_protocol.call(null,"Channel.closed?",chan);
}
}
}
});
/**
* @interface
*/
cljs.core.async.impl.protocols.Handler = function(){};
/**
* returns true if has callback. Must work w/o lock
*/
cljs.core.async.impl.protocols.active_QMARK_ = (function cljs$core$async$impl$protocols$active_QMARK_(h){
if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 == null)))){
return h.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(h);
} else {
var x__36231__auto__ = (((h == null))?null:h);
var m__36232__auto__ = (cljs.core.async.impl.protocols.active_QMARK_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,h);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.active_QMARK_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,h);
} else {
throw cljs.core.missing_protocol.call(null,"Handler.active?",h);
}
}
}
});
/**
* returns true if this handler may be blocked, otherwise it must not block
*/
cljs.core.async.impl.protocols.blockable_QMARK_ = (function cljs$core$async$impl$protocols$blockable_QMARK_(h){
if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 == null)))){
return h.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1(h);
} else {
var x__36231__auto__ = (((h == null))?null:h);
var m__36232__auto__ = (cljs.core.async.impl.protocols.blockable_QMARK_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,h);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.blockable_QMARK_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,h);
} else {
throw cljs.core.missing_protocol.call(null,"Handler.blockable?",h);
}
}
}
});
/**
* commit to fulfilling its end of the transfer, returns cb. Must be called within lock
*/
cljs.core.async.impl.protocols.commit = (function cljs$core$async$impl$protocols$commit(h){
if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$commit$arity$1 == null)))){
return h.cljs$core$async$impl$protocols$Handler$commit$arity$1(h);
} else {
var x__36231__auto__ = (((h == null))?null:h);
var m__36232__auto__ = (cljs.core.async.impl.protocols.commit[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,h);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.commit["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,h);
} else {
throw cljs.core.missing_protocol.call(null,"Handler.commit",h);
}
}
}
});
/**
* @interface
*/
cljs.core.async.impl.protocols.Buffer = function(){};
/**
* returns true if buffer cannot accept put
*/
cljs.core.async.impl.protocols.full_QMARK_ = (function cljs$core$async$impl$protocols$full_QMARK_(b){
if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 == null)))){
return b.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(b);
} else {
var x__36231__auto__ = (((b == null))?null:b);
var m__36232__auto__ = (cljs.core.async.impl.protocols.full_QMARK_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,b);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.full_QMARK_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,b);
} else {
throw cljs.core.missing_protocol.call(null,"Buffer.full?",b);
}
}
}
});
/**
* remove and return next item from buffer, called under chan mutex
*/
cljs.core.async.impl.protocols.remove_BANG_ = (function cljs$core$async$impl$protocols$remove_BANG_(b){
if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 == null)))){
return b.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(b);
} else {
var x__36231__auto__ = (((b == null))?null:b);
var m__36232__auto__ = (cljs.core.async.impl.protocols.remove_BANG_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,b);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.remove_BANG_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,b);
} else {
throw cljs.core.missing_protocol.call(null,"Buffer.remove!",b);
}
}
}
});
/**
* if room, add item to the buffer, returns b, called under chan mutex
*/
cljs.core.async.impl.protocols.add_BANG__STAR_ = (function cljs$core$async$impl$protocols$add_BANG__STAR_(b,itm){
if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 == null)))){
return b.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2(b,itm);
} else {
var x__36231__auto__ = (((b == null))?null:b);
var m__36232__auto__ = (cljs.core.async.impl.protocols.add_BANG__STAR_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,b,itm);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.add_BANG__STAR_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,b,itm);
} else {
throw cljs.core.missing_protocol.call(null,"Buffer.add!*",b);
}
}
}
});
/**
* called on chan closed under chan mutex, return ignored
*/
cljs.core.async.impl.protocols.close_buf_BANG_ = (function cljs$core$async$impl$protocols$close_buf_BANG_(b){
if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 == null)))){
return b.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1(b);
} else {
var x__36231__auto__ = (((b == null))?null:b);
var m__36232__auto__ = (cljs.core.async.impl.protocols.close_buf_BANG_[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,b);
} else {
var m__36232__auto____$1 = (cljs.core.async.impl.protocols.close_buf_BANG_["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,b);
} else {
throw cljs.core.missing_protocol.call(null,"Buffer.close-buf!",b);
}
}
}
});
cljs.core.async.impl.protocols.add_BANG_ = (function cljs$core$async$impl$protocols$add_BANG_(var_args){
var G__40831 = arguments.length;
switch (G__40831) {
case 1:
return cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (b){
return b;
});
cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (b,itm){
if(!((itm == null))){
} else {
throw (new Error("Assert failed: (not (nil? itm))"));
}
return cljs.core.async.impl.protocols.add_BANG__STAR_.call(null,b,itm);
});
cljs.core.async.impl.protocols.add_BANG_.cljs$lang$maxFixedArity = 2;
/**
* @interface
*/
cljs.core.async.impl.protocols.UnblockingBuffer = function(){};
//# sourceMappingURL=protocols.js.map?rel=1517021944696
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/core\/async\/impl\/protocols.js","sources":["protocols.cljs?rel=1517021944697"],"lineCount":311,"mappings":";AAQA;;AAEA,gDAAA,hDAAaA;AAEb,AAAA;AAAA;;;0CAAA,1CAAaM;;AAAb;;;4CAAA,5CACGC,gGAAOC,KAAKC;AADf,AAAA,GAAA,CAAA,EAAA,SAAA,YAAA,EAAA,CAAA,mEAAA,1FACUD,uBAAAA;AADV,OACUA,gEA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7B,qCAAA,oBAIe6B;;;;;;AAJf,AAMA,AAAA,2CAAA,mDAAAK,9FAAME;AAAN,AAAA,IAAAD,WAAA,AAAA;AAAA,AAAA,QAAAA;KAAA;AAAA,OAAAC,uEAAA,CAAA,UAAA;;;KAAA;AAAA,OAAAA,uEAAA,CAAA,UAAA,MAAA,CAAA,UAAA;;;;AAAA,MAAA,KAAAC,MAAA,CAAA,8DAAA,AAAA;;;;;AAAA,AAAA,yEAAA,zEAAMD,oFACFP;AADJ,AACOA;;;AADP,AAAA,yEAAA,zEAAMO,oFAEFP,EAAEG;AAFN,AAGK,GAAQ,EAAK,QAAA,PAAMA;AAAnB;AAAA,AAAA,MAAA,KAAAK,MAAA;;;AACA,OAACN,yDAAMF,EAAEG;;;AAJd,AAAA,mEAAA,nEAAMI;;AAAN,AAOA,AAAA;AAAA;;;kDAAA,lDAAaE;;AAAb","names":["cljs.core.async.impl.pLine truncated
@@ -0,0 +1,167 @@
;; Copyright (c) Rich Hickey and contributors. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.core.async.impl.timers
(:require [cljs.core.async.impl.protocols :as impl]
[cljs.core.async.impl.channels :as channels]
[cljs.core.async.impl.dispatch :as dispatch]))
(def MAX_LEVEL 15) ;; 16 levels
(def P (/ 1 2))
(defn random-level
([] (random-level 0))
([level]
(if (and (< (.random js/Math) P)
(< level MAX_LEVEL))
(recur (inc level))
level)))
(deftype SkipListNode [key ^:mutable val forward]
ISeqable
(-seq [coll]
(list key val))
IPrintWithWriter
(-pr-writer [coll writer opts]
(pr-sequential-writer writer pr-writer "[" " " "]" opts coll)))
(defn skip-list-node
([level] (skip-list-node nil nil level))
([k v level]
(let [arr (make-array (inc level))]
(loop [i 0]
(when (< i (alength arr))
(aset arr i nil)
(recur (inc i))))
(SkipListNode. k v arr))))
(defn least-greater-node
([x k level] (least-greater-node x k level nil))
([x k level update]
(if-not (neg? level)
(let [x (loop [x x]
(if-let [x' (aget (.-forward x) level)]
(if (< (.-key x') k)
(recur x')
x)
x))]
(when-not (nil? update)
(aset update level x))
(recur x k (dec level) update))
x)))
(deftype SkipList [header ^:mutable level]
Object
(put [coll k v]
(let [update (make-array MAX_LEVEL)
x (least-greater-node header k level update)
x (aget (.-forward x) 0)]
(if (and (not (nil? x)) (== (.-key x) k))
(set! (.-val x) v)
(let [new-level (random-level)]
(when (> new-level level)
(loop [i (inc level)]
(when (<= i (inc new-level))
(aset update i header)
(recur (inc i))))
(set! level new-level))
(let [x (skip-list-node k v (make-array new-level))]
(loop [i 0]
(when (<= i level)
(let [links (.-forward (aget update i))]
(aset (.-forward x) i (aget links i))
(aset links i x)))))))))
(remove [coll k]
(let [update (make-array MAX_LEVEL)
x (least-greater-node header k level update)
x (aget (.-forward x) 0)]
(when (and (not (nil? x)) (== (.-key x) k))
(loop [i 0]
(when (<= i level)
(let [links (.-forward (aget update i))]
(if (identical? (aget links i) x)
(do
(aset links i (aget (.-forward x) i))
(recur (inc i)))
(recur (inc i))))))
(while (and (> level 0)
(nil? (aget (.-forward header) level)))
(set! level (dec level))))))
(ceilingEntry [coll k]
(loop [x header level level]
(if-not (neg? level)
(let [nx (loop [x x]
(let [x' (aget (.-forward x) level)]
(when-not (nil? x')
(if (>= (.-key x') k)
x'
(recur x')))))]
(if-not (nil? nx)
(recur nx (dec level))
(recur x (dec level))))
(when-not (identical? x header)
x))))
(floorEntry [coll k]
(loop [x header level level]
(if-not (neg? level)
(let [nx (loop [x x]
(let [x' (aget (.-forward x) level)]
(if-not (nil? x')
(if (> (.-key x') k)
x
(recur x'))
(when (zero? level)
x))))]
(if nx
(recur nx (dec level))
(recur x (dec level))))
(when-not (identical? x header)
x))))
ISeqable
(-seq [coll]
(letfn [(iter [node]
(lazy-seq
(when-not (nil? node)
(cons [(.-key node) (.-val node)]
(iter (aget (.-forward node) 0))))))]
(iter (aget (.-forward header) 0))))
IPrintWithWriter
(-pr-writer [coll writer opts]
(let [pr-pair (fn [keyval]
(pr-sequential-writer writer pr-writer "" " " "" opts keyval))]
(pr-sequential-writer writer pr-pair "{" ", " "}" opts coll))))
(defn skip-list []
(SkipList. (skip-list-node 0) 0))
(def timeouts-map (skip-list))
(def TIMEOUT_RESOLUTION_MS 10)
(defn timeout
"returns a channel that will close after msecs"
[msecs]
(let [timeout (+ (.valueOf (js/Date.)) msecs)
me (.ceilingEntry timeouts-map timeout)]
(or (when (and me (< (.-key me) (+ timeout TIMEOUT_RESOLUTION_MS)))
(.-val me))
(let [timeout-channel (channels/chan nil)]
(.put timeouts-map timeout timeout-channel)
(dispatch/queue-delay
(fn []
(.remove timeouts-map timeout)
(impl/close! timeout-channel))
msecs)
timeout-channel))))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}, Math {random {}}, Array {}, Date {prototype {valueOf {}}}}, :use-macros {}, :excludes #{}, :name cljs.core.async.impl.timers, :imports nil, :requires {impl cljs.core.async.impl.protocols, cljs.core.async.impl.protocols cljs.core.async.impl.protocols, channels cljs.core.async.impl.channels, cljs.core.async.impl.channels cljs.core.async.impl.channels, dispatch cljs.core.async.impl.dispatch, cljs.core.async.impl.dispatch cljs.core.async.impl.dispatch}, :cljs.spec/speced-vars [], :uses nil, :defs {->SkipListNode {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :line 25, :column 10, :end-line 25, :end-column 22, :protocols #{cljs.core/ISeqable cljs.core/IPrintWithWriter}, :skip-protocol-flag #{cljs.core/ISeqable cljs.core/IPrintWithWriter}, :factory :positional, :arglists (quote ([key val forward]))}, :protocols #{cljs.core/ISeqable cljs.core/IPrintWithWriter}, :name cljs.core.async.impl.timers/->SkipListNode, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :end-column 22, :method-params ([key val forward]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :factory :positional, :line 25, :end-line 25, :max-fixed-arity 3, :fn-var true, :arglists (quote ([key val forward])), :skip-protocol-flag #{cljs.core/ISeqable cljs.core/IPrintWithWriter}}, timeout {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :line 152, :column 7, :end-line 152, :end-column 14, :arglists (quote ([msecs])), :doc "returns a channel that will close after msecs"}, :name cljs.core.async.impl.timers/timeout, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :end-column 14, :method-params ([msecs]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 152, :end-line 152, :max-fixed-arity 1, :fn-var true, :arglists (quote ([msecs])), :doc "returns a channel that will close after msecs"}, random-level {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :line 17, :column 7, :end-line 17, :end-column 19, :arglists (quote ([] [level])), :top-fn {:variadic false, :max-fixed-arity 1, :method-params ([] [level]), :arglists ([] [level]), :arglists-meta (nil nil)}}, :name cljs.core.async.impl.timers/random-level, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :end-column 19, :top-fn {:variadic false, :max-fixed-arity 1, :method-params ([] [level]), :arglists ([] [level]), :arglists-meta (nil nil)}, :method-params ([] [level]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 17, :end-line 17, :max-fixed-arity 1, :fn-var true, :arglists ([] [level])}, SkipList {:num-fields 2, :protocols #{cljs.core.async.impl.timers/Object cljs.core/ISeqable cljs.core/IPrintWithWriter}, :name cljs.core.async.impl.timers/SkipList, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :end-column 18, :type true, :column 10, :line 59, :record false, :end-line 59, :skip-protocol-flag #{cljs.core/ISeqable cljs.core/IPrintWithWriter}}, skip-list {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :line 145, :column 7, :end-line 145, :end-column 16, :arglists (quote ([]))}, :name cljs.core.async.impl.timers/skip-list, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :end-column 16, :method-params ([]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 145, :end-line 145, :max-fixed-arity 0, :fn-var true, :arglists (quote ([]))}, ->SkipList {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :line 59, :column 10, :end-line 59, :end-column 18, :protocols #{cljs.core.async.impl.timers/Object cljs.core/ISeqable cljs.core/IPrintWithWriter}, :skip-protocol-flag #{cljs.core/ISeqable cljs.core/IPrintWithWriter}, :factory :positional, :arglists (quote ([header level]))}, :protocols #{cljs.core.async.impl.timers/Object cljs.core/ISeqable cljs.core/IPrintWithWriter}, :name cljs.core.async.impl.timers/->SkipList, :variadic false, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :end-column 18, :method-params ([header level]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :factory :positional, :line 59, :end-line 59, :max-fixed-arity 2, :fn-var true, :arglists (quote ([header level])), :skip-protocol-flag #{cljs.core/ISeqable cljs.core/IPrintWithWriter}}, MAX_LEVEL {:name cljs.core.async.impl.timers/MAX_LEVEL, :file "target/cljsbuild/public/js/out/cljs/core/async/impl/timers.cljs", :line 14, :column 1, :end-line 14, :end-column 15, :meta {:file "/home/didier/clojupyteLine truncated
+476
View File
@@ -0,0 +1,476 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.core.async.impl.timers');
goog.require('cljs.core');
goog.require('cljs.core.async.impl.protocols');
goog.require('cljs.core.async.impl.channels');
goog.require('cljs.core.async.impl.dispatch');
cljs.core.async.impl.timers.MAX_LEVEL = (15);
cljs.core.async.impl.timers.P = ((1) / (2));
cljs.core.async.impl.timers.random_level = (function cljs$core$async$impl$timers$random_level(var_args){
var G__42207 = arguments.length;
switch (G__42207) {
case 0:
return cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$0();
break;
case 1:
return cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$0 = (function (){
return cljs.core.async.impl.timers.random_level.call(null,(0));
});
cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$1 = (function (level){
while(true){
if(((Math.random() < cljs.core.async.impl.timers.P)) && ((level < cljs.core.async.impl.timers.MAX_LEVEL))){
var G__42209 = (level + (1));
level = G__42209;
continue;
} else {
return level;
}
break;
}
});
cljs.core.async.impl.timers.random_level.cljs$lang$maxFixedArity = 1;
/**
* @constructor
* @implements {cljs.core.ISeqable}
* @implements {cljs.core.IPrintWithWriter}
*/
cljs.core.async.impl.timers.SkipListNode = (function (key,val,forward){
this.key = key;
this.val = val;
this.forward = forward;
this.cljs$lang$protocol_mask$partition0$ = 2155872256;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.core.async.impl.timers.SkipListNode.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){
var self__ = this;
var coll__$1 = this;
var x__36452__auto__ = self__.key;
return cljs.core._conj.call(null,(function (){var x__36452__auto____$1 = self__.val;
return cljs.core._conj.call(null,cljs.core.List.EMPTY,x__36452__auto____$1);
})(),x__36452__auto__);
});
cljs.core.async.impl.timers.SkipListNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){
var self__ = this;
var coll__$1 = this;
return cljs.core.pr_sequential_writer.call(null,writer,cljs.core.pr_writer,"["," ","]",opts,coll__$1);
});
cljs.core.async.impl.timers.SkipListNode.getBasis = (function (){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"key","key",124488940,null),cljs.core.with_meta(new cljs.core.Symbol(null,"val","val",1769233139,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),new cljs.core.Symbol(null,"forward","forward",1083186224,null)], null);
});
cljs.core.async.impl.timers.SkipListNode.cljs$lang$type = true;
cljs.core.async.impl.timers.SkipListNode.cljs$lang$ctorStr = "cljs.core.async.impl.timers/SkipListNode";
cljs.core.async.impl.timers.SkipListNode.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.timers/SkipListNode");
});
cljs.core.async.impl.timers.__GT_SkipListNode = (function cljs$core$async$impl$timers$__GT_SkipListNode(key,val,forward){
return (new cljs.core.async.impl.timers.SkipListNode(key,val,forward));
});
cljs.core.async.impl.timers.skip_list_node = (function cljs$core$async$impl$timers$skip_list_node(var_args){
var G__42211 = arguments.length;
switch (G__42211) {
case 1:
return cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 3:
return cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$1 = (function (level){
return cljs.core.async.impl.timers.skip_list_node.call(null,null,null,level);
});
cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$3 = (function (k,v,level){
var arr = (new Array((level + (1))));
var i_42213 = (0);
while(true){
if((i_42213 < arr.length)){
(arr[i_42213] = null);
var G__42214 = (i_42213 + (1));
i_42213 = G__42214;
continue;
} else {
}
break;
}
return (new cljs.core.async.impl.timers.SkipListNode(k,v,arr));
});
cljs.core.async.impl.timers.skip_list_node.cljs$lang$maxFixedArity = 3;
cljs.core.async.impl.timers.least_greater_node = (function cljs$core$async$impl$timers$least_greater_node(var_args){
var G__42216 = arguments.length;
switch (G__42216) {
case 3:
return cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
break;
case 4:
return cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$3 = (function (x,k,level){
return cljs.core.async.impl.timers.least_greater_node.call(null,x,k,level,null);
});
cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$4 = (function (x,k,level,update){
while(true){
if(!((level < (0)))){
var x__$1 = (function (){var x__$1 = x;
while(true){
var temp__5455__auto__ = (x__$1.forward[level]);
if(cljs.core.truth_(temp__5455__auto__)){
var x_SINGLEQUOTE_ = temp__5455__auto__;
if((x_SINGLEQUOTE_.key < k)){
var G__42218 = x_SINGLEQUOTE_;
x__$1 = G__42218;
continue;
} else {
return x__$1;
}
} else {
return x__$1;
}
break;
}
})();
if((update == null)){
} else {
(update[level] = x__$1);
}
var G__42219 = x__$1;
var G__42220 = k;
var G__42221 = (level - (1));
var G__42222 = update;
x = G__42219;
k = G__42220;
level = G__42221;
update = G__42222;
continue;
} else {
return x;
}
break;
}
});
cljs.core.async.impl.timers.least_greater_node.cljs$lang$maxFixedArity = 4;
/**
* @constructor
* @implements {cljs.core.async.impl.timers.Object}
* @implements {cljs.core.ISeqable}
* @implements {cljs.core.IPrintWithWriter}
*/
cljs.core.async.impl.timers.SkipList = (function (header,level){
this.header = header;
this.level = level;
this.cljs$lang$protocol_mask$partition0$ = 2155872256;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.core.async.impl.timers.SkipList.prototype.put = (function (k,v){
var self__ = this;
var coll = this;
var update = (new Array(cljs.core.async.impl.timers.MAX_LEVEL));
var x = cljs.core.async.impl.timers.least_greater_node.call(null,self__.header,k,self__.level,update);
var x__$1 = (x.forward[(0)]);
if((!((x__$1 == null))) && ((x__$1.key === k))){
return x__$1.val = v;
} else {
var new_level = cljs.core.async.impl.timers.random_level.call(null);
if((new_level > self__.level)){
var i_42223 = (self__.level + (1));
while(true){
if((i_42223 <= (new_level + (1)))){
(update[i_42223] = self__.header);
var G__42224 = (i_42223 + (1));
i_42223 = G__42224;
continue;
} else {
}
break;
}
self__.level = new_level;
} else {
}
var x__$2 = cljs.core.async.impl.timers.skip_list_node.call(null,k,v,(new Array(new_level)));
var i = (0);
while(true){
if((i <= self__.level)){
var links = (update[i]).forward;
(x__$2.forward[i] = (links[i]));
return (links[i] = x__$2);
} else {
return null;
}
break;
}
}
});
cljs.core.async.impl.timers.SkipList.prototype.remove = (function (k){
var self__ = this;
var coll = this;
var update = (new Array(cljs.core.async.impl.timers.MAX_LEVEL));
var x = cljs.core.async.impl.timers.least_greater_node.call(null,self__.header,k,self__.level,update);
var x__$1 = (x.forward[(0)]);
if((!((x__$1 == null))) && ((x__$1.key === k))){
var i_42225 = (0);
while(true){
if((i_42225 <= self__.level)){
var links_42226 = (update[i_42225]).forward;
if(((links_42226[i_42225]) === x__$1)){
(links_42226[i_42225] = (x__$1.forward[i_42225]));
var G__42227 = (i_42225 + (1));
i_42225 = G__42227;
continue;
} else {
var G__42228 = (i_42225 + (1));
i_42225 = G__42228;
continue;
}
} else {
}
break;
}
while(true){
if(((self__.level > (0))) && (((self__.header.forward[self__.level]) == null))){
self__.level = (self__.level - (1));
continue;
} else {
return null;
}
break;
}
} else {
return null;
}
});
cljs.core.async.impl.timers.SkipList.prototype.ceilingEntry = (function (k){
var self__ = this;
var coll = this;
var x = self__.header;
var level__$1 = self__.level;
while(true){
if(!((level__$1 < (0)))){
var nx = (function (){var x__$1 = x;
while(true){
var x_SINGLEQUOTE_ = (x__$1.forward[level__$1]);
if((x_SINGLEQUOTE_ == null)){
return null;
} else {
if((x_SINGLEQUOTE_.key >= k)){
return x_SINGLEQUOTE_;
} else {
var G__42229 = x_SINGLEQUOTE_;
x__$1 = G__42229;
continue;
}
}
break;
}
})();
if(!((nx == null))){
var G__42230 = nx;
var G__42231 = (level__$1 - (1));
x = G__42230;
level__$1 = G__42231;
continue;
} else {
var G__42232 = x;
var G__42233 = (level__$1 - (1));
x = G__42232;
level__$1 = G__42233;
continue;
}
} else {
if((x === self__.header)){
return null;
} else {
return x;
}
}
break;
}
});
cljs.core.async.impl.timers.SkipList.prototype.floorEntry = (function (k){
var self__ = this;
var coll = this;
var x = self__.header;
var level__$1 = self__.level;
while(true){
if(!((level__$1 < (0)))){
var nx = (function (){var x__$1 = x;
while(true){
var x_SINGLEQUOTE_ = (x__$1.forward[level__$1]);
if(!((x_SINGLEQUOTE_ == null))){
if((x_SINGLEQUOTE_.key > k)){
return x__$1;
} else {
var G__42234 = x_SINGLEQUOTE_;
x__$1 = G__42234;
continue;
}
} else {
if((level__$1 === (0))){
return x__$1;
} else {
return null;
}
}
break;
}
})();
if(cljs.core.truth_(nx)){
var G__42235 = nx;
var G__42236 = (level__$1 - (1));
x = G__42235;
level__$1 = G__42236;
continue;
} else {
var G__42237 = x;
var G__42238 = (level__$1 - (1));
x = G__42237;
level__$1 = G__42238;
continue;
}
} else {
if((x === self__.header)){
return null;
} else {
return x;
}
}
break;
}
});
cljs.core.async.impl.timers.SkipList.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){
var self__ = this;
var coll__$1 = this;
var iter = ((function (coll__$1){
return (function cljs$core$async$impl$timers$iter(node){
return (new cljs.core.LazySeq(null,((function (coll__$1){
return (function (){
if((node == null)){
return null;
} else {
return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [node.key,node.val], null),cljs$core$async$impl$timers$iter.call(null,(node.forward[(0)])));
}
});})(coll__$1))
,null,null));
});})(coll__$1))
;
return iter.call(null,(self__.header.forward[(0)]));
});
cljs.core.async.impl.timers.SkipList.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){
var self__ = this;
var coll__$1 = this;
var pr_pair = ((function (coll__$1){
return (function (keyval){
return cljs.core.pr_sequential_writer.call(null,writer,cljs.core.pr_writer,""," ","",opts,keyval);
});})(coll__$1))
;
return cljs.core.pr_sequential_writer.call(null,writer,pr_pair,"{",", ","}",opts,coll__$1);
});
cljs.core.async.impl.timers.SkipList.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"header","header",1759972661,null),cljs.core.with_meta(new cljs.core.Symbol(null,"level","level",-1363938217,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null))], null);
});
cljs.core.async.impl.timers.SkipList.cljs$lang$type = true;
cljs.core.async.impl.timers.SkipList.cljs$lang$ctorStr = "cljs.core.async.impl.timers/SkipList";
cljs.core.async.impl.timers.SkipList.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.core.async.impl.timers/SkipList");
});
cljs.core.async.impl.timers.__GT_SkipList = (function cljs$core$async$impl$timers$__GT_SkipList(header,level){
return (new cljs.core.async.impl.timers.SkipList(header,level));
});
cljs.core.async.impl.timers.skip_list = (function cljs$core$async$impl$timers$skip_list(){
return (new cljs.core.async.impl.timers.SkipList(cljs.core.async.impl.timers.skip_list_node.call(null,(0)),(0)));
});
cljs.core.async.impl.timers.timeouts_map = cljs.core.async.impl.timers.skip_list.call(null);
cljs.core.async.impl.timers.TIMEOUT_RESOLUTION_MS = (10);
/**
* returns a channel that will close after msecs
*/
cljs.core.async.impl.timers.timeout = (function cljs$core$async$impl$timers$timeout(msecs){
var timeout = ((new Date()).valueOf() + msecs);
var me = cljs.core.async.impl.timers.timeouts_map.ceilingEntry(timeout);
var or__35498__auto__ = (cljs.core.truth_((function (){var and__35486__auto__ = me;
if(cljs.core.truth_(and__35486__auto__)){
return (me.key < (timeout + cljs.core.async.impl.timers.TIMEOUT_RESOLUTION_MS));
} else {
return and__35486__auto__;
}
})())?me.val:null);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
var timeout_channel = cljs.core.async.impl.channels.chan.call(null,null);
cljs.core.async.impl.timers.timeouts_map.put(timeout,timeout_channel);
cljs.core.async.impl.dispatch.queue_delay.call(null,((function (timeout_channel,or__35498__auto__,timeout,me){
return (function (){
cljs.core.async.impl.timers.timeouts_map.remove(timeout);
return cljs.core.async.impl.protocols.close_BANG_.call(null,timeout_channel);
});})(timeout_channel,or__35498__auto__,timeout,me))
,msecs);
return timeout_channel;
}
});
//# sourceMappingURL=timers.js.map?rel=1517021945247
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/core\/async\/impl\/timers.js","sources":["timers.cljs?rel=1517021945249"],"lineCount":476,"mappings":";AAQA;;;;;AAKA,wCAAA,xCAAKA;AACL,AAAKC,gCAAE,CAAA,MAAA;AAEP,AAAA,2CAAA,mDAAAC,9FAAME;AAAN,AAAA,IAAAD,WAAA,AAAA;AAAA,AAAA,QAAAA;KAAA;AAAA,OAAAC;;;KAAA;AAAA,OAAAA,uEAAA,CAAA,UAAA;;;;AAAA,MAAA,KAAAC,MAAA,CAAA,8DAAA,AAAA;;;;;AAAA,AAAA,yEAAA,zEAAMD;AAAN,AACM,0DAAA,nDAACA;;;AADP,AAAA,yEAAA,zEAAMA,oFAEFE;;AAFJ,AAGI,GAAI,CAAK,CAAG,AAASC,gBAASN,oCACrB,CAAGK,QAAMN;AAChB,eAAO,SAAA,RAAKM;;;;AACZA;;;;;;AANN,AAA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xB;;AAAA,AACEN;;;;;;;AArEV,AAAA,AAAA,iFAAA,jFAASI,4FAwEApB;;AAxET,AAAA,eAAA,XAwESA;AAxET,AAyEI,WAAA;kDAAe0B;AAAf,AACU,YAAAC,kBAAA,KAAA;;AAAA,AACE,GAAU,SAAA,RAAMD;AAAhB;;AAAA,AACE,gCAAA,zBAACE,4GAAM,AAAOF,SAAM,AAAOA,iBACzB,Line truncated
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {isNaN {}, Infinity {}, parseFloat {}, parseInt {}, Error {}, String {}, Number {}, RegExp {prototype {exec {}, lastIndex {}}}, Object {exec {}, index {}}}, :use-macros {deftype cljs.pprint, print-length-loop cljs.pprint, defdirectives cljs.pprint, getf cljs.pprint, pprint-logical-block cljs.pprint, formatter-out cljs.pprint, with-pretty-writer cljs.pprint, setf cljs.pprint}, :excludes #{pr float? deftype prn println print}, :name cljs.pprint, :imports {StringBuffer goog.string.StringBuffer}, :requires {cljs.core cljs.core, string clojure.string, clojure.string clojure.string, gstring goog.string, goog.string goog.string, StringBuffer goog.string.StringBuffer}, :cljs.spec/speced-vars [], :uses {IWriter cljs.core, IDeref cljs.core}, :defs {indent-t {:num-fields 6, :protocols #{cljs.core/IRecord cljs.core/IEquiv cljs.core/IHash cljs.core/ICollection cljs.core/ICounted cljs.core/ISeqable cljs.core/IMeta cljs.core/ICloneable cljs.core/IPrintWithWriter cljs.core/IIterable cljs.core/IWithMeta cljs.core/IAssociative cljs.core/IMap cljs.core/ILookup}, :name cljs.pprint/indent-t, :file "target/cljsbuild/public/js/out/cljs/pprint.cljs", :end-column 18, :type true, :column 10, :internal-ctor true, :line 259, :record true, :end-line 259, :skip-protocol-flag #{cljs.core/IRecord cljs.core/IEquiv cljs.core/IHash cljs.core/ICollection cljs.core/ICounted cljs.core/ISeqable cljs.core/IMeta cljs.core/ICloneable cljs.core/IPrintWithWriter cljs.core/IIterable cljs.core/IWithMeta cljs.core/IAssociative cljs.core/IMap cljs.core/ILookup}}, write-token-string {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/pprint.cljs", :line 399, :column 8, :end-line 399, :end-column 26, :private true, :arglists (quote ([this tokens]))}, :private true, :name cljs.pprint/write-token-string, :variadic false, :file "target/cljsbuild/public/js/out/cljs/pprint.cljs", :end-column 26, :method-params ([this tokens]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 399, :end-line 399, :max-fixed-arity 2, :fn-var true, :arglists (quote ([this tokens]))}, process-nesting {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/pprint.cljs", :line 2659, :column 8, :end-line 2659, :end-column 23, :private true, :arglists (quote ([format])), :doc "Take a linearly compiled format and process the bracket directives to give it\n the appropriate tree structure"}, :private true, :name cljs.pprint/process-nesting, :variadic false, :file "target/cljsbuild/public/js/out/cljs/pprint.cljs", :end-column 23, :method-params ([format]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 2659, :end-line 2659, :max-fixed-arity 1, :fn-var true, :arglists (quote ([format])), :doc "Take a linearly compiled format and process the bracket directives to give it\n the appropriate tree structure"}, init-cap-writer {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/pprint.cljs", :line 2009, :column 8, :end-line 2009, :end-column 23, :private true, :arglists (quote ([writer])), :doc "Returns a proxy that wraps writer, capitalizing the first word"}, :private true, :name cljs.pprint/init-cap-writer, :variadic false, :file "target/cljsbuild/public/js/out/cljs/pprint.cljs", :end-column 23, :method-params ([writer]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 2009, :end-line 2009, :max-fixed-arity 1, :fn-var true, :arglists (quote ([writer])), :doc "Returns a proxy that wraps writer, capitalizing the first word"}, check-enumerated-arg {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/pprint.cljs", :line 835, :column 8, :end-line 835, :end-column 28, :private true, :arglists (quote ([arg choices]))}, :private true, :name cljs.pprint/check-enumerated-arg, :variadic false, :file "target/cljsbuild/public/js/out/cljs/pprint.cljs", :end-column 28, :method-params ([arg choices]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 835, :end-line 835, :max-fixed-arity 2, :fn-var true, :arglists (quote ([arg choices]))}, brackets {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/pprint.cljs", :line 2929, :column 8, :end-line 2929, :end-column 16, :private true, :arglists (quote ([form])), :doc "Figure out which kind of brackets to use"}, :private true, :name cljs.pprint/brackets, :variadic false, :file "target/cljsbuild/public/js/out/cljs/pprint.cljs", :end-column 16, :method-params ([form]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 2929, :end-line 2929, :max-fixed-arity 1, :fn-var true, :arglists (quote ([form])), :doc "Figure out which kind of brackets to use"}, get-section {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/pprint.cljs", :line 358, :column Line truncated
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/pprint.js","sources":["pprint.cljs?rel=1517021943682"],"lineCount":8107,"mappings":";AAQA;;;;;;AAgBA,AAAA,oBAAA,4BAAAA,hDAAOM;AAAP,AAAA,IAAAL,sBAAA;AAAA,AAAA,IAAAC,2BAAA,AAAA;AAAA,AAAA,IAAAC,yBAAA;;AAAA,AAAA,GAAA,CAAAA,yBAAAD;AAAA,AAAA,AAAAD,yBAAA,CAAA,UAAAE;;AAAA,eAAA,CAAAA,yBAAA;;;;AAAA;;;;AAAA,IAAAC,wBAAA,EAAA,CAAA,MAAA,AAAAH,6BAAA,AAAA,KAAAI,qBAAA,AAAAJ,0BAAA,KAAA,IAAA,OAAA;AAAA,AAAA,OAAAK,uDAAAF;;;AAAA,AAAA,AAAA,AAAAE,yDAAA,WAA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CAAUI;SAAV,AAAAzC,wBAAAqC,WAAA,IAAA,5CAAaK;AAAb,AAAA,OAAAJ,yBAAA,gGAAA,AAAAJ,8CAAA,AAAAK,yBAAArB,pFAAsBsB,EAAEC;;;AAAxB;;;;GAAA,KAAA;;AAAA,AAAA,OAAAxB,8BAAkBF;MAC3B,yBAAA,zBAACC,4DAAQ,iBAAAC,sBAAA,8CAAA0B;AAAA,AAAA,YAAAxB,kBAAA,KAAA;AAAA,AAAA,IAAAwB,eAAAA;;AAAA,AAAA,IAAAvB,qBAAA,AAAAtD,wBAAA6E;AAAA,AAAA,GAAAvB;AAALine truncated
+214
View File
@@ -0,0 +1,214 @@
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
(ns cljs.reader
(:require-macros [cljs.reader :refer [add-data-readers]])
(:require [goog.object :as gobject]
[cljs.tools.reader :as treader]
[cljs.tools.reader.edn :as edn])
(:import [goog.string StringBuffer]))
(defn ^:private zero-fill-right-and-truncate [s width]
(cond
(= width (count s)) s
(< width (count s)) (subs s 0 width)
:else
(loop [b (StringBuffer. s)]
(if (< (.getLength b) width)
(recur (.append b "0"))
(.toString b)))))
(defn ^:private divisible?
[num div]
(zero? (mod num div)))
(defn ^:private indivisible?
[num div]
(not (divisible? num div)))
(defn ^:private leap-year?
[year]
(and (divisible? year 4)
(or (indivisible? year 100)
(divisible? year 400))))
(def ^:private days-in-month
(let [dim-norm [nil 31 28 31 30 31 30 31 31 30 31 30 31]
dim-leap [nil 31 29 31 30 31 30 31 31 30 31 30 31]]
(fn [month leap-year?]
(get (if leap-year? dim-leap dim-norm) month))))
(def ^:private timestamp-regex #"(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?")
(defn ^:private parse-int [s]
(let [n (js/parseInt s 10)]
(if-not (js/isNaN n)
n)))
(defn ^:private check [low n high msg]
(when-not (<= low n high)
(throw (js/Error. (str msg " Failed: " low "<=" n "<=" high))))
n)
(defn parse-and-validate-timestamp [s]
(let [[_ years months days hours minutes seconds fraction offset-sign offset-hours offset-minutes :as v]
(re-matches timestamp-regex s)]
(if-not v
(throw (js/Error. (str "Unrecognized date/time syntax: " s)))
(let [years (parse-int years)
months (or (parse-int months) 1)
days (or (parse-int days) 1)
hours (or (parse-int hours) 0)
minutes (or (parse-int minutes) 0)
seconds (or (parse-int seconds) 0)
fraction (or (parse-int (zero-fill-right-and-truncate fraction 3)) 0)
offset-sign (if (= offset-sign "-") -1 1)
offset-hours (or (parse-int offset-hours) 0)
offset-minutes (or (parse-int offset-minutes) 0)
offset (* offset-sign (+ (* offset-hours 60) offset-minutes))]
[years
(check 1 months 12 "timestamp month field must be in range 1..12")
(check 1 days (days-in-month months (leap-year? years)) "timestamp day field must be in range 1..last day in month")
(check 0 hours 23 "timestamp hour field must be in range 0..23")
(check 0 minutes 59 "timestamp minute field must be in range 0..59")
(check 0 seconds (if (= minutes 59) 60 59) "timestamp second field must be in range 0..60")
(check 0 fraction 999 "timestamp millisecond field must be in range 0..999")
offset]))))
(defn parse-timestamp
[ts]
(if-let [[years months days hours minutes seconds ms offset]
(parse-and-validate-timestamp ts)]
(js/Date.
(- (.UTC js/Date years (dec months) days hours minutes seconds ms)
(* offset 60 1000)))
(throw (js/Error. (str "Unrecognized date/time syntax: " ts)))))
(defn ^:private read-date
[s]
(if (string? s)
(parse-timestamp s)
(throw (js/Error. "Instance literal expects a string for its timestamp."))))
(defn ^:private read-queue
[elems]
(if (vector? elems)
(into cljs.core/PersistentQueue.EMPTY elems)
(throw (js/Error. "Queue literal expects a vector for its elements."))))
(defn ^:private read-js
[form]
(cond
(vector? form)
(let [arr (array)]
(doseq [x form]
(.push arr x))
arr)
(map? form)
(let [obj (js-obj)]
(doseq [[k v] form]
(gobject/set obj (name k) v))
obj)
:else
(throw
(js/Error.
(str "JS literal expects a vector or map containing "
"only string or unqualified keyword keys")))))
(defn ^:private read-uuid
[uuid]
(if (string? uuid)
(cljs.core/uuid uuid)
(throw (js/Error. "UUID literal expects a string as its representation."))))
(def ^:dynamic *default-data-reader-fn*
(atom nil))
(def ^:dynamic *tag-table*
(atom
(add-data-readers
{'inst read-date
'uuid read-uuid
'queue read-queue
'js read-js})))
(defn read
"Reads the first object from an cljs.tools.reader.reader-types/IPushbackReader.
Returns the object read. If EOF, throws if eof-error? is true otherwise returns eof.
If no reader is provided, *in* will be used.
Reads data in the edn format (subset of Clojure data):
http://edn-format.org
cljs.tools.reader.edn/read doesn't depend on dynamic Vars, all configuration
is done by passing an opt map.
opts is a map that can include the following keys:
:eof - value to return on end-of-file. When not supplied, eof throws an exception.
:readers - a map of tag symbols to data-reader functions to be considered before default-data-readers.
When not supplied, only the default-data-readers will be used.
:default - A function of two args, that will, if present and no reader is found for a tag,
be called with the tag and the value."
([reader]
(edn/read
{:readers @*tag-table*
:default @*default-data-reader-fn*
:eof nil}
reader))
([{:keys [eof] :as opts} reader]
(edn/read
(update (merge opts {:default @*default-data-reader-fn*})
:readers (fn [m] (merge @*tag-table* m))) reader))
([reader eof-error? eof opts]
(edn/read reader eof-error? eof
(update (merge opts {:default @*default-data-reader-fn*})
:readers (fn [m] (merge @*tag-table* m))))))
(defn read-string
"Reads one object from the string s.
Returns nil when s is nil or empty.
Reads data in the edn format (subset of Clojure data):
http://edn-format.org
opts is a map as per cljs.tools.reader.edn/read"
([s]
(edn/read-string
{:readers @*tag-table*
:default @*default-data-reader-fn*
:eof nil} s))
([opts s]
(edn/read-string
(update (merge {:default @*default-data-reader-fn*} opts)
:readers (fn [m] (merge @*tag-table* m))) s)))
(defn register-tag-parser!
[tag f]
(let [old-parser (get @*tag-table* tag)]
(swap! *tag-table* assoc tag f)
old-parser))
(defn deregister-tag-parser!
[tag]
(let [old-parser (get @*tag-table* tag)]
(swap! *tag-table* dissoc tag)
old-parser))
(defn register-default-tag-parser!
[f]
(let [old-parser @*default-data-reader-fn*]
(swap! *default-data-reader-fn* (fn [_] f))
old-parser))
(defn deregister-default-tag-parser!
[]
(let [old-parser @*default-data-reader-fn*]
(swap! *default-data-reader-fn* (fn [_] nil))
old-parser))
+1
View File
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {parseInt {}, isNaN {}, Error {}, Date {UTC {}}}, :use-macros {add-data-readers cljs.reader}, :excludes #{}, :name cljs.reader, :imports {StringBuffer goog.string.StringBuffer}, :requires {gobject goog.object, goog.object goog.object, treader cljs.tools.reader, cljs.tools.reader cljs.tools.reader, edn cljs.tools.reader.edn, cljs.tools.reader.edn cljs.tools.reader.edn, StringBuffer goog.string.StringBuffer}, :cljs.spec/speced-vars [], :uses nil, :defs {read-uuid {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/reader.cljs", :line 125, :column 17, :end-line 125, :end-column 26, :private true, :arglists (quote ([uuid]))}, :private true, :name cljs.reader/read-uuid, :variadic false, :file "target/cljsbuild/public/js/out/cljs/reader.cljs", :end-column 26, :method-params ([uuid]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 125, :end-line 125, :max-fixed-arity 1, :fn-var true, :arglists (quote ([uuid]))}, leap-year? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/reader.cljs", :line 34, :column 17, :end-line 34, :end-column 27, :private true, :arglists (quote ([year]))}, :private true, :name cljs.reader/leap-year?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/reader.cljs", :end-column 27, :method-params ([year]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 34, :end-line 34, :max-fixed-arity 1, :fn-var true, :arglists (quote ([year]))}, *default-data-reader-fn* {:name cljs.reader/*default-data-reader-fn*, :file "target/cljsbuild/public/js/out/cljs/reader.cljs", :line 131, :column 1, :end-line 131, :end-column 40, :dynamic true, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/reader.cljs", :line 131, :column 16, :end-line 131, :end-column 40, :dynamic true}, :tag any}, read {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/reader.cljs", :line 142, :column 7, :end-line 142, :end-column 11, :arglists (quote ([reader] [{:keys [eof], :as opts} reader] [reader eof-error? eof opts])), :doc "Reads the first object from an cljs.tools.reader.reader-types/IPushbackReader.\n Returns the object read. If EOF, throws if eof-error? is true otherwise returns eof.\n If no reader is provided, *in* will be used.\n\n Reads data in the edn format (subset of Clojure data):\n http://edn-format.org\n\n cljs.tools.reader.edn/read doesn't depend on dynamic Vars, all configuration\n is done by passing an opt map.\n\n opts is a map that can include the following keys:\n :eof - value to return on end-of-file. When not supplied, eof throws an exception.\n :readers - a map of tag symbols to data-reader functions to be considered before default-data-readers.\n When not supplied, only the default-data-readers will be used.\n :default - A function of two args, that will, if present and no reader is found for a tag,\n be called with the tag and the value.", :top-fn {:variadic false, :max-fixed-arity 4, :method-params ([reader] [{:keys [eof], :as opts} reader] [reader eof-error? eof opts]), :arglists ([reader] [{:keys [eof], :as opts} reader] [reader eof-error? eof opts]), :arglists-meta (nil nil nil)}}, :name cljs.reader/read, :variadic false, :file "target/cljsbuild/public/js/out/cljs/reader.cljs", :end-column 11, :top-fn {:variadic false, :max-fixed-arity 4, :method-params ([reader] [{:keys [eof], :as opts} reader] [reader eof-error? eof opts]), :arglists ([reader] [{:keys [eof], :as opts} reader] [reader eof-error? eof opts]), :arglists-meta (nil nil nil)}, :method-params ([reader] [{:keys [eof], :as opts} reader] [reader eof-error? eof opts]), :protocol-impl nil, :arglists-meta (nil nil nil), :column 1, :line 142, :end-line 142, :max-fixed-arity 4, :fn-var true, :arglists ([reader] [{:keys [eof], :as opts} reader] [reader eof-error? eof opts]), :doc "Reads the first object from an cljs.tools.reader.reader-types/IPushbackReader.\n Returns the object read. If EOF, throws if eof-error? is true otherwise returns eof.\n If no reader is provided, *in* will be used.\n\n Reads data in the edn format (subset of Clojure data):\n http://edn-format.org\n\n cljs.tools.reader.edn/read doesn't depend on dynamic Vars, all configuration\n is done by passing an opt map.\n\n opts is a map that can include the following keys:\n :eof - value to return on end-of-file. When not supplied, eof throws an exception.\n :readers - a map of tag symbols to data-reader functions to be considered before default-data-readers.\n When not supplied, only the default-data-readers will be used.\n :default - A function of two args, that will, if present and no reader is found for a tag,\n be called with the tag and the value."}, *tag-table* {:name cljs.reader/*tag-table*, :file "target/cljsbuild/publLine truncated
+451
View File
@@ -0,0 +1,451 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.reader');
goog.require('cljs.core');
goog.require('goog.object');
goog.require('cljs.tools.reader');
goog.require('cljs.tools.reader.edn');
goog.require('goog.string.StringBuffer');
cljs.reader.zero_fill_right_and_truncate = (function cljs$reader$zero_fill_right_and_truncate(s,width){
if(cljs.core._EQ_.call(null,width,cljs.core.count.call(null,s))){
return s;
} else {
if((width < cljs.core.count.call(null,s))){
return cljs.core.subs.call(null,s,(0),width);
} else {
var b = (new goog.string.StringBuffer(s));
while(true){
if((b.getLength() < width)){
var G__44503 = b.append("0");
b = G__44503;
continue;
} else {
return b.toString();
}
break;
}
}
}
});
cljs.reader.divisible_QMARK_ = (function cljs$reader$divisible_QMARK_(num,div){
return (cljs.core.mod.call(null,num,div) === (0));
});
cljs.reader.indivisible_QMARK_ = (function cljs$reader$indivisible_QMARK_(num,div){
return cljs.core.not.call(null,cljs.reader.divisible_QMARK_.call(null,num,div));
});
cljs.reader.leap_year_QMARK_ = (function cljs$reader$leap_year_QMARK_(year){
var and__35486__auto__ = cljs.reader.divisible_QMARK_.call(null,year,(4));
if(cljs.core.truth_(and__35486__auto__)){
var or__35498__auto__ = cljs.reader.indivisible_QMARK_.call(null,year,(100));
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return cljs.reader.divisible_QMARK_.call(null,year,(400));
}
} else {
return and__35486__auto__;
}
});
cljs.reader.days_in_month = (function (){var dim_norm = new cljs.core.PersistentVector(null, 13, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,(31),(28),(31),(30),(31),(30),(31),(31),(30),(31),(30),(31)], null);
var dim_leap = new cljs.core.PersistentVector(null, 13, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,(31),(29),(31),(30),(31),(30),(31),(31),(30),(31),(30),(31)], null);
return ((function (dim_norm,dim_leap){
return (function (month,leap_year_QMARK_){
return cljs.core.get.call(null,(cljs.core.truth_(leap_year_QMARK_)?dim_leap:dim_norm),month);
});
;})(dim_norm,dim_leap))
})();
cljs.reader.timestamp_regex = /(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?/;
cljs.reader.parse_int = (function cljs$reader$parse_int(s){
var n = parseInt(s,(10));
if(cljs.core.not.call(null,isNaN(n))){
return n;
} else {
return null;
}
});
cljs.reader.check = (function cljs$reader$check(low,n,high,msg){
if(((low <= n)) && ((n <= high))){
} else {
throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1(msg)," Failed: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(low),"<=",cljs.core.str.cljs$core$IFn$_invoke$arity$1(n),"<=",cljs.core.str.cljs$core$IFn$_invoke$arity$1(high)].join('')));
}
return n;
});
cljs.reader.parse_and_validate_timestamp = (function cljs$reader$parse_and_validate_timestamp(s){
var vec__44504 = cljs.core.re_matches.call(null,cljs.reader.timestamp_regex,s);
var _ = cljs.core.nth.call(null,vec__44504,(0),null);
var years = cljs.core.nth.call(null,vec__44504,(1),null);
var months = cljs.core.nth.call(null,vec__44504,(2),null);
var days = cljs.core.nth.call(null,vec__44504,(3),null);
var hours = cljs.core.nth.call(null,vec__44504,(4),null);
var minutes = cljs.core.nth.call(null,vec__44504,(5),null);
var seconds = cljs.core.nth.call(null,vec__44504,(6),null);
var fraction = cljs.core.nth.call(null,vec__44504,(7),null);
var offset_sign = cljs.core.nth.call(null,vec__44504,(8),null);
var offset_hours = cljs.core.nth.call(null,vec__44504,(9),null);
var offset_minutes = cljs.core.nth.call(null,vec__44504,(10),null);
var v = vec__44504;
if(cljs.core.not.call(null,v)){
throw (new Error(["Unrecognized date/time syntax: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(s)].join('')));
} else {
var years__$1 = cljs.reader.parse_int.call(null,years);
var months__$1 = (function (){var or__35498__auto__ = cljs.reader.parse_int.call(null,months);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return (1);
}
})();
var days__$1 = (function (){var or__35498__auto__ = cljs.reader.parse_int.call(null,days);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return (1);
}
})();
var hours__$1 = (function (){var or__35498__auto__ = cljs.reader.parse_int.call(null,hours);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return (0);
}
})();
var minutes__$1 = (function (){var or__35498__auto__ = cljs.reader.parse_int.call(null,minutes);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return (0);
}
})();
var seconds__$1 = (function (){var or__35498__auto__ = cljs.reader.parse_int.call(null,seconds);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return (0);
}
})();
var fraction__$1 = (function (){var or__35498__auto__ = cljs.reader.parse_int.call(null,cljs.reader.zero_fill_right_and_truncate.call(null,fraction,(3)));
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return (0);
}
})();
var offset_sign__$1 = ((cljs.core._EQ_.call(null,offset_sign,"-"))?(-1):(1));
var offset_hours__$1 = (function (){var or__35498__auto__ = cljs.reader.parse_int.call(null,offset_hours);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return (0);
}
})();
var offset_minutes__$1 = (function (){var or__35498__auto__ = cljs.reader.parse_int.call(null,offset_minutes);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return (0);
}
})();
var offset = (offset_sign__$1 * ((offset_hours__$1 * (60)) + offset_minutes__$1));
return new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [years__$1,cljs.reader.check.call(null,(1),months__$1,(12),"timestamp month field must be in range 1..12"),cljs.reader.check.call(null,(1),days__$1,cljs.reader.days_in_month.call(null,months__$1,cljs.reader.leap_year_QMARK_.call(null,years__$1)),"timestamp day field must be in range 1..last day in month"),cljs.reader.check.call(null,(0),hours__$1,(23),"timestamp hour field must be in range 0..23"),cljs.reader.check.call(null,(0),minutes__$1,(59),"timestamp minute field must be in range 0..59"),cljs.reader.check.call(null,(0),seconds__$1,((cljs.core._EQ_.call(null,minutes__$1,(59)))?(60):(59)),"timestamp second field must be in range 0..60"),cljs.reader.check.call(null,(0),fraction__$1,(999),"timestamp millisecond field must be in range 0..999"),offset], null);
}
});
cljs.reader.parse_timestamp = (function cljs$reader$parse_timestamp(ts){
var temp__5455__auto__ = cljs.reader.parse_and_validate_timestamp.call(null,ts);
if(cljs.core.truth_(temp__5455__auto__)){
var vec__44507 = temp__5455__auto__;
var years = cljs.core.nth.call(null,vec__44507,(0),null);
var months = cljs.core.nth.call(null,vec__44507,(1),null);
var days = cljs.core.nth.call(null,vec__44507,(2),null);
var hours = cljs.core.nth.call(null,vec__44507,(3),null);
var minutes = cljs.core.nth.call(null,vec__44507,(4),null);
var seconds = cljs.core.nth.call(null,vec__44507,(5),null);
var ms = cljs.core.nth.call(null,vec__44507,(6),null);
var offset = cljs.core.nth.call(null,vec__44507,(7),null);
return (new Date((Date.UTC(years,(months - (1)),days,hours,minutes,seconds,ms) - ((offset * (60)) * (1000)))));
} else {
throw (new Error(["Unrecognized date/time syntax: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(ts)].join('')));
}
});
cljs.reader.read_date = (function cljs$reader$read_date(s){
if(typeof s === 'string'){
return cljs.reader.parse_timestamp.call(null,s);
} else {
throw (new Error("Instance literal expects a string for its timestamp."));
}
});
cljs.reader.read_queue = (function cljs$reader$read_queue(elems){
if(cljs.core.vector_QMARK_.call(null,elems)){
return cljs.core.into.call(null,cljs.core.PersistentQueue.EMPTY,elems);
} else {
throw (new Error("Queue literal expects a vector for its elements."));
}
});
cljs.reader.read_js = (function cljs$reader$read_js(form){
if(cljs.core.vector_QMARK_.call(null,form)){
var arr = [];
var seq__44510_44526 = cljs.core.seq.call(null,form);
var chunk__44511_44527 = null;
var count__44512_44528 = (0);
var i__44513_44529 = (0);
while(true){
if((i__44513_44529 < count__44512_44528)){
var x_44530 = cljs.core._nth.call(null,chunk__44511_44527,i__44513_44529);
arr.push(x_44530);
var G__44531 = seq__44510_44526;
var G__44532 = chunk__44511_44527;
var G__44533 = count__44512_44528;
var G__44534 = (i__44513_44529 + (1));
seq__44510_44526 = G__44531;
chunk__44511_44527 = G__44532;
count__44512_44528 = G__44533;
i__44513_44529 = G__44534;
continue;
} else {
var temp__5457__auto___44535 = cljs.core.seq.call(null,seq__44510_44526);
if(temp__5457__auto___44535){
var seq__44510_44536__$1 = temp__5457__auto___44535;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__44510_44536__$1)){
var c__36429__auto___44537 = cljs.core.chunk_first.call(null,seq__44510_44536__$1);
var G__44538 = cljs.core.chunk_rest.call(null,seq__44510_44536__$1);
var G__44539 = c__36429__auto___44537;
var G__44540 = cljs.core.count.call(null,c__36429__auto___44537);
var G__44541 = (0);
seq__44510_44526 = G__44538;
chunk__44511_44527 = G__44539;
count__44512_44528 = G__44540;
i__44513_44529 = G__44541;
continue;
} else {
var x_44542 = cljs.core.first.call(null,seq__44510_44536__$1);
arr.push(x_44542);
var G__44543 = cljs.core.next.call(null,seq__44510_44536__$1);
var G__44544 = null;
var G__44545 = (0);
var G__44546 = (0);
seq__44510_44526 = G__44543;
chunk__44511_44527 = G__44544;
count__44512_44528 = G__44545;
i__44513_44529 = G__44546;
continue;
}
} else {
}
}
break;
}
return arr;
} else {
if(cljs.core.map_QMARK_.call(null,form)){
var obj = {};
var seq__44516_44547 = cljs.core.seq.call(null,form);
var chunk__44517_44548 = null;
var count__44518_44549 = (0);
var i__44519_44550 = (0);
while(true){
if((i__44519_44550 < count__44518_44549)){
var vec__44520_44551 = cljs.core._nth.call(null,chunk__44517_44548,i__44519_44550);
var k_44552 = cljs.core.nth.call(null,vec__44520_44551,(0),null);
var v_44553 = cljs.core.nth.call(null,vec__44520_44551,(1),null);
goog.object.set(obj,cljs.core.name.call(null,k_44552),v_44553);
var G__44554 = seq__44516_44547;
var G__44555 = chunk__44517_44548;
var G__44556 = count__44518_44549;
var G__44557 = (i__44519_44550 + (1));
seq__44516_44547 = G__44554;
chunk__44517_44548 = G__44555;
count__44518_44549 = G__44556;
i__44519_44550 = G__44557;
continue;
} else {
var temp__5457__auto___44558 = cljs.core.seq.call(null,seq__44516_44547);
if(temp__5457__auto___44558){
var seq__44516_44559__$1 = temp__5457__auto___44558;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__44516_44559__$1)){
var c__36429__auto___44560 = cljs.core.chunk_first.call(null,seq__44516_44559__$1);
var G__44561 = cljs.core.chunk_rest.call(null,seq__44516_44559__$1);
var G__44562 = c__36429__auto___44560;
var G__44563 = cljs.core.count.call(null,c__36429__auto___44560);
var G__44564 = (0);
seq__44516_44547 = G__44561;
chunk__44517_44548 = G__44562;
count__44518_44549 = G__44563;
i__44519_44550 = G__44564;
continue;
} else {
var vec__44523_44565 = cljs.core.first.call(null,seq__44516_44559__$1);
var k_44566 = cljs.core.nth.call(null,vec__44523_44565,(0),null);
var v_44567 = cljs.core.nth.call(null,vec__44523_44565,(1),null);
goog.object.set(obj,cljs.core.name.call(null,k_44566),v_44567);
var G__44568 = cljs.core.next.call(null,seq__44516_44559__$1);
var G__44569 = null;
var G__44570 = (0);
var G__44571 = (0);
seq__44516_44547 = G__44568;
chunk__44517_44548 = G__44569;
count__44518_44549 = G__44570;
i__44519_44550 = G__44571;
continue;
}
} else {
}
}
break;
}
return obj;
} else {
throw (new Error(["JS literal expects a vector or map containing ","only string or unqualified keyword keys"].join('')));
}
}
});
cljs.reader.read_uuid = (function cljs$reader$read_uuid(uuid){
if(typeof uuid === 'string'){
return cljs.core.uuid.call(null,uuid);
} else {
throw (new Error("UUID literal expects a string as its representation."));
}
});
cljs.reader._STAR_default_data_reader_fn_STAR_ = cljs.core.atom.call(null,null);
cljs.reader._STAR_tag_table_STAR_ = cljs.core.atom.call(null,cljs.core.merge.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Symbol(null,"inst","inst",-2008473268,null),cljs.reader.read_date,new cljs.core.Symbol(null,"uuid","uuid",-504564192,null),cljs.reader.read_uuid,new cljs.core.Symbol(null,"queue","queue",-1198599890,null),cljs.reader.read_queue,new cljs.core.Symbol(null,"js","js",-886355190,null),cljs.reader.read_js], null),cljs.core.PersistentArrayMap.EMPTY));
/**
* Reads the first object from an cljs.tools.reader.reader-types/IPushbackReader.
* Returns the object read. If EOF, throws if eof-error? is true otherwise returns eof.
* If no reader is provided, *in* will be used.
*
* Reads data in the edn format (subset of Clojure data):
* http://edn-format.org
*
* cljs.tools.reader.edn/read doesn't depend on dynamic Vars, all configuration
* is done by passing an opt map.
*
* opts is a map that can include the following keys:
* :eof - value to return on end-of-file. When not supplied, eof throws an exception.
* :readers - a map of tag symbols to data-reader functions to be considered before default-data-readers.
* When not supplied, only the default-data-readers will be used.
* :default - A function of two args, that will, if present and no reader is found for a tag,
* be called with the tag and the value.
*/
cljs.reader.read = (function cljs$reader$read(var_args){
var G__44573 = arguments.length;
switch (G__44573) {
case 1:
return cljs.reader.read.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.reader.read.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
case 4:
return cljs.reader.read.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.reader.read.cljs$core$IFn$_invoke$arity$1 = (function (reader){
return cljs.tools.reader.edn.read.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"readers","readers",-2118263030),cljs.core.deref.call(null,cljs.reader._STAR_tag_table_STAR_),new cljs.core.Keyword(null,"default","default",-1987822328),cljs.core.deref.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_),new cljs.core.Keyword(null,"eof","eof",-489063237),null], null),reader);
});
cljs.reader.read.cljs$core$IFn$_invoke$arity$2 = (function (p__44574,reader){
var map__44575 = p__44574;
var map__44575__$1 = ((((!((map__44575 == null)))?((((map__44575.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__44575.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__44575):map__44575);
var opts = map__44575__$1;
var eof = cljs.core.get.call(null,map__44575__$1,new cljs.core.Keyword(null,"eof","eof",-489063237));
return cljs.tools.reader.edn.read.call(null,cljs.core.update.call(null,cljs.core.merge.call(null,opts,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"default","default",-1987822328),cljs.core.deref.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_)], null)),new cljs.core.Keyword(null,"readers","readers",-2118263030),((function (map__44575,map__44575__$1,opts,eof){
return (function (m){
return cljs.core.merge.call(null,cljs.core.deref.call(null,cljs.reader._STAR_tag_table_STAR_),m);
});})(map__44575,map__44575__$1,opts,eof))
),reader);
});
cljs.reader.read.cljs$core$IFn$_invoke$arity$4 = (function (reader,eof_error_QMARK_,eof,opts){
return cljs.tools.reader.edn.read.call(null,reader,eof_error_QMARK_,eof,cljs.core.update.call(null,cljs.core.merge.call(null,opts,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"default","default",-1987822328),cljs.core.deref.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_)], null)),new cljs.core.Keyword(null,"readers","readers",-2118263030),(function (m){
return cljs.core.merge.call(null,cljs.core.deref.call(null,cljs.reader._STAR_tag_table_STAR_),m);
})));
});
cljs.reader.read.cljs$lang$maxFixedArity = 4;
/**
* Reads one object from the string s.
* Returns nil when s is nil or empty.
*
* Reads data in the edn format (subset of Clojure data):
* http://edn-format.org
*
* opts is a map as per cljs.tools.reader.edn/read
*/
cljs.reader.read_string = (function cljs$reader$read_string(var_args){
var G__44579 = arguments.length;
switch (G__44579) {
case 1:
return cljs.reader.read_string.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.reader.read_string.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.reader.read_string.cljs$core$IFn$_invoke$arity$1 = (function (s){
return cljs.tools.reader.edn.read_string.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"readers","readers",-2118263030),cljs.core.deref.call(null,cljs.reader._STAR_tag_table_STAR_),new cljs.core.Keyword(null,"default","default",-1987822328),cljs.core.deref.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_),new cljs.core.Keyword(null,"eof","eof",-489063237),null], null),s);
});
cljs.reader.read_string.cljs$core$IFn$_invoke$arity$2 = (function (opts,s){
return cljs.tools.reader.edn.read_string.call(null,cljs.core.update.call(null,cljs.core.merge.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"default","default",-1987822328),cljs.core.deref.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_)], null),opts),new cljs.core.Keyword(null,"readers","readers",-2118263030),(function (m){
return cljs.core.merge.call(null,cljs.core.deref.call(null,cljs.reader._STAR_tag_table_STAR_),m);
})),s);
});
cljs.reader.read_string.cljs$lang$maxFixedArity = 2;
cljs.reader.register_tag_parser_BANG_ = (function cljs$reader$register_tag_parser_BANG_(tag,f){
var old_parser = cljs.core.get.call(null,cljs.core.deref.call(null,cljs.reader._STAR_tag_table_STAR_),tag);
cljs.core.swap_BANG_.call(null,cljs.reader._STAR_tag_table_STAR_,cljs.core.assoc,tag,f);
return old_parser;
});
cljs.reader.deregister_tag_parser_BANG_ = (function cljs$reader$deregister_tag_parser_BANG_(tag){
var old_parser = cljs.core.get.call(null,cljs.core.deref.call(null,cljs.reader._STAR_tag_table_STAR_),tag);
cljs.core.swap_BANG_.call(null,cljs.reader._STAR_tag_table_STAR_,cljs.core.dissoc,tag);
return old_parser;
});
cljs.reader.register_default_tag_parser_BANG_ = (function cljs$reader$register_default_tag_parser_BANG_(f){
var old_parser = cljs.core.deref.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_);
cljs.core.swap_BANG_.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_,((function (old_parser){
return (function (_){
return f;
});})(old_parser))
);
return old_parser;
});
cljs.reader.deregister_default_tag_parser_BANG_ = (function cljs$reader$deregister_default_tag_parser_BANG_(){
var old_parser = cljs.core.deref.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_);
cljs.core.swap_BANG_.call(null,cljs.reader._STAR_default_data_reader_fn_STAR_,((function (old_parser){
return (function (_){
return null;
});})(old_parser))
);
return old_parser;
});
//# sourceMappingURL=reader.js.map?rel=1517021946982
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/reader.js","sources":["reader.cljs?rel=1517021946984"],"lineCount":451,"mappings":";AAQA;;;;;;AAOA,2CAAA,3CAAgBA,8FAA8BC,EAAEC;AAAhD,AACE,GACE,AAACC,yBAAED,MAAM,AAACE,0BAAMH;AAAIA;;AADtB,GAEE,CAAGC,QAAM,AAACE,0BAAMH;AAAI,kCAAA,3BAACI,yBAAKJ,MAAIC;;AAFhC,AAIE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wBAAAkD,iBAAA,IAAA,vDAASE;cAAT,AAAApD,wBAAAkD,iBAAA,IAAA,vDAAWtC;AAAX,AAAA,AACE,AAACyC,gBAAYR,IAAI,AAACS,yBAAKF,SAAGxC;;AAD5B,eAAAkC;eAAAC;eAAAC;eAAA,CAAAC,iBAAA;;;;;;;AAAA,IAAAb,2BAAA,AAAAL,wBAAAe;AAAA,AAAA,GAAAV;AAAA,AAAA,IAAAU,uBAAAV;AAAA,AAAA,GAAA,AAAAC,uCAAAS;AAAA,IAAAR,yBAAA,AAAAC,gCAAAO;AAAA,AAAA,eAAA,AAAAN,+BAAAM;eAAAR;eAAA,AAAAtE,0BAAAsE;eAAA;;;;;;;AAAA,IAAAa,mBAAA,AAAAV,0BAAAK;cAAA,AAAA9C,wBAAAmD,iBAAA,IAAA,vDAASC;cAAT,AAAApD,wBAAAmD,iBAAA,IAALine truncated
+56
View File
@@ -0,0 +1,56 @@
;; Copyright (c) Rich Hickey. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.repl
(:require-macros cljs.repl)
(:require [cljs.spec.alpha :as spec]))
(defn print-doc [{n :ns nm :name :as m}]
(println "-------------------------")
(println (str (when-let [ns (:ns m)] (str ns "/")) (:name m)))
(when (:protocol m)
(println "Protocol"))
(cond
(:forms m) (doseq [f (:forms m)]
(println " " f))
(:arglists m) (let [arglists (:arglists m)]
(if (or (:macro m)
(:repl-special-function m))
(prn arglists)
(prn
(if (= 'quote (first arglists))
(second arglists)
arglists)))))
(if (:special-form m)
(do
(println "Special Form")
(println " " (:doc m))
(if (contains? m :url)
(when (:url m)
(println (str "\n Please see http://clojure.org/" (:url m))))
(println (str "\n Please see http://clojure.org/special_forms#"
(:name m)))))
(do
(when (:macro m)
(println "Macro"))
(when (:repl-special-function m)
(println "REPL Special Function"))
(println " " (:doc m))
(when (:protocol m)
(doseq [[name {:keys [doc arglists]}] (:methods m)]
(println)
(println " " name)
(println " " arglists)
(when doc
(println " " doc))))
(when n
(when-let [fnspec (spec/get-spec (symbol (str (ns-name n)) (name nm)))]
(print "Spec")
(doseq [role [:args :ret :fn]]
(when-let [spec (get fnspec role)]
(print (str "\n " (name role) ":") (spec/describe spec)))))))))
+1
View File
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :use-macros {}, :excludes #{}, :name cljs.repl, :imports nil, :requires {spec cljs.spec.alpha, cljs.spec.alpha cljs.spec.alpha}, :cljs.spec/speced-vars [], :uses nil, :defs {print-doc {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/repl.cljs", :line 13, :column 7, :end-line 13, :end-column 16, :arglists (quote ([{n :ns, nm :name, :as m}]))}, :name cljs.repl/print-doc, :variadic false, :file "target/cljsbuild/public/js/out/cljs/repl.cljs", :end-column 16, :method-params ([p__46110]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 13, :end-line 13, :max-fixed-arity 1, :fn-var true, :arglists (quote ([{n :ns, nm :name, :as m}]))}}, :cljs.spec/registry-ref [], :require-macros {cljs.repl cljs.repl, spec cljs.spec.alpha, cljs.spec.alpha cljs.spec.alpha}, :cljs.analyzer/constants {:seen #{:args :ret :fn :protocol :ns :name :special-form :repl-special-function :methods :macro :url quote :arglists :doc :forms}, :order [:ns :name :protocol :forms :arglists :macro :repl-special-function quote :special-form :doc :url :methods :args :ret :fn]}, :doc nil}
+287
View File
@@ -0,0 +1,287 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.repl');
goog.require('cljs.core');
goog.require('cljs.spec.alpha');
cljs.repl.print_doc = (function cljs$repl$print_doc(p__46110){
var map__46111 = p__46110;
var map__46111__$1 = ((((!((map__46111 == null)))?((((map__46111.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__46111.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__46111):map__46111);
var m = map__46111__$1;
var n = cljs.core.get.call(null,map__46111__$1,new cljs.core.Keyword(null,"ns","ns",441598760));
var nm = cljs.core.get.call(null,map__46111__$1,new cljs.core.Keyword(null,"name","name",1843675177));
cljs.core.println.call(null,"-------------------------");
cljs.core.println.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var temp__5457__auto__ = new cljs.core.Keyword(null,"ns","ns",441598760).cljs$core$IFn$_invoke$arity$1(m);
if(cljs.core.truth_(temp__5457__auto__)){
var ns = temp__5457__auto__;
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns),"/"].join('');
} else {
return null;
}
})()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(m))].join(''));
if(cljs.core.truth_(new cljs.core.Keyword(null,"protocol","protocol",652470118).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.call(null,"Protocol");
} else {
}
if(cljs.core.truth_(new cljs.core.Keyword(null,"forms","forms",2045992350).cljs$core$IFn$_invoke$arity$1(m))){
var seq__46113_46135 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"forms","forms",2045992350).cljs$core$IFn$_invoke$arity$1(m));
var chunk__46114_46136 = null;
var count__46115_46137 = (0);
var i__46116_46138 = (0);
while(true){
if((i__46116_46138 < count__46115_46137)){
var f_46139 = cljs.core._nth.call(null,chunk__46114_46136,i__46116_46138);
cljs.core.println.call(null," ",f_46139);
var G__46140 = seq__46113_46135;
var G__46141 = chunk__46114_46136;
var G__46142 = count__46115_46137;
var G__46143 = (i__46116_46138 + (1));
seq__46113_46135 = G__46140;
chunk__46114_46136 = G__46141;
count__46115_46137 = G__46142;
i__46116_46138 = G__46143;
continue;
} else {
var temp__5457__auto___46144 = cljs.core.seq.call(null,seq__46113_46135);
if(temp__5457__auto___46144){
var seq__46113_46145__$1 = temp__5457__auto___46144;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__46113_46145__$1)){
var c__36429__auto___46146 = cljs.core.chunk_first.call(null,seq__46113_46145__$1);
var G__46147 = cljs.core.chunk_rest.call(null,seq__46113_46145__$1);
var G__46148 = c__36429__auto___46146;
var G__46149 = cljs.core.count.call(null,c__36429__auto___46146);
var G__46150 = (0);
seq__46113_46135 = G__46147;
chunk__46114_46136 = G__46148;
count__46115_46137 = G__46149;
i__46116_46138 = G__46150;
continue;
} else {
var f_46151 = cljs.core.first.call(null,seq__46113_46145__$1);
cljs.core.println.call(null," ",f_46151);
var G__46152 = cljs.core.next.call(null,seq__46113_46145__$1);
var G__46153 = null;
var G__46154 = (0);
var G__46155 = (0);
seq__46113_46135 = G__46152;
chunk__46114_46136 = G__46153;
count__46115_46137 = G__46154;
i__46116_46138 = G__46155;
continue;
}
} else {
}
}
break;
}
} else {
if(cljs.core.truth_(new cljs.core.Keyword(null,"arglists","arglists",1661989754).cljs$core$IFn$_invoke$arity$1(m))){
var arglists_46156 = new cljs.core.Keyword(null,"arglists","arglists",1661989754).cljs$core$IFn$_invoke$arity$1(m);
if(cljs.core.truth_((function (){var or__35498__auto__ = new cljs.core.Keyword(null,"macro","macro",-867863404).cljs$core$IFn$_invoke$arity$1(m);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return new cljs.core.Keyword(null,"repl-special-function","repl-special-function",1262603725).cljs$core$IFn$_invoke$arity$1(m);
}
})())){
cljs.core.prn.call(null,arglists_46156);
} else {
cljs.core.prn.call(null,((cljs.core._EQ_.call(null,new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.first.call(null,arglists_46156)))?cljs.core.second.call(null,arglists_46156):arglists_46156));
}
} else {
}
}
if(cljs.core.truth_(new cljs.core.Keyword(null,"special-form","special-form",-1326536374).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.call(null,"Special Form");
cljs.core.println.call(null," ",new cljs.core.Keyword(null,"doc","doc",1913296891).cljs$core$IFn$_invoke$arity$1(m));
if(cljs.core.contains_QMARK_.call(null,m,new cljs.core.Keyword(null,"url","url",276297046))){
if(cljs.core.truth_(new cljs.core.Keyword(null,"url","url",276297046).cljs$core$IFn$_invoke$arity$1(m))){
return cljs.core.println.call(null,["\n Please see http://clojure.org/",cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"url","url",276297046).cljs$core$IFn$_invoke$arity$1(m))].join(''));
} else {
return null;
}
} else {
return cljs.core.println.call(null,["\n Please see http://clojure.org/special_forms#",cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"name","name",1843675177).cljs$core$IFn$_invoke$arity$1(m))].join(''));
}
} else {
if(cljs.core.truth_(new cljs.core.Keyword(null,"macro","macro",-867863404).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.call(null,"Macro");
} else {
}
if(cljs.core.truth_(new cljs.core.Keyword(null,"repl-special-function","repl-special-function",1262603725).cljs$core$IFn$_invoke$arity$1(m))){
cljs.core.println.call(null,"REPL Special Function");
} else {
}
cljs.core.println.call(null," ",new cljs.core.Keyword(null,"doc","doc",1913296891).cljs$core$IFn$_invoke$arity$1(m));
if(cljs.core.truth_(new cljs.core.Keyword(null,"protocol","protocol",652470118).cljs$core$IFn$_invoke$arity$1(m))){
var seq__46117_46157 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"methods","methods",453930866).cljs$core$IFn$_invoke$arity$1(m));
var chunk__46118_46158 = null;
var count__46119_46159 = (0);
var i__46120_46160 = (0);
while(true){
if((i__46120_46160 < count__46119_46159)){
var vec__46121_46161 = cljs.core._nth.call(null,chunk__46118_46158,i__46120_46160);
var name_46162 = cljs.core.nth.call(null,vec__46121_46161,(0),null);
var map__46124_46163 = cljs.core.nth.call(null,vec__46121_46161,(1),null);
var map__46124_46164__$1 = ((((!((map__46124_46163 == null)))?((((map__46124_46163.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__46124_46163.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__46124_46163):map__46124_46163);
var doc_46165 = cljs.core.get.call(null,map__46124_46164__$1,new cljs.core.Keyword(null,"doc","doc",1913296891));
var arglists_46166 = cljs.core.get.call(null,map__46124_46164__$1,new cljs.core.Keyword(null,"arglists","arglists",1661989754));
cljs.core.println.call(null);
cljs.core.println.call(null," ",name_46162);
cljs.core.println.call(null," ",arglists_46166);
if(cljs.core.truth_(doc_46165)){
cljs.core.println.call(null," ",doc_46165);
} else {
}
var G__46167 = seq__46117_46157;
var G__46168 = chunk__46118_46158;
var G__46169 = count__46119_46159;
var G__46170 = (i__46120_46160 + (1));
seq__46117_46157 = G__46167;
chunk__46118_46158 = G__46168;
count__46119_46159 = G__46169;
i__46120_46160 = G__46170;
continue;
} else {
var temp__5457__auto___46171 = cljs.core.seq.call(null,seq__46117_46157);
if(temp__5457__auto___46171){
var seq__46117_46172__$1 = temp__5457__auto___46171;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__46117_46172__$1)){
var c__36429__auto___46173 = cljs.core.chunk_first.call(null,seq__46117_46172__$1);
var G__46174 = cljs.core.chunk_rest.call(null,seq__46117_46172__$1);
var G__46175 = c__36429__auto___46173;
var G__46176 = cljs.core.count.call(null,c__36429__auto___46173);
var G__46177 = (0);
seq__46117_46157 = G__46174;
chunk__46118_46158 = G__46175;
count__46119_46159 = G__46176;
i__46120_46160 = G__46177;
continue;
} else {
var vec__46126_46178 = cljs.core.first.call(null,seq__46117_46172__$1);
var name_46179 = cljs.core.nth.call(null,vec__46126_46178,(0),null);
var map__46129_46180 = cljs.core.nth.call(null,vec__46126_46178,(1),null);
var map__46129_46181__$1 = ((((!((map__46129_46180 == null)))?((((map__46129_46180.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__46129_46180.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__46129_46180):map__46129_46180);
var doc_46182 = cljs.core.get.call(null,map__46129_46181__$1,new cljs.core.Keyword(null,"doc","doc",1913296891));
var arglists_46183 = cljs.core.get.call(null,map__46129_46181__$1,new cljs.core.Keyword(null,"arglists","arglists",1661989754));
cljs.core.println.call(null);
cljs.core.println.call(null," ",name_46179);
cljs.core.println.call(null," ",arglists_46183);
if(cljs.core.truth_(doc_46182)){
cljs.core.println.call(null," ",doc_46182);
} else {
}
var G__46184 = cljs.core.next.call(null,seq__46117_46172__$1);
var G__46185 = null;
var G__46186 = (0);
var G__46187 = (0);
seq__46117_46157 = G__46184;
chunk__46118_46158 = G__46185;
count__46119_46159 = G__46186;
i__46120_46160 = G__46187;
continue;
}
} else {
}
}
break;
}
} else {
}
if(cljs.core.truth_(n)){
var temp__5457__auto__ = cljs.spec.alpha.get_spec.call(null,cljs.core.symbol.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.ns_name.call(null,n))].join(''),cljs.core.name.call(null,nm)));
if(cljs.core.truth_(temp__5457__auto__)){
var fnspec = temp__5457__auto__;
cljs.core.print.call(null,"Spec");
var seq__46131 = cljs.core.seq.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"args","args",1315556576),new cljs.core.Keyword(null,"ret","ret",-468222814),new cljs.core.Keyword(null,"fn","fn",-1175266204)], null));
var chunk__46132 = null;
var count__46133 = (0);
var i__46134 = (0);
while(true){
if((i__46134 < count__46133)){
var role = cljs.core._nth.call(null,chunk__46132,i__46134);
var temp__5457__auto___46188__$1 = cljs.core.get.call(null,fnspec,role);
if(cljs.core.truth_(temp__5457__auto___46188__$1)){
var spec_46189 = temp__5457__auto___46188__$1;
cljs.core.print.call(null,["\n ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.name.call(null,role)),":"].join(''),cljs.spec.alpha.describe.call(null,spec_46189));
} else {
}
var G__46190 = seq__46131;
var G__46191 = chunk__46132;
var G__46192 = count__46133;
var G__46193 = (i__46134 + (1));
seq__46131 = G__46190;
chunk__46132 = G__46191;
count__46133 = G__46192;
i__46134 = G__46193;
continue;
} else {
var temp__5457__auto____$1 = cljs.core.seq.call(null,seq__46131);
if(temp__5457__auto____$1){
var seq__46131__$1 = temp__5457__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__46131__$1)){
var c__36429__auto__ = cljs.core.chunk_first.call(null,seq__46131__$1);
var G__46194 = cljs.core.chunk_rest.call(null,seq__46131__$1);
var G__46195 = c__36429__auto__;
var G__46196 = cljs.core.count.call(null,c__36429__auto__);
var G__46197 = (0);
seq__46131 = G__46194;
chunk__46132 = G__46195;
count__46133 = G__46196;
i__46134 = G__46197;
continue;
} else {
var role = cljs.core.first.call(null,seq__46131__$1);
var temp__5457__auto___46198__$2 = cljs.core.get.call(null,fnspec,role);
if(cljs.core.truth_(temp__5457__auto___46198__$2)){
var spec_46199 = temp__5457__auto___46198__$2;
cljs.core.print.call(null,["\n ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.name.call(null,role)),":"].join(''),cljs.spec.alpha.describe.call(null,spec_46199));
} else {
}
var G__46200 = cljs.core.next.call(null,seq__46131__$1);
var G__46201 = null;
var G__46202 = (0);
var G__46203 = (0);
seq__46131 = G__46200;
chunk__46132 = G__46201;
count__46133 = G__46202;
i__46134 = G__46203;
continue;
}
} else {
return null;
}
}
break;
}
} else {
return null;
}
} else {
return null;
}
}
});
//# sourceMappingURL=repl.js.map?rel=1517021948509
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/repl.js","sources":["repl.cljs?rel=1517021948509"],"lineCount":287,"mappings":";AAQA;;;AAIA,sBAAA,8BAAAA,pDAAMM;AAAN,AAAA,IAAAL,aAAAD;IAAAC,iBAAA,EAAA,EAAA,EAAA,CAAAA,cAAA,QAAA,EAAA,CAAA,CAAA,A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AAA,mFAAA,qDAAA,mDAAA;IAAAqC,eAAA;IAAAC,eAAA;IAAAC,WAAA;;AAAA,AAAA,GAAA,AAAA,CAAAA,WAAAD;AAAA,WAAA,AAAAlC,yBAAAiC,aAAAE,7CAAQC;AAAR,AAAA,AACE,IAAA3C,+BAAgB,AAACN,wBAAIuC,OAAOU;AAA5B,AAAA,oBAAA3C;AAAA,AAAA,iBAAAA,bAAW4C;AAAX,AACE,AAACN,0BAAM,CAAA,kFAAA,hCAAW,AAACD,yBAAKM,qBAAW,AAACE,mCAAcD;;AADpD;;AADF,eAAAL;eAAAC;eAAAC;eAAA,CAAAC,WAAA;;;;;;;AAAA,IAAA1C,yBAAA,AAAAG,wBAAAoC;AAAA,AAAA,GAAAvC;AAAA,AAAA,IAAAuC,iBAAAvC;AAAA,AAAA,GAAA,AAAAQ,uCAAA+B;AAAA,IAAA9B,mBAAA,AAAAC,gCAAA6B;AAAA,AAAA,eAAA,AAAA5B,+BAAA4B;eAAA9B;eAAA,AAAAG,0BAAAH;eAAA;;;;;;;AAAA,WAAA,AAAAI,0BAAA0B,jCAAQI;AAAR,AAAA,AACE,IAAA3C,+BAAgB,AAACN,wBAAIuC,OAAOU;AAA5B,AAAA,oBAAA3C;AAAA,AAAA,iBAAAA,bAAW4C;AAAX,AACE,AAACN,0BAAM,CAAA,kFAAA,hCAAW,AAACD,yBAAKM,qBAAW,AAACE,mCAAcD;;AADpD;;AADF,eAAA,AAAA9B,yBAAAyB;eAAA;eAAA;eAAA;;;;;;;;AAAA;;;;;;AAFF;;;AADF","names":["p__46110","map__46111","cljs.core\/PROTOCOL_SENTINEL","cljs.core\/apply","cljs.core\/hash-map","cljs.core\/get","cljs.repl\/print-doc","n","nm","m","cljs.core\/println","temp__5457__auto__","ns","seq__46113","cljs.core\/seq","chunk__46114","count__46115","i__46116","cljs.core\/-nth","cljs.core\/chunked-seq?","c__36429__auto__","cljs.core\/chunk-first","cljs.core\/chunk-rest","cljs.core\/count","cljs.core\/first","cljs.core\/next","f","arglists","or__35498__auto__","cljs.core\/prn","cljs.core\/=","cljs.core\/second","cljs.core\/contains?","seq__46117","chunk__46118","count__46119","i__46120","vec__46121","cljs.core\/nth","map__46124","vec__46126","map__46129","name","doc","fnspec","cljs.spec.alpha\/get-spec","cljs.core\/symbolLine truncated
File diff suppressed because it is too large. Load diff
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}, goog {string {StringBuffer {prototype {append {}}}}}}, :use-macros {}, :excludes #{cat * or merge keys + and def}, :name cljs.spec.alpha, :imports nil, :requires {cljs.core cljs.core, gobj goog.object, goog.object goog.object, walk clojure.walk, gen cljs.spec.gen.alpha, c cljs.core, str clojure.string, clojure.string clojure.string, clojure.walk clojure.walk, cljs.spec.gen.alpha cljs.spec.gen.alpha}, :cljs.spec/speced-vars [], :uses nil, :defs {form {:protocol-inline nil, :meta {:file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :line 162, :column 7, :end-line 162, :end-column 11, :arglists (quote ([spec])), :doc "returns the spec as data"}, :name cljs.spec.alpha/form, :variadic false, :file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :end-column 11, :method-params ([spec]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 162, :end-line 162, :max-fixed-arity 1, :fn-var true, :arglists (quote ([spec])), :doc "returns the spec as data"}, nilable-impl {:protocol-inline nil, :meta {:file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :line 1360, :column 19, :end-line 1360, :end-column 31, :skip-wiki true, :arglists (quote ([form pred gfn])), :doc "Do not call this directly, use 'nilable'"}, :name cljs.spec.alpha/nilable-impl, :variadic false, :file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :end-column 31, :method-params ([form pred gfn]), :protocol-impl nil, :skip-wiki true, :arglists-meta (nil nil), :column 1, :line 1360, :end-line 1360, :max-fixed-arity 3, :fn-var true, :arglists (quote ([form pred gfn])), :doc "Do not call this directly, use 'nilable'"}, *recursion-limit* {:meta {:file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :line 21, :column 16, :end-line 21, :end-column 33, :dynamic true}, :name cljs.spec.alpha/*recursion-limit*, :file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :end-column 33, :column 1, :dynamic true, :line 21, :end-line 21, :tag number, :doc "A soft limit on how many times a branching spec (or/alt/*/opt-keys/multi-spec)\n can be recursed through during generation. After this a\n non-recursive branch will be chosen."}, *coll-error-limit* {:meta {:file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :line 35, :column 16, :end-line 35, :end-column 34, :dynamic true}, :name cljs.spec.alpha/*coll-error-limit*, :file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :end-column 34, :column 1, :dynamic true, :line 35, :end-line 35, :tag number, :doc "The number of errors reported by explain in a collection spec'ed with 'every'"}, explain-printer {:protocol-inline nil, :meta {:file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :line 216, :column 7, :end-line 216, :end-column 22, :arglists (quote ([ed])), :doc "Default printer for explain-data. nil indicates a successful validation."}, :name cljs.spec.alpha/explain-printer, :variadic false, :file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :end-column 22, :method-params ([ed]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 216, :end-line 216, :max-fixed-arity 1, :fn-var true, :arglists (quote ([ed])), :doc "Default printer for explain-data. nil indicates a successful validation."}, op-explain {:protocol-inline nil, :meta {:file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :line 1112, :column 8, :end-line 1112, :end-column 18, :private true, :arglists (quote ([form p path via in input]))}, :private true, :name cljs.spec.alpha/op-explain, :variadic false, :file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :end-column 18, :method-params ([form p path via in input]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 1112, :end-line 1112, :max-fixed-arity 6, :fn-var true, :arglists (quote ([form p path via in input]))}, Specize {:meta {:file "file:/home/didier/.m2/repository/org/clojure/clojurescript/1.9.946/clojurescript-1.9.946.jar!/cljs/spec/alpha.cljs", :line 123, :column 14, :end-line 123, :end-column 21, :doc nil, :protocol-symbol true, :jsdoc ("@interface"), :protocol-info {:methods {specize* [[_] [_ form]]}}}, :protocol-symbol true, :name cljs.spec.alpha/Specize, :file "file:/home/didLine truncated
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/spec\/alpha.js","sources":["alpha.cljs?rel=1517021948405"],"lineCount":5561,"mappings":";AAQA;;;;;;;AAUA,0BAAA,1BAAaA;AAEb;;;;;8CAAA,9CAAeC;AAMf;;;+CAAA,\/CAAeC;AAIf;;;+CAAA,\/CAAeC;AAIf;;;+CAAA,\/CAAeC;AAIf,AAAA;AAAA;;;uBAAA,vBAAaW;;AAAb,gCAAA,hCACGC,wEAAUC,KAAKC;AADlB,AAAA,GAAA,CAAA,EAAA,SAAA,YAAA,EAAA,CAAA,mDAAA,1EACaD,uBAAAA;AADb,OACaA,gDAAAA,KAAKC;;AADlB,IAAAb,mBAAA,EAAA,SAAA,OAAA,fACaY,oBAAAA;IADbX,mBAAA,CAAAC,8B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0BAAA,1BAAaQ;;AAAb,AAAA,gCAAA,wCAAAJ,xEACGE;AADH,AAAA,IAAAD,WAAA,AAAA;AAAA,AAAA,QAAAA;KAAA;AAAA,OAAAC,4DAAA,CAAA,UAAA;;;KAAA;AAAA,OAAAA,4DAAA,CAAA,UAAA,MAAA,CAAA,UAAA;;;;AAAA,MAAA,KAAAlB,MAAA,CAAA,8DAAA,AAAA;;;;;AAAA,AAAA,8DAAA,9DACGkB,yEAAUG;AADb,AAAA,GAAA,CAAA,EAAA,MAAA,YAAA,EAAA,CAAA,mDAAA,vEACaA,oBAAAA;AADb,OACaA,gDAAAA;;ALine truncated
+180
View File
@@ -0,0 +1,180 @@
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
(ns cljs.spec.gen.alpha
(:refer-clojure :exclude [boolean cat hash-map list map not-empty set vector
char double int keyword symbol string uuid delay])
(:require-macros [cljs.core :as c]
[cljs.spec.gen.alpha :as gen :refer [dynaload lazy-combinators lazy-prims]])
(:require [cljs.core :as c]))
(deftype LazyVar [f ^:mutable cached]
IDeref
(-deref [this]
(if-not (nil? cached)
cached
(let [x (f)]
(when-not (nil? x)
(set! cached x))
x))))
(def ^:private quick-check-ref
(dynaload 'clojure.test.check/quick-check))
(defn quick-check
[& args]
(apply @quick-check-ref args))
(def ^:private for-all*-ref
(dynaload 'clojure.test.check.properties/for-all*))
(defn for-all*
"Dynamically loaded clojure.test.check.properties/for-all*."
[& args]
(apply @for-all*-ref args))
(let [g? (dynaload 'clojure.test.check.generators/generator?)
g (dynaload 'clojure.test.check.generators/generate)
mkg (dynaload 'clojure.test.check.generators/->Generator)]
(defn- generator?
[x]
(@g? x))
(defn- generator
[gfn]
(@mkg gfn))
(defn generate
"Generate a single value using generator."
[generator]
(@g generator)))
(defn ^:skip-wiki delay-impl
[gfnd]
;;N.B. depends on test.check impl details
(generator (fn [rnd size]
((:gen @gfnd) rnd size))))
;(defn gen-for-name
; "Dynamically loads test.check generator named s."
; [s]
; (let [g (dynaload s)]
; (if (generator? g)
; g
; (throw (js/Error. (str "Var " s " is not a generator"))))))
(lazy-combinators hash-map list map not-empty set vector vector-distinct fmap elements
bind choose one-of such-that tuple sample return
large-integer* double* frequency)
(lazy-prims any any-printable boolean char char-alpha char-alphanumeric char-ascii double
int keyword keyword-ns large-integer ratio simple-type simple-type-printable
string string-ascii string-alphanumeric symbol symbol-ns uuid)
(defn cat
"Returns a generator of a sequence catenated from results of
gens, each of which should generate something sequential."
[& gens]
(fmap #(apply concat %)
(apply tuple gens)))
(defn- ^boolean qualified? [ident] (not (nil? (namespace ident))))
(def ^:private
gen-builtins
(c/delay
(let [simple (simple-type-printable)]
{any? (one-of [(return nil) (any-printable)])
number? (one-of [(large-integer) (double)])
integer? (large-integer)
int? (large-integer)
pos-int? (large-integer* {:min 1})
neg-int? (large-integer* {:max -1})
nat-int? (large-integer* {:min 0})
float? (double)
double? (double)
string? (string-alphanumeric)
ident? (one-of [(keyword-ns) (symbol-ns)])
simple-ident? (one-of [(keyword) (symbol)])
qualified-ident? (such-that qualified? (one-of [(keyword-ns) (symbol-ns)]))
keyword? (keyword-ns)
simple-keyword? (keyword)
qualified-keyword? (such-that qualified? (keyword-ns))
symbol? (symbol-ns)
simple-symbol? (symbol)
qualified-symbol? (such-that qualified? (symbol-ns))
uuid? (uuid)
inst? (fmap #(js/Date. %)
(large-integer))
seqable? (one-of [(return nil)
(list simple)
(vector simple)
(map simple simple)
(set simple)
(string-alphanumeric)])
indexed? (vector simple)
map? (map simple simple)
vector? (vector simple)
list? (list simple)
seq? (list simple)
char? (char)
set? (set simple)
nil? (return nil)
false? (return false)
true? (return true)
boolean? (boolean)
zero? (return 0)
;rational? (one-of [(large-integer) (ratio)])
coll? (one-of [(map simple simple)
(list simple)
(vector simple)
(set simple)])
empty? (elements [nil '() [] {} #{}])
associative? (one-of [(map simple simple) (vector simple)])
sequential? (one-of [(list simple) (vector simple)])
;ratio? (such-that ratio? (ratio))
})))
(defn gen-for-pred
"Given a predicate, returns a built-in generator if one exists."
[pred]
(if (set? pred)
(elements pred)
(get @gen-builtins pred)))
(comment
(require 'clojure.test.check)
(require 'clojure.test.check.properties)
(require 'cljs.spec.gen)
(in-ns 'cljs.spec.gen)
;; combinators, see call to lazy-combinators above for complete list
(generate (one-of [(gen-for-pred integer?) (gen-for-pred string?)]))
(generate (such-that #(< 10000 %) (gen-for-pred integer?)))
(let [reqs {:a (gen-for-pred number?)
:b (gen-for-pred keyword?)}
opts {:c (gen-for-pred string?)}]
(generate (bind (choose 0 (count opts))
#(let [args (concat (seq reqs) (shuffle (seq opts)))]
(->> args
(take (+ % (count reqs)))
(mapcat identity)
(apply hash-map))))))
(generate (cat (list (gen-for-pred string?))
(list (gen-for-pred integer?))))
;; load your own generator
;(gen-for-name 'clojure.test.check.generators/int)
;; failure modes
;(gen-for-name 'unqualified)
;(gen-for-name 'clojure.core/+)
;(gen-for-name 'clojure.core/name-does-not-exist)
;(gen-for-name 'ns.does.not.exist/f)
)
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}, Date {}}, :use-macros {lazy-prims cljs.spec.gen.alpha, dynaload cljs.spec.gen.alpha, lazy-combinators cljs.spec.gen.alpha}, :excludes #{uuid set boolean map delay char cat double int symbol string vector not-empty list keyword hash-map}, :name cljs.spec.gen.alpha, :imports nil, :requires {c cljs.core, cljs.core cljs.core}, :cljs.spec/speced-vars [], :uses nil, :defs {uuid {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :line 75, :column 60, :end-line 75, :end-column 64, :arglists (quote ([& args])), :doc "Fn returning clojure.test.check.generators/uuid", :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}}, :name cljs.spec.gen.alpha/uuid, :variadic true, :file "target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :end-column 64, :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}, :method-params [(args)], :protocol-impl nil, :arglists-meta (nil), :column 1, :line 73, :end-line 75, :max-fixed-arity 0, :fn-var true, :arglists ([& args]), :doc "Fn returning clojure.test.check.generators/uuid"}, gen-for-pred {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :line 141, :column 7, :end-line 141, :end-column 19, :arglists (quote ([pred])), :doc "Given a predicate, returns a built-in generator if one exists."}, :name cljs.spec.gen.alpha/gen-for-pred, :variadic false, :file "target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :end-column 19, :method-params ([pred]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 141, :end-line 141, :max-fixed-arity 1, :fn-var true, :arglists (quote ([pred])), :doc "Given a predicate, returns a built-in generator if one exists."}, set {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :line 69, :column 47, :end-line 69, :end-column 50, :arglists (quote ([& args])), :doc "Lazy loaded version of clojure.test.check.generators/set", :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}}, :name cljs.spec.gen.alpha/set, :variadic true, :file "target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :end-column 50, :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}, :method-params [(args)], :protocol-impl nil, :arglists-meta (nil), :column 1, :line 69, :end-line 69, :max-fixed-arity 0, :fn-var true, :arglists ([& args]), :doc "Lazy loaded version of clojure.test.check.generators/set"}, one-of {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :line 70, :column 15, :end-line 70, :end-column 21, :arglists (quote ([& args])), :doc "Lazy loaded version of clojure.test.check.generators/one-of", :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}}, :name cljs.spec.gen.alpha/one-of, :variadic true, :file "target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :end-column 21, :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}, :method-params [(args)], :protocol-impl nil, :arglists-meta (nil), :column 1, :line 69, :end-line 70, :max-fixed-arity 0, :fn-var true, :arglists ([& args]), :doc "Lazy loaded version of clojure.test.check.generators/one-of"}, any-printable {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :line 73, :column 17, :end-line 73, :end-column 30, :arglists (quote ([& args])), :doc "Fn returning clojure.test.check.generators/any-printable", :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}}, :name cljs.spec.gen.alpha/any-printable, :variadic true, :file "target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :end-column 30, :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}, :method-params [(args)], :protocol-impl nil, :arglists-meta (nil), :column 1, :line 73, :end-line 73, :max-fixed-arity 0, :fn-var true, :arglists ([& args]), :doc "Fn returning clojure.test.check.generators/any-printable"}, vector-distinct {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/spec/gen/alpha.cljs", :line 69, :column 58, :end-line 69, :end-column 73, :arglists (quote ([& args])), :doc "Lazy loaded version of clojure.test.check.generators/vector-distinct", :top-fn {:variadic true, :max-fixed-arity 0, :method-params [(args)], :arglists ([& args]), :arglists-meta (nil)}}, :name cljs.spec.gen.alphaLine truncated
File diff suppressed because it is too large. Load diff
+1
View File
@@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A,gHAAA;;GAAA;AAAA,AAAA,AAAA;;;0BAAA,1BAAgC0C;yCAAhCxC;AAAA,AAAA,IAAAC,sBAAA;AAAA,AAAA,IAAAC,2BAAA,AAAA;AAAA,AAAA,IAAAC,yBAAA;;AAAA,AAAA,GAAA,CAAAA,yBAAAD;AAAA,AAAA,AAAAD,yBAAA,CAAA,UAAAE;;AAAA,eAAA,CAAAA,yBAAA;;;;AAAA;;;;AAAA,IAAAC,wBAAA,EAAA,CAAA,MAAA,AAAAH,6BAAA,AAAA,KAAAI,qBAAA,AAAAJ,0BAAA,KAAA,IAAA,OAAA;AAAA,AAAA,OAAAuC,6DAAApC;;;;AAAA,AAAA,AAAA,AAAAoC,+DAAA;kBAAA\/B;AAAA,AAAA,OAAAE,0BAAA,AAAAD,0BAAAsB,wBAAAvB;;;;AAAA,AAAA,AAAA+B,kDAAA;;AAAA,AAAA,AAAAA,4CAAA;kBAAAC;AAAA,AAAA,OAAAD,6DAAA,AAAAhC,wBAAAiC;;;;AAAA;AAAA,IAAAT,yBAAA,KAAA3C,4BAAA;AAAA,AAAA,GAAA,CAAA,OAAAO,kCAAA,OAAAiB,wCAAA,OAAA6B;AAAAA;;AAAA,MAAA,KAAA7C,MAAA,CAAA,mDAAA,6HAAA,gEAAA,AAAAC,8BAAA,8HAAA;;GAAA;AAAA,AAAA,AAAA;;;gCAAA,hCAAoC6C;+CAApC3C;AAAA,AAAA,IAAAC,sBAAA;AAAA,AAAA,IAAAC,2BAAA,AAAA;AAAA,AAAA,IAAAC,yBAAA;;AAAA,Line truncated
+692
View File
@@ -0,0 +1,692 @@
;; Copyright (c) Rich Hickey. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.stacktrace
(:require #?@(:clj [[cljs.util :as util]
[clojure.java.io :as io]]
:cljs [[goog.string :as gstring]])
[clojure.string :as string])
#?(:clj (:import [java.util.regex Pattern]
[java.io File])))
(defmulti parse-stacktrace
"Parse a JavaScript stacktrace string into a canonical data form. The
arguments:
repl-env - the repl environment, an optional map with :host and :port keys
if the stacktrace includes url, not file references
st - the original stacktrace string to parse
err - an error map. :ua-product key defines the type of stacktrace parser
to use, for example :chrome
opts - additional options. :output-dir maybe given in this argument if
:host and :port do not apply, for example, a file path
The canonical stacktrace representation can easily be mapped to a
ClojureScript one see mapped-stacktrace and mapped-stacktrace-str"
(fn [repl-env st err opts] (:ua-product err)))
(defn parse-int [s]
#?(:clj (Long/parseLong s)
:cljs (js/parseInt s 10)))
(defn starts-with?
#?(:cljs {:tag boolean})
[^String s0 s1]
#?(:clj (.startsWith s0 s1)
:cljs (gstring/startsWith s0 s1)))
(defn ends-with?
#?(:cljs {:tag boolean})
[^String s0 s1]
#?(:clj (.endsWith s0 s1)
:cljs (gstring/endsWith s0 s1)))
(defn string->regex [s]
#?(:clj (Pattern/compile s)
:cljs (js/RegExp. s)))
(defn output-directory [opts]
#?(:clj (util/output-directory opts)
:cljs (or (:output-dir opts) "out")))
(defmethod parse-stacktrace :default
[repl-env st err opts] st)
(defn parse-file-line-column [flc]
(if-not (re-find #":" flc)
[flc nil nil]
(let [xs (string/split flc #":")
[pre [line column]]
(reduce
(fn [[pre post] [x i]]
(if (<= i 2)
[pre (conj post x)]
[(conj pre x) post]))
[[] []] (map vector xs (range (count xs) 0 -1)))
file (string/join ":" pre)]
[(cond-> file
(starts-with? file "(") (string/replace "(" ""))
(parse-int
(cond-> line
(ends-with? line ")") (string/replace ")" "")))
(parse-int
(cond-> column
(ends-with? column ")") (string/replace ")" "")))])))
(defn parse-file
"Given a browser file url convert it into a relative path that can be used
to locate the original source."
[{:keys [host host-port port] :as repl-env} file {:keys [asset-path] :as opts}]
(let [urlpat (if host
(string->regex
(str "http://" host ":" (or host-port port) "/"))
"")
match (if host
(re-find urlpat file)
(contains? opts :output-dir))]
(if match
(-> file
(string/replace urlpat "")
(string/replace
(string->regex
;; if :asset-path specified drop leading slash
(str "^" (or (and asset-path (string/replace asset-path #"^/" ""))
(output-directory opts)) "/"))
""))
(if-let [asset-root (:asset-root opts)]
(string/replace file asset-root "")
(throw
(ex-info (str "Could not relativize URL " file)
{:type :parse-stacktrace
:reason :relativize-url}))))))
;; -----------------------------------------------------------------------------
;; Chrome Stacktrace
(defn chrome-st-el->frame
[repl-env st-el opts]
(let [xs (-> st-el
(string/replace #"\s+at\s+" "")
(string/split #"\s+"))
[function flc] (if (== 1 (count xs))
[nil (first xs)]
[(first xs) (last xs)])
[file line column] (parse-file-line-column flc)]
(if (and file function line column)
{:file (parse-file repl-env file opts)
:function (string/replace function #"Object\." "")
:line line
:column column}
(when-not (string/blank? function)
{:file nil
:function (string/replace function #"Object\." "")
:line nil
:column nil}))))
(comment
(chrome-st-el->frame {:host "localhost" :port 9000}
"\tat cljs$core$ffirst (http://localhost:9000/out/cljs/core.js:5356:34)" {})
)
(defmethod parse-stacktrace :chrome
[repl-env st err opts]
(->> st
string/split-lines
(drop-while #(starts-with? % "Error"))
(take-while #(not (starts-with? % " at eval")))
(map #(chrome-st-el->frame repl-env % opts))
(remove nil?)
vec))
(comment
(parse-stacktrace {:host "localhost" :port 9000}
"Error: 1 is not ISeqable
at Object.cljs$core$seq [as seq] (http://localhost:9000/out/cljs/core.js:4258:8)
at Object.cljs$core$first [as first] (http://localhost:9000/out/cljs/core.js:4288:19)
at cljs$core$ffirst (http://localhost:9000/out/cljs/core.js:5356:34)
at http://localhost:9000/out/cljs/core.js:16971:89
at cljs.core.map.cljs$core$map__2 (http://localhost:9000/out/cljs/core.js:16972:3)
at http://localhost:9000/out/cljs/core.js:10981:129
at cljs.core.LazySeq.sval (http://localhost:9000/out/cljs/core.js:10982:3)
at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (http://localhost:9000/out/cljs/core.js:11073:10)
at Object.cljs$core$seq [as seq] (http://localhost:9000/out/cljs/core.js:4239:13)
at Object.cljs$core$pr_sequential_writer [as pr_sequential_writer] (http://localhost:9000/out/cljs/core.js:28706:14)"
{:ua-product :chrome}
nil)
(parse-stacktrace {:host "localhost" :port 9000}
"Error: 1 is not ISeqable
at Object.cljs$core$seq [as seq] (http://localhost:9000/js/cljs/core.js:4258:8)
at Object.cljs$core$first [as first] (http://localhost:9000/js/cljs/core.js:4288:19)
at cljs$core$ffirst (http://localhost:9000/js/cljs/core.js:5356:34)
at http://localhost:9000/js/cljs/core.js:16971:89
at cljs.core.map.cljs$core$map__2 (http://localhost:9000/js/cljs/core.js:16972:3)
at http://localhost:9000/js/cljs/core.js:10981:129
at cljs.core.LazySeq.sval (http://localhost:9000/js/cljs/core.js:10982:3)
at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (http://localhost:9000/js/cljs/core.js:11073:10)
at Object.cljs$core$seq [as seq] (http://localhost:9000/js/cljs/core.js:4239:13)
at Object.cljs$core$pr_sequential_writer [as pr_sequential_writer] (http://localhost:9000/js/cljs/core.js:28706:14)"
{:ua-product :chrome}
{:asset-path "/js"})
(parse-stacktrace {:host "localhost" :port 9000}
"Error: 1 is not ISeqable
at Object.cljs$core$seq [as seq] (http://localhost:9000/out/cljs/core.js:4259:8)
at Object.cljs$core$first [as first] (http://localhost:9000/out/cljs/core.js:4289:19)
at cljs$core$ffirst (http://localhost:9000/out/cljs/core.js:5357:18)
at eval (eval at <anonymous> (http://localhost:9000/out/clojure/browser/repl.js:23:272), <anonymous>:1:106)
at eval (eval at <anonymous> (http://localhost:9000/out/clojure/browser/repl.js:23:272), <anonymous>:9:3)
at eval (eval at <anonymous> (http://localhost:9000/out/clojure/browser/repl.js:23:272), <anonymous>:14:4)
at http://localhost:9000/out/clojure/browser/repl.js:23:267
at clojure$browser$repl$evaluate_javascript (http://localhost:9000/out/clojure/browser/repl.js:26:4)
at Object.callback (http://localhost:9000/out/clojure/browser/repl.js:121:169)
at goog.messaging.AbstractChannel.deliver (http://localhost:9000/out/goog/messaging/abstractchannel.js:142:13)"
{:ua-product :chrome}
nil)
;; Node.js example
(parse-stacktrace {}
"Error: 1 is not ISeqable
at Object.cljs$core$seq [as seq] (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:3999:8)
at Object.cljs$core$first [as first] (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:4018:19)
at cljs$core$ffirst (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:5161:34)
at /home/my/cool/project/.cljs_bootstrap/cljs/core.js:16006:88
at cljs.core.map.cljs$core$IFn$_invoke$arity$2 (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:16007:3)
at cljs.core.LazySeq.sval (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:10244:109)
at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:10335:10)
at Object.cljs$core$seq [as seq] (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:3980:13)
at Object.cljs$core$pr_sequential_writer [as pr_sequential_writer] (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:28084:14)
at cljs.core.LazySeq.cljs$core$IPrintWithWriter$_pr_writer$arity$3 (/home/my/cool/project/.cljs_bootstrap/cljs/core.js:28812:18)"
{:ua-product :chrome}
{:output-dir "/home/my/cool/project/.cljs_bootstrap"})
)
;; -----------------------------------------------------------------------------
;; Safari Stacktrace
(defn safari-st-el->frame
[repl-env st-el opts]
(let [[function flc] (if (re-find #"@" st-el)
(string/split st-el #"@")
[nil st-el])
[file line column] (parse-file-line-column flc)]
(if (and file function line column)
{:file (parse-file repl-env file opts)
:function (string/trim function)
:line line
:column column}
(when-not (string/blank? function)
{:file nil
:function (string/trim function)
:line nil
:column nil}))))
(comment
(safari-st-el->frame {:host "localhost" :port 9000}
"cljs$core$seq@http://localhost:9000/out/cljs/core.js:4259:17" {})
(safari-st-el->frame {:host "localhost" :port 9000}
"cljs$core$seq@http://localhost:9000/js/cljs/core.js:4259:17" {:asset-path "js"})
)
(defmethod parse-stacktrace :safari
[repl-env st err opts]
(->> st
string/split-lines
(drop-while #(starts-with? % "Error"))
(take-while #(not (starts-with? % "eval code")))
(remove string/blank?)
(map #(safari-st-el->frame repl-env % opts))
(remove nil?)
vec))
(comment
(parse-stacktrace {}
"cljs$core$seq@out/cljs/core.js:3999:17
cljs$core$first@out/cljs/core.js:4018:22
cljs$core$ffirst@out/cljs/core.js:5161:39
global code"
{:ua-product :safari}
{:output-dir "out"})
(parse-stacktrace {:host "localhost" :port 9000}
"cljs$core$seq@http://localhost:9000/out/cljs/core.js:4259:17
cljs$core$first@http://localhost:9000/out/cljs/core.js:4289:22
cljs$core$ffirst@http://localhost:9000/out/cljs/core.js:5357:39
http://localhost:9000/out/cljs/core.js:16972:92
http://localhost:9000/out/cljs/core.js:16973:3
http://localhost:9000/out/cljs/core.js:10982:133
sval@http://localhost:9000/out/cljs/core.js:10983:3
cljs$core$ISeqable$_seq$arity$1@http://localhost:9000/out/cljs/core.js:11074:14
cljs$core$seq@http://localhost:9000/out/cljs/core.js:4240:44
cljs$core$pr_sequential_writer@http://localhost:9000/out/cljs/core.js:28707:17
cljs$core$IPrintWithWriter$_pr_writer$arity$3@http://localhost:9000/out/cljs/core.js:29386:38
cljs$core$pr_writer_impl@http://localhost:9000/out/cljs/core.js:28912:57
cljs$core$pr_writer@http://localhost:9000/out/cljs/core.js:29011:32
cljs$core$pr_seq_writer@http://localhost:9000/out/cljs/core.js:29015:20
cljs$core$pr_sb_with_opts@http://localhost:9000/out/cljs/core.js:29078:24
cljs$core$pr_str_with_opts@http://localhost:9000/out/cljs/core.js:29092:48
cljs$core$pr_str__delegate@http://localhost:9000/out/cljs/core.js:29130:34
cljs$core$pr_str@http://localhost:9000/out/cljs/core.js:29139:39
eval code
eval@[native code]
http://localhost:9000/out/clojure/browser/repl.js:23:271
clojure$browser$repl$evaluate_javascript@http://localhost:9000/out/clojure/browser/repl.js:26:4
http://localhost:9000/out/clojure/browser/repl.js:121:173
deliver@http://localhost:9000/out/goog/messaging/abstractchannel.js:142:21
xpcDeliver@http://localhost:9000/out/goog/net/xpc/crosspagechannel.js:733:19
messageReceived_@http://localhost:9000/out/goog/net/xpc/nativemessagingtransport.js:321:23
fireListener@http://localhost:9000/out/goog/events/events.js:741:25
handleBrowserEvent_@http://localhost:9000/out/goog/events/events.js:862:34
http://localhost:9000/out/goog/events/events.js:276:42"
{:ua-product :safari}
nil)
)
;; -----------------------------------------------------------------------------
;; Firefox Stacktrace
(defn firefox-clean-function [f]
(as-> f f
(cond
(string/blank? f) nil
(not= (.indexOf f "</") -1)
(let [idx (.indexOf f "</")]
(.substring f (+ idx 2)))
:else f)
(-> f
(string/replace #"<" "")
(string/replace #?(:clj #"\/" :cljs (js/RegExp. "\\/")) ""))))
(defn firefox-st-el->frame
[repl-env st-el opts]
(let [[function flc] (if (re-find #"@" st-el)
(string/split st-el #"@")
[nil st-el])
[file line column] (parse-file-line-column flc)]
(if (and file function line column)
{:file (parse-file repl-env file opts)
:function (firefox-clean-function function)
:line line
:column column}
(when-not (string/blank? function)
{:file nil
:function (firefox-clean-function function)
:line nil
:column nil}))))
(comment
(firefox-st-el->frame {:host "localhost" :port 9000}
"cljs$core$seq@http://localhost:9000/out/cljs/core.js:4258:8" {})
(firefox-st-el->frame {:host "localhost" :port 9000}
"cljs.core.map</cljs$core$map__2/</<@http://localhost:9000/out/cljs/core.js:16971:87" {})
(firefox-st-el->frame {:host "localhost" :port 9000}
"cljs.core.map</cljs$core$map__2/</<@http://localhost:9000/out/cljs/core.js:16971:87" {})
(firefox-st-el->frame {:host "localhost" :port 9000}
"cljs.core.pr_str</cljs$core$pr_str@http://localhost:9000/out/cljs/core.js:29138:8" {})
(firefox-st-el->frame {:host "localhost" :port 9000}
"cljs.core.pr_str</cljs$core$pr_str__delegate@http://localhost:9000/out/cljs/core.js:29129:8" {})
)
(defmethod parse-stacktrace :firefox
[repl-env st err opts]
(->> st
string/split-lines
(drop-while #(starts-with? % "Error"))
(take-while #(= (.indexOf % "> eval") -1))
(remove string/blank?)
(map #(firefox-st-el->frame repl-env % opts))
(remove nil?)
vec))
(comment
(parse-stacktrace {:host "localhost" :port 9000}
"cljs$core$seq@http://localhost:9000/out/cljs/core.js:4258:8
cljs$core$first@http://localhost:9000/out/cljs/core.js:4288:9
cljs$core$ffirst@http://localhost:9000/out/cljs/core.js:5356:24
cljs.core.map</cljs$core$map__2/</<@http://localhost:9000/out/cljs/core.js:16971:87
cljs.core.map</cljs$core$map__2/<@http://localhost:9000/out/cljs/core.js:16970:1
cljs.core.LazySeq.prototype.sval/self__.s<@http://localhost:9000/out/cljs/core.js:10981:119
cljs.core.LazySeq.prototype.sval@http://localhost:9000/out/cljs/core.js:10981:13
cljs.core.LazySeq.prototype.cljs$core$ISeqable$_seq$arity$1@http://localhost:9000/out/cljs/core.js:11073:1
cljs$core$seq@http://localhost:9000/out/cljs/core.js:4239:8
cljs$core$pr_sequential_writer@http://localhost:9000/out/cljs/core.js:28706:4
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3@http://localhost:9000/out/cljs/core.js:29385:8
cljs$core$pr_writer_impl@http://localhost:9000/out/cljs/core.js:28911:8
cljs$core$pr_writer@http://localhost:9000/out/cljs/core.js:29010:8
cljs$core$pr_seq_writer@http://localhost:9000/out/cljs/core.js:29014:1
cljs$core$pr_sb_with_opts@http://localhost:9000/out/cljs/core.js:29077:1
cljs$core$pr_str_with_opts@http://localhost:9000/out/cljs/core.js:29091:23
cljs.core.pr_str</cljs$core$pr_str__delegate@http://localhost:9000/out/cljs/core.js:29129:8
cljs.core.pr_str</cljs$core$pr_str@http://localhost:9000/out/cljs/core.js:29138:8
@http://localhost:9000/out/clojure/browser/repl.js line 23 > eval:1:25
@http://localhost:9000/out/clojure/browser/repl.js line 23 > eval:1:2
clojure$browser$repl$evaluate_javascript/result<@http://localhost:9000/out/clojure/browser/repl.js:23:267
clojure$browser$repl$evaluate_javascript@http://localhost:9000/out/clojure/browser/repl.js:23:15
clojure$browser$repl$connect/</<@http://localhost:9000/out/clojure/browser/repl.js:121:128
goog.messaging.AbstractChannel.prototype.deliver@http://localhost:9000/out/goog/messaging/abstractchannel.js:142:5
goog.net.xpc.CrossPageChannel.prototype.xpcDeliver@http://localhost:9000/out/goog/net/xpc/crosspagechannel.js:733:7
goog.net.xpc.NativeMessagingTransport.messageReceived_@http://localhost:9000/out/goog/net/xpc/nativemessagingtransport.js:321:1
goog.events.fireListener@http://localhost:9000/out/goog/events/events.js:741:10
goog.events.handleBrowserEvent_@http://localhost:9000/out/goog/events/events.js:862:1
goog.events.getProxy/f<@http://localhost:9000/out/goog/events/events.js:276:16"
{:ua-product :firefox}
nil)
)
;; -----------------------------------------------------------------------------
;; Rhino Stacktrace
(defmethod parse-stacktrace :rhino
[repl-env st err {:keys [output-dir] :as opts}]
(letfn [(process-frame [frame-str]
(when-not (or (string/blank? frame-str)
(== -1 (.indexOf frame-str "\tat")))
(let [[file-side line-fn-side] (string/split frame-str #":")
file (string/replace file-side #"\s+at\s+" "")
[line function] (string/split line-fn-side #"\s+")]
{:file (string/replace file
(str output-dir
#?(:clj File/separator :cljs "/"))
"")
:function (when function
(-> function
(string/replace "(" "")
(string/replace ")" "")))
:line (when (and line (not (string/blank? line)))
(parse-int line))
:column 0})))]
(->> (string/split st #"\n")
(map process-frame)
(remove nil?)
vec)))
(comment
(parse-stacktrace {}
"\tat .cljs_rhino_repl/goog/../cljs/core.js:4215 (seq)
\tat .cljs_rhino_repl/goog/../cljs/core.js:4245 (first)
\tat .cljs_rhino_repl/goog/../cljs/core.js:5295 (ffirst)
\tat <cljs repl>:1
\tat <cljs repl>:1"
{:ua-product :rhino}
{:output-dir ".cljs_rhino_repl"})
(parse-stacktrace {}
"org.mozilla.javascript.JavaScriptException: Error: 1 is not ISeqable (.cljs_rhino_repl/goog/../cljs/core.js#3998)
\tat .cljs_rhino_repl/goog/../cljs/core.js:3998 (cljs$core$seq)
\tat .cljs_rhino_repl/goog/../cljs/core.js:4017 (cljs$core$first)
\tat .cljs_rhino_repl/goog/../cljs/core.js:5160 (cljs$core$ffirst)
\tat .cljs_rhino_repl/goog/../cljs/core.js:16005
\tat .cljs_rhino_repl/goog/../cljs/core.js:16004
\tat .cljs_rhino_repl/goog/../cljs/core.js:10243
\tat .cljs_rhino_repl/goog/../cljs/core.js:10334
\tat .cljs_rhino_repl/goog/../cljs/core.js:3979 (cljs$core$seq)
\tat .cljs_rhino_repl/goog/../cljs/core.js:28083 (cljs$core$pr_sequential_writer)
\tat .cljs_rhino_repl/goog/../cljs/core.js:28811
\tat .cljs_rhino_repl/goog/../cljs/core.js:28267 (cljs$core$pr_writer_impl)
\tat .cljs_rhino_repl/goog/../cljs/core.js:28349 (cljs$core$pr_writer)
\tat .cljs_rhino_repl/goog/../cljs/core.js:28353 (cljs$core$pr_seq_writer)
\tat .cljs_rhino_repl/goog/../cljs/core.js:28416 (cljs$core$pr_sb_with_opts)
\tat .cljs_rhino_repl/goog/../cljs/core.js:28430 (cljs$core$pr_str_with_opts)
\tat .cljs_rhino_repl/goog/../cljs/core.js:28524
\tat .cljs_rhino_repl/goog/../cljs/core.js:28520 (cljs$core$pr_str)
at <cljs repl>:1
"
{:ua-product :rhino}
{:output-dir ".cljs_rhino_repl"})
)
;; -----------------------------------------------------------------------------
;; Nashorn Stacktrace
(defmethod parse-stacktrace :nashorn
[repl-env st err {:keys [output-dir] :as opts}]
(letfn [(process-frame [frame-str]
(when-not (or (string/blank? frame-str)
(== -1 (.indexOf frame-str "\tat")))
(let [frame-str (string/replace frame-str #"\s+at\s+" "")
[function file-and-line] (string/split frame-str #"\s+")
[file-part line-part] (string/split file-and-line #":")]
{:file (string/replace (.substring file-part 1)
(str output-dir
#?(:clj File/separator :cljs "/"))
"")
:function function
:line (when (and line-part (not (string/blank? line-part)))
(parse-int
(.substring line-part 0
(dec (count line-part)))))
:column 0})))]
(->> (string/split st #"\n")
(map process-frame)
(remove nil?)
vec)))
(comment
(parse-stacktrace {}
"Error: 1 is not ISeqable
\tat cljs$core$seq (.cljs_nashorn_repl/goog/../cljs/core.js:3998)
\tat cljs$core$first (.cljs_nashorn_repl/goog/../cljs/core.js:4017)
\tat cljs$core$ffirst (.cljs_nashorn_repl/goog/../cljs/core.js:5160)
\tat <anonymous> (.cljs_nashorn_repl/goog/../cljs/core.js:16005)
\tat <anonymous> (.cljs_nashorn_repl/goog/../cljs/core.js:16004)
\tat sval (.cljs_nashorn_repl/goog/../cljs/core.js:10243)
\tat cljs$core$ISeqable$_seq$arity$1-6 (.cljs_nashorn_repl/goog/../cljs/core.js:10334)
\tat cljs$core$seq (.cljs_nashorn_repl/goog/../cljs/core.js:3979)
\tat cljs$core$pr_sequential_writer (.cljs_nashorn_repl/goog/../cljs/core.js:28083)
\tat cljs$core$IPrintWithWriter$_pr_writer$arity$3-5 (.cljs_nashorn_repl/goog/../cljs/core.js:28811)
\tat cljs$core$pr_writer_impl (.cljs_nashorn_repl/goog/../cljs/core.js:28267)
\tat cljs$core$pr_writer (.cljs_nashorn_repl/goog/../cljs/core.js:28349)
\tat cljs$core$pr_seq_writer (.cljs_nashorn_repl/goog/../cljs/core.js:28353)
\tat cljs$core$pr_sb_with_opts (.cljs_nashorn_repl/goog/../cljs/core.js:28416)
\tat cljs$core$pr_str_with_opts (.cljs_nashorn_repl/goog/../cljs/core.js:28430)
\tat cljs$core$IFn$_invoke$arity$variadic-71 (.cljs_nashorn_repl/goog/../cljs/core.js:28524)
\tat cljs$core$pr_str (.cljs_nashorn_repl/goog/../cljs/core.js:28520)
\tat <anonymous> (<eval>:1)
\tat <program> (<eval>:1)\n"
{:ua-product :nashorn}
{:output-dir ".cljs_nashorn_repl"})
)
;; -----------------------------------------------------------------------------
;; Node.js Stacktrace
(defmethod parse-stacktrace :nodejs
[repl-env st err {:keys [output-dir] :as opts}]
(letfn [(parse-source-loc-info [x]
(when (and x (not (string/blank? x)))
(parse-int x)))
(process-frame [frame-str]
(when-not (or (string/blank? frame-str)
(nil? (re-find #"^\s+at" frame-str)))
(let [frame-str (string/replace frame-str #"\s+at\s+" "")]
(when-not (string/starts-with? frame-str "repl:")
(let [parts (string/split frame-str #"\s+")
[function file&line] (if (== 2 (count parts))
[(first parts)
(subs (second parts) 1
(dec (count (second parts))))]
[nil (first parts)])
[file-part line-part col-part] (string/split file&line #":")]
{:file (if function
(cond-> file-part
output-dir
(string/replace
(str output-dir
#?(:clj File/separator :cljs "/"))
""))
file-part)
:function function
:line (parse-source-loc-info line-part)
:column (parse-source-loc-info col-part)})))))]
(->> (string/split st #"\n")
(map process-frame)
(remove nil?)
vec)))
(comment
(parse-stacktrace {}
"Error: 1 is not ISeqable
at cljs$core$seq (.cljs_node_repl/cljs/core.cljs:1118:20)
at repl:1:65
at repl:9:4
at repl:17:3
at repl:22:4
at Object.exports.runInThisContext (vm.js:54:17)
at Domain.<anonymous> ([stdin]:41:34)
at Domain.run (domain.js:228:14)
at Socket.<anonymous> ([stdin]:40:25)
at emitOne (events.js:77:13)"
{:ua-product :nodejs}
{:output-dir ".cljs_node_repl"})
)
;; -----------------------------------------------------------------------------
;; Stacktrace Mapping
(defn remove-ext [file]
(-> file
(string/replace #"\.js$" "")
(string/replace #"\.cljs$" "")
(string/replace #"\.cljc$" "")
(string/replace #"\.clj$" "")))
(defn mapped-line-column-call
"Given a cljs.source-map source map data structure map a generated line
and column back to the original line, column, and function called."
[sms file line column]
(let [source-map (get sms (symbol (string/replace (remove-ext file) "/" ".")))]
;; source maps are 0 indexed for columns
;; multiple segments may exist at column
;; the last segment seems most accurate
(letfn [(get-best-column [columns column]
(last (or (get columns
(last (filter #(<= % (dec column))
(sort (keys columns)))))
(second (first columns)))))
(adjust [mapped]
(vec (map #(%1 %2) [inc inc identity] mapped)))]
(let [default [line column nil]]
;; source maps are 0 indexed for lines
(if-let [columns (get source-map (dec line))]
(adjust (map (get-best-column columns column) [:line :col :name]))
default)))))
(defn mapped-frame
"Given opts and a canonicalized JavaScript stacktrace frame, return the
ClojureScript frame."
[{:keys [function file line column]} sms opts]
(let [no-source-file? (if-not file true (starts-with? file "<"))
[line' column' call] (if no-source-file?
[line column nil]
(mapped-line-column-call sms file line column))
file' (when-not no-source-file?
(if (ends-with? file ".js")
(str (subs file 0 (- (count file) 3)) ".cljs")
file))]
{:function function
:call call
:file (if no-source-file?
(str "NO_SOURCE_FILE" (when file (str " " file)))
file')
:line line'
:column column'}))
(defn mapped-stacktrace
"Given a vector representing the canonicalized JavaScript stacktrace
return the ClojureScript stacktrace. The canonical stacktrace must be
in the form:
[{:file <string>
:function <string>
:line <integer>
:column <integer>}*]
:file must be a URL path (without protocol) relative to :output-dir or a
identifier delimited by angle brackets. The returned mapped stacktrace will
also contain :url entries to the original sources if it can be determined
from the classpath."
([stacktrace sms]
(mapped-stacktrace stacktrace sms nil))
([stacktrace sms opts]
(letfn [(call->function [x]
(if (:call x)
(hash-map :function (:call x))
{}))
(call-merge [function call]
(merge-with
(fn [munged-fn-name unmunged-call-name]
(if (= munged-fn-name
(string/replace (munge unmunged-call-name) "." "$"))
unmunged-call-name
munged-fn-name))
function call))]
(let [mapped-frames (map (memoize #(mapped-frame % sms opts)) stacktrace)]
;; take each non-nil :call and optionally merge it into :function one-level
;; up to avoid replacing with local symbols, we only replace munged name if
;; we can munge call symbol back to it
(vec (map call-merge
(map #(dissoc % :call) mapped-frames)
(concat (rest (map call->function mapped-frames)) [{}])))))))
(defn mapped-stacktrace-str
"Given a vector representing the canonicalized JavaScript stacktrace and a map
of library names to decoded source maps, print the ClojureScript stacktrace .
See mapped-stacktrace."
([stacktrace sms]
(mapped-stacktrace-str stacktrace sms nil))
([stacktrace sms opts]
(with-out-str
(doseq [{:keys [function file line column]}
(mapped-stacktrace stacktrace sms opts)]
(println "\t"
(str (when function (str function " "))
"(" file (when line (str ":" line))
(when column (str ":" column)) ")"))))))
(comment
(require '[cljs.closure :as cljsc]
'[clojure.data.json :as json]
'[cljs.source-map :as sm]
'[clojure.pprint :as pp])
(cljsc/build "samples/hello/src"
{:optimizations :none
:output-dir "samples/hello/out"
:output-to "samples/hello/out/hello.js"
:source-map true})
(def sms
{'hello.core
(sm/decode
(json/read-str
(slurp "samples/hello/out/hello/core.js.map")
:key-fn keyword))})
(pp/pprint sms)
;; maps to :line 5 :column 24
(mapped-stacktrace
[{:file "hello/core.js"
:function "first"
:line 6
:column 0}]
sms {:output-dir "samples/hello/out"})
(mapped-stacktrace-str
[{:file "hello/core.js"
:function "first"
:line 6
:column 0}]
sms {:output-dir "samples/hello/out"})
)
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {parseInt {}, RegExp {}, Error {}, goog {string {StringBuffer {prototype {append {}}}}}}, :use-macros {}, :excludes #{}, :name cljs.stacktrace, :imports nil, :requires {gstring goog.string, goog.string goog.string, string clojure.string, clojure.string clojure.string}, :cljs.spec/speced-vars [], :uses nil, :defs {output-directory {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :line 53, :column 7, :end-line 53, :end-column 23, :arglists (quote ([opts]))}, :name cljs.stacktrace/output-directory, :variadic false, :file "target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :end-column 23, :method-params ([opts]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 53, :end-line 53, :max-fixed-arity 1, :fn-var true, :arglists (quote ([opts]))}, ends-with? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :line 43, :column 7, :end-line 43, :end-column 17, :arglists (quote ([s0 s1])), :tag boolean}, :name cljs.stacktrace/ends-with?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :end-column 17, :method-params ([s0 s1]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 43, :ret-tag boolean, :end-line 43, :max-fixed-arity 2, :tag boolean, :fn-var true, :arglists (quote ([s0 s1]))}, starts-with? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :line 37, :column 7, :end-line 37, :end-column 19, :arglists (quote ([s0 s1])), :tag boolean}, :name cljs.stacktrace/starts-with?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :end-column 19, :method-params ([s0 s1]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 37, :ret-tag boolean, :end-line 37, :max-fixed-arity 2, :tag boolean, :fn-var true, :arglists (quote ([s0 s1]))}, remove-ext {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :line 557, :column 7, :end-line 557, :end-column 17, :arglists (quote ([file]))}, :name cljs.stacktrace/remove-ext, :variadic false, :file "target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :end-column 17, :method-params ([file]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 557, :end-line 557, :max-fixed-arity 1, :fn-var true, :arglists (quote ([file]))}, string->regex {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :line 49, :column 7, :end-line 49, :end-column 20, :arglists (quote ([s]))}, :name cljs.stacktrace/string->regex, :variadic false, :file "target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :end-column 20, :method-params ([s]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 49, :end-line 49, :max-fixed-arity 1, :fn-var true, :arglists (quote ([s]))}, safari-st-el->frame {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :line 212, :column 7, :end-line 212, :end-column 26, :arglists (quote ([repl-env st-el opts]))}, :name cljs.stacktrace/safari-st-el->frame, :variadic false, :file "target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :end-column 26, :method-params ([repl-env st-el opts]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 212, :end-line 212, :max-fixed-arity 3, :fn-var true, :arglists (quote ([repl-env st-el opts]))}, mapped-frame {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :line 585, :column 7, :end-line 585, :end-column 19, :arglists (quote ([{:keys [function file line column]} sms opts])), :doc "Given opts and a canonicalized JavaScript stacktrace frame, return the\n ClojureScript frame."}, :name cljs.stacktrace/mapped-frame, :variadic false, :file "target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :end-column 19, :method-params ([p__40733 sms opts]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 585, :end-line 585, :max-fixed-arity 3, :fn-var true, :arglists (quote ([{:keys [function file line column]} sms opts])), :doc "Given opts and a canonicalized JavaScript stacktrace frame, return the\n ClojureScript frame."}, firefox-st-el->frame {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :line 306, :column 7, :end-line 306, :end-column 27, :arglists (quote ([repl-env st-el opts]))}, :name cljs.stacktrace/firefox-st-el->frame, :variadic false, :file "target/cljsbuild/public/js/out/cljs/stacktrace.cljc", :end-column 27, :method-params ([repl-env st-el opts]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 306, :end-line 306, :max-fixed-arity 3, :fn-var true, :arglists (quote ([repl-env st-el opts])Line truncated
+633
View File
@@ -0,0 +1,633 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.stacktrace');
goog.require('cljs.core');
goog.require('goog.string');
goog.require('clojure.string');
if(typeof cljs.stacktrace.parse_stacktrace !== 'undefined'){
} else {
/**
* Parse a JavaScript stacktrace string into a canonical data form. The
* arguments:
*
* repl-env - the repl environment, an optional map with :host and :port keys
* if the stacktrace includes url, not file references
* st - the original stacktrace string to parse
* err - an error map. :ua-product key defines the type of stacktrace parser
* to use, for example :chrome
* opts - additional options. :output-dir maybe given in this argument if
* :host and :port do not apply, for example, a file path
*
* The canonical stacktrace representation can easily be mapped to a
* ClojureScript one see mapped-stacktrace and mapped-stacktrace-str
*/
cljs.stacktrace.parse_stacktrace = (function (){var method_table__36553__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
var prefer_table__36554__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
var method_cache__36555__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
var cached_hierarchy__36556__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
var hierarchy__36557__auto__ = cljs.core.get.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"hierarchy","hierarchy",-1053470341),cljs.core.get_global_hierarchy.call(null));
return (new cljs.core.MultiFn(cljs.core.symbol.call(null,"cljs.stacktrace","parse-stacktrace"),((function (method_table__36553__auto__,prefer_table__36554__auto__,method_cache__36555__auto__,cached_hierarchy__36556__auto__,hierarchy__36557__auto__){
return (function (repl_env,st,err,opts){
return new cljs.core.Keyword(null,"ua-product","ua-product",938384227).cljs$core$IFn$_invoke$arity$1(err);
});})(method_table__36553__auto__,prefer_table__36554__auto__,method_cache__36555__auto__,cached_hierarchy__36556__auto__,hierarchy__36557__auto__))
,new cljs.core.Keyword(null,"default","default",-1987822328),hierarchy__36557__auto__,method_table__36553__auto__,prefer_table__36554__auto__,method_cache__36555__auto__,cached_hierarchy__36556__auto__));
})();
}
cljs.stacktrace.parse_int = (function cljs$stacktrace$parse_int(s){
return parseInt(s,(10));
});
cljs.stacktrace.starts_with_QMARK_ = (function cljs$stacktrace$starts_with_QMARK_(s0,s1){
return goog.string.startsWith(s0,s1);
});
cljs.stacktrace.ends_with_QMARK_ = (function cljs$stacktrace$ends_with_QMARK_(s0,s1){
return goog.string.endsWith(s0,s1);
});
cljs.stacktrace.string__GT_regex = (function cljs$stacktrace$string__GT_regex(s){
return (new RegExp(s));
});
cljs.stacktrace.output_directory = (function cljs$stacktrace$output_directory(opts){
var or__35498__auto__ = new cljs.core.Keyword(null,"output-dir","output-dir",-290956991).cljs$core$IFn$_invoke$arity$1(opts);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return "out";
}
});
cljs.core._add_method.call(null,cljs.stacktrace.parse_stacktrace,new cljs.core.Keyword(null,"default","default",-1987822328),(function (repl_env,st,err,opts){
return st;
}));
cljs.stacktrace.parse_file_line_column = (function cljs$stacktrace$parse_file_line_column(flc){
if(cljs.core.not.call(null,cljs.core.re_find.call(null,/:/,flc))){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [flc,null,null], null);
} else {
var xs = clojure.string.split.call(null,flc,/:/);
var vec__40633 = cljs.core.reduce.call(null,((function (xs){
return (function (p__40639,p__40640){
var vec__40641 = p__40639;
var pre = cljs.core.nth.call(null,vec__40641,(0),null);
var post = cljs.core.nth.call(null,vec__40641,(1),null);
var vec__40644 = p__40640;
var x = cljs.core.nth.call(null,vec__40644,(0),null);
var i = cljs.core.nth.call(null,vec__40644,(1),null);
if((i <= (2))){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [pre,cljs.core.conj.call(null,post,x)], null);
} else {
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.conj.call(null,pre,x),post], null);
}
});})(xs))
,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.PersistentVector.EMPTY,cljs.core.PersistentVector.EMPTY], null),cljs.core.map.call(null,cljs.core.vector,xs,cljs.core.range.call(null,cljs.core.count.call(null,xs),(0),(-1))));
var pre = cljs.core.nth.call(null,vec__40633,(0),null);
var vec__40636 = cljs.core.nth.call(null,vec__40633,(1),null);
var line = cljs.core.nth.call(null,vec__40636,(0),null);
var column = cljs.core.nth.call(null,vec__40636,(1),null);
var file = clojure.string.join.call(null,":",pre);
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [(function (){var G__40647 = file;
if(cljs.stacktrace.starts_with_QMARK_.call(null,file,"(")){
return clojure.string.replace.call(null,G__40647,"(","");
} else {
return G__40647;
}
})(),cljs.stacktrace.parse_int.call(null,(function (){var G__40648 = line;
if(cljs.stacktrace.ends_with_QMARK_.call(null,line,")")){
return clojure.string.replace.call(null,G__40648,")","");
} else {
return G__40648;
}
})()),cljs.stacktrace.parse_int.call(null,(function (){var G__40649 = column;
if(cljs.stacktrace.ends_with_QMARK_.call(null,column,")")){
return clojure.string.replace.call(null,G__40649,")","");
} else {
return G__40649;
}
})())], null);
}
});
/**
* Given a browser file url convert it into a relative path that can be used
* to locate the original source.
*/
cljs.stacktrace.parse_file = (function cljs$stacktrace$parse_file(p__40650,file,p__40651){
var map__40652 = p__40650;
var map__40652__$1 = ((((!((map__40652 == null)))?((((map__40652.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__40652.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__40652):map__40652);
var repl_env = map__40652__$1;
var host = cljs.core.get.call(null,map__40652__$1,new cljs.core.Keyword(null,"host","host",-1558485167));
var host_port = cljs.core.get.call(null,map__40652__$1,new cljs.core.Keyword(null,"host-port","host-port",1956551772));
var port = cljs.core.get.call(null,map__40652__$1,new cljs.core.Keyword(null,"port","port",1534937262));
var map__40653 = p__40651;
var map__40653__$1 = ((((!((map__40653 == null)))?((((map__40653.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__40653.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__40653):map__40653);
var opts = map__40653__$1;
var asset_path = cljs.core.get.call(null,map__40653__$1,new cljs.core.Keyword(null,"asset-path","asset-path",1500889617));
var urlpat = (cljs.core.truth_(host)?cljs.stacktrace.string__GT_regex.call(null,["http://",cljs.core.str.cljs$core$IFn$_invoke$arity$1(host),":",cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var or__35498__auto__ = host_port;
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return port;
}
})()),"/"].join('')):"");
var match = (cljs.core.truth_(host)?cljs.core.re_find.call(null,urlpat,file):cljs.core.contains_QMARK_.call(null,opts,new cljs.core.Keyword(null,"output-dir","output-dir",-290956991)));
if(cljs.core.truth_(match)){
return clojure.string.replace.call(null,clojure.string.replace.call(null,file,urlpat,""),cljs.stacktrace.string__GT_regex.call(null,["^",cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var or__35498__auto__ = (function (){var and__35486__auto__ = asset_path;
if(cljs.core.truth_(and__35486__auto__)){
return clojure.string.replace.call(null,asset_path,/^\//,"");
} else {
return and__35486__auto__;
}
})();
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return cljs.stacktrace.output_directory.call(null,opts);
}
})()),"/"].join('')),"");
} else {
var temp__5455__auto__ = new cljs.core.Keyword(null,"asset-root","asset-root",1771735072).cljs$core$IFn$_invoke$arity$1(opts);
if(cljs.core.truth_(temp__5455__auto__)){
var asset_root = temp__5455__auto__;
return clojure.string.replace.call(null,file,asset_root,"");
} else {
throw cljs.core.ex_info.call(null,["Could not relativize URL ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(file)].join(''),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"parse-stacktrace","parse-stacktrace",-38208461),new cljs.core.Keyword(null,"reason","reason",-2070751759),new cljs.core.Keyword(null,"relativize-url","relativize-url",621482324)], null));
}
}
});
cljs.stacktrace.chrome_st_el__GT_frame = (function cljs$stacktrace$chrome_st_el__GT_frame(repl_env,st_el,opts){
var xs = clojure.string.split.call(null,clojure.string.replace.call(null,st_el,/\s+at\s+/,""),/\s+/);
var vec__40656 = ((((1) === cljs.core.count.call(null,xs)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,cljs.core.first.call(null,xs)], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.first.call(null,xs),cljs.core.last.call(null,xs)], null));
var function$ = cljs.core.nth.call(null,vec__40656,(0),null);
var flc = cljs.core.nth.call(null,vec__40656,(1),null);
var vec__40659 = cljs.stacktrace.parse_file_line_column.call(null,flc);
var file = cljs.core.nth.call(null,vec__40659,(0),null);
var line = cljs.core.nth.call(null,vec__40659,(1),null);
var column = cljs.core.nth.call(null,vec__40659,(2),null);
if(cljs.core.truth_((function (){var and__35486__auto__ = file;
if(cljs.core.truth_(and__35486__auto__)){
var and__35486__auto____$1 = function$;
if(cljs.core.truth_(and__35486__auto____$1)){
var and__35486__auto____$2 = line;
if(cljs.core.truth_(and__35486__auto____$2)){
return column;
} else {
return and__35486__auto____$2;
}
} else {
return and__35486__auto____$1;
}
} else {
return and__35486__auto__;
}
})())){
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),cljs.stacktrace.parse_file.call(null,repl_env,file,opts),new cljs.core.Keyword(null,"function","function",-2127255473),clojure.string.replace.call(null,function$,/Object\./,""),new cljs.core.Keyword(null,"line","line",212345235),line,new cljs.core.Keyword(null,"column","column",2078222095),column], null);
} else {
if(clojure.string.blank_QMARK_.call(null,function$)){
return null;
} else {
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),null,new cljs.core.Keyword(null,"function","function",-2127255473),clojure.string.replace.call(null,function$,/Object\./,""),new cljs.core.Keyword(null,"line","line",212345235),null,new cljs.core.Keyword(null,"column","column",2078222095),null], null);
}
}
});
cljs.core._add_method.call(null,cljs.stacktrace.parse_stacktrace,new cljs.core.Keyword(null,"chrome","chrome",1718738387),(function (repl_env,st,err,opts){
return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.nil_QMARK_,cljs.core.map.call(null,(function (p1__40664_SHARP_){
return cljs.stacktrace.chrome_st_el__GT_frame.call(null,repl_env,p1__40664_SHARP_,opts);
}),cljs.core.take_while.call(null,(function (p1__40663_SHARP_){
return !(cljs.stacktrace.starts_with_QMARK_.call(null,p1__40663_SHARP_," at eval"));
}),cljs.core.drop_while.call(null,(function (p1__40662_SHARP_){
return cljs.stacktrace.starts_with_QMARK_.call(null,p1__40662_SHARP_,"Error");
}),clojure.string.split_lines.call(null,st))))));
}));
cljs.stacktrace.safari_st_el__GT_frame = (function cljs$stacktrace$safari_st_el__GT_frame(repl_env,st_el,opts){
var vec__40665 = (cljs.core.truth_(cljs.core.re_find.call(null,/@/,st_el))?clojure.string.split.call(null,st_el,/@/):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,st_el], null));
var function$ = cljs.core.nth.call(null,vec__40665,(0),null);
var flc = cljs.core.nth.call(null,vec__40665,(1),null);
var vec__40668 = cljs.stacktrace.parse_file_line_column.call(null,flc);
var file = cljs.core.nth.call(null,vec__40668,(0),null);
var line = cljs.core.nth.call(null,vec__40668,(1),null);
var column = cljs.core.nth.call(null,vec__40668,(2),null);
if(cljs.core.truth_((function (){var and__35486__auto__ = file;
if(cljs.core.truth_(and__35486__auto__)){
var and__35486__auto____$1 = function$;
if(cljs.core.truth_(and__35486__auto____$1)){
var and__35486__auto____$2 = line;
if(cljs.core.truth_(and__35486__auto____$2)){
return column;
} else {
return and__35486__auto____$2;
}
} else {
return and__35486__auto____$1;
}
} else {
return and__35486__auto__;
}
})())){
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),cljs.stacktrace.parse_file.call(null,repl_env,file,opts),new cljs.core.Keyword(null,"function","function",-2127255473),clojure.string.trim.call(null,function$),new cljs.core.Keyword(null,"line","line",212345235),line,new cljs.core.Keyword(null,"column","column",2078222095),column], null);
} else {
if(clojure.string.blank_QMARK_.call(null,function$)){
return null;
} else {
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),null,new cljs.core.Keyword(null,"function","function",-2127255473),clojure.string.trim.call(null,function$),new cljs.core.Keyword(null,"line","line",212345235),null,new cljs.core.Keyword(null,"column","column",2078222095),null], null);
}
}
});
cljs.core._add_method.call(null,cljs.stacktrace.parse_stacktrace,new cljs.core.Keyword(null,"safari","safari",497115653),(function (repl_env,st,err,opts){
return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.nil_QMARK_,cljs.core.map.call(null,(function (p1__40673_SHARP_){
return cljs.stacktrace.safari_st_el__GT_frame.call(null,repl_env,p1__40673_SHARP_,opts);
}),cljs.core.remove.call(null,clojure.string.blank_QMARK_,cljs.core.take_while.call(null,(function (p1__40672_SHARP_){
return !(cljs.stacktrace.starts_with_QMARK_.call(null,p1__40672_SHARP_,"eval code"));
}),cljs.core.drop_while.call(null,(function (p1__40671_SHARP_){
return cljs.stacktrace.starts_with_QMARK_.call(null,p1__40671_SHARP_,"Error");
}),clojure.string.split_lines.call(null,st)))))));
}));
cljs.stacktrace.firefox_clean_function = (function cljs$stacktrace$firefox_clean_function(f){
var f__$1 = f;
var f__$2 = ((clojure.string.blank_QMARK_.call(null,f__$1))?null:((cljs.core.not_EQ_.call(null,f__$1.indexOf("</"),(-1)))?(function (){var idx = f__$1.indexOf("</");
return f__$1.substring((idx + (2)));
})():f__$1
));
return clojure.string.replace.call(null,clojure.string.replace.call(null,f__$2,/</,""),(new RegExp("\\/")),"");
});
cljs.stacktrace.firefox_st_el__GT_frame = (function cljs$stacktrace$firefox_st_el__GT_frame(repl_env,st_el,opts){
var vec__40674 = (cljs.core.truth_(cljs.core.re_find.call(null,/@/,st_el))?clojure.string.split.call(null,st_el,/@/):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,st_el], null));
var function$ = cljs.core.nth.call(null,vec__40674,(0),null);
var flc = cljs.core.nth.call(null,vec__40674,(1),null);
var vec__40677 = cljs.stacktrace.parse_file_line_column.call(null,flc);
var file = cljs.core.nth.call(null,vec__40677,(0),null);
var line = cljs.core.nth.call(null,vec__40677,(1),null);
var column = cljs.core.nth.call(null,vec__40677,(2),null);
if(cljs.core.truth_((function (){var and__35486__auto__ = file;
if(cljs.core.truth_(and__35486__auto__)){
var and__35486__auto____$1 = function$;
if(cljs.core.truth_(and__35486__auto____$1)){
var and__35486__auto____$2 = line;
if(cljs.core.truth_(and__35486__auto____$2)){
return column;
} else {
return and__35486__auto____$2;
}
} else {
return and__35486__auto____$1;
}
} else {
return and__35486__auto__;
}
})())){
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),cljs.stacktrace.parse_file.call(null,repl_env,file,opts),new cljs.core.Keyword(null,"function","function",-2127255473),cljs.stacktrace.firefox_clean_function.call(null,function$),new cljs.core.Keyword(null,"line","line",212345235),line,new cljs.core.Keyword(null,"column","column",2078222095),column], null);
} else {
if(clojure.string.blank_QMARK_.call(null,function$)){
return null;
} else {
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),null,new cljs.core.Keyword(null,"function","function",-2127255473),cljs.stacktrace.firefox_clean_function.call(null,function$),new cljs.core.Keyword(null,"line","line",212345235),null,new cljs.core.Keyword(null,"column","column",2078222095),null], null);
}
}
});
cljs.core._add_method.call(null,cljs.stacktrace.parse_stacktrace,new cljs.core.Keyword(null,"firefox","firefox",1283768880),(function (repl_env,st,err,opts){
return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.nil_QMARK_,cljs.core.map.call(null,(function (p1__40682_SHARP_){
return cljs.stacktrace.firefox_st_el__GT_frame.call(null,repl_env,p1__40682_SHARP_,opts);
}),cljs.core.remove.call(null,clojure.string.blank_QMARK_,cljs.core.take_while.call(null,(function (p1__40681_SHARP_){
return cljs.core._EQ_.call(null,p1__40681_SHARP_.indexOf("> eval"),(-1));
}),cljs.core.drop_while.call(null,(function (p1__40680_SHARP_){
return cljs.stacktrace.starts_with_QMARK_.call(null,p1__40680_SHARP_,"Error");
}),clojure.string.split_lines.call(null,st)))))));
}));
cljs.core._add_method.call(null,cljs.stacktrace.parse_stacktrace,new cljs.core.Keyword(null,"rhino","rhino",1962118035),(function (repl_env,st,err,p__40683){
var map__40684 = p__40683;
var map__40684__$1 = ((((!((map__40684 == null)))?((((map__40684.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__40684.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__40684):map__40684);
var opts = map__40684__$1;
var output_dir = cljs.core.get.call(null,map__40684__$1,new cljs.core.Keyword(null,"output-dir","output-dir",-290956991));
var process_frame = ((function (map__40684,map__40684__$1,opts,output_dir){
return (function cljs$stacktrace$process_frame(frame_str){
if((clojure.string.blank_QMARK_.call(null,frame_str)) || (((-1) === frame_str.indexOf("\tat")))){
return null;
} else {
var vec__40692 = clojure.string.split.call(null,frame_str,/:/);
var file_side = cljs.core.nth.call(null,vec__40692,(0),null);
var line_fn_side = cljs.core.nth.call(null,vec__40692,(1),null);
var file = clojure.string.replace.call(null,file_side,/\s+at\s+/,"");
var vec__40695 = clojure.string.split.call(null,line_fn_side,/\s+/);
var line = cljs.core.nth.call(null,vec__40695,(0),null);
var function$ = cljs.core.nth.call(null,vec__40695,(1),null);
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),clojure.string.replace.call(null,file,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(output_dir),"/"].join(''),""),new cljs.core.Keyword(null,"function","function",-2127255473),(cljs.core.truth_(function$)?clojure.string.replace.call(null,clojure.string.replace.call(null,function$,"(",""),")",""):null),new cljs.core.Keyword(null,"line","line",212345235),(cljs.core.truth_((function (){var and__35486__auto__ = line;
if(cljs.core.truth_(and__35486__auto__)){
return !(clojure.string.blank_QMARK_.call(null,line));
} else {
return and__35486__auto__;
}
})())?cljs.stacktrace.parse_int.call(null,line):null),new cljs.core.Keyword(null,"column","column",2078222095),(0)], null);
}
});})(map__40684,map__40684__$1,opts,output_dir))
;
return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.nil_QMARK_,cljs.core.map.call(null,process_frame,clojure.string.split.call(null,st,/\n/))));
}));
cljs.core._add_method.call(null,cljs.stacktrace.parse_stacktrace,new cljs.core.Keyword(null,"nashorn","nashorn",988299963),(function (repl_env,st,err,p__40698){
var map__40699 = p__40698;
var map__40699__$1 = ((((!((map__40699 == null)))?((((map__40699.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__40699.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__40699):map__40699);
var opts = map__40699__$1;
var output_dir = cljs.core.get.call(null,map__40699__$1,new cljs.core.Keyword(null,"output-dir","output-dir",-290956991));
var process_frame = ((function (map__40699,map__40699__$1,opts,output_dir){
return (function cljs$stacktrace$process_frame(frame_str){
if((clojure.string.blank_QMARK_.call(null,frame_str)) || (((-1) === frame_str.indexOf("\tat")))){
return null;
} else {
var frame_str__$1 = clojure.string.replace.call(null,frame_str,/\s+at\s+/,"");
var vec__40707 = clojure.string.split.call(null,frame_str__$1,/\s+/);
var function$ = cljs.core.nth.call(null,vec__40707,(0),null);
var file_and_line = cljs.core.nth.call(null,vec__40707,(1),null);
var vec__40710 = clojure.string.split.call(null,file_and_line,/:/);
var file_part = cljs.core.nth.call(null,vec__40710,(0),null);
var line_part = cljs.core.nth.call(null,vec__40710,(1),null);
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),clojure.string.replace.call(null,file_part.substring((1)),[cljs.core.str.cljs$core$IFn$_invoke$arity$1(output_dir),"/"].join(''),""),new cljs.core.Keyword(null,"function","function",-2127255473),function$,new cljs.core.Keyword(null,"line","line",212345235),(cljs.core.truth_((function (){var and__35486__auto__ = line_part;
if(cljs.core.truth_(and__35486__auto__)){
return !(clojure.string.blank_QMARK_.call(null,line_part));
} else {
return and__35486__auto__;
}
})())?cljs.stacktrace.parse_int.call(null,line_part.substring((0),(cljs.core.count.call(null,line_part) - (1)))):null),new cljs.core.Keyword(null,"column","column",2078222095),(0)], null);
}
});})(map__40699,map__40699__$1,opts,output_dir))
;
return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.nil_QMARK_,cljs.core.map.call(null,process_frame,clojure.string.split.call(null,st,/\n/))));
}));
cljs.core._add_method.call(null,cljs.stacktrace.parse_stacktrace,new cljs.core.Keyword(null,"nodejs","nodejs",321212524),(function (repl_env,st,err,p__40713){
var map__40714 = p__40713;
var map__40714__$1 = ((((!((map__40714 == null)))?((((map__40714.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__40714.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__40714):map__40714);
var opts = map__40714__$1;
var output_dir = cljs.core.get.call(null,map__40714__$1,new cljs.core.Keyword(null,"output-dir","output-dir",-290956991));
var parse_source_loc_info = ((function (map__40714,map__40714__$1,opts,output_dir){
return (function cljs$stacktrace$parse_source_loc_info(x){
if(cljs.core.truth_((function (){var and__35486__auto__ = x;
if(cljs.core.truth_(and__35486__auto__)){
return !(clojure.string.blank_QMARK_.call(null,x));
} else {
return and__35486__auto__;
}
})())){
return cljs.stacktrace.parse_int.call(null,x);
} else {
return null;
}
});})(map__40714,map__40714__$1,opts,output_dir))
;
var process_frame = ((function (map__40714,map__40714__$1,opts,output_dir){
return (function cljs$stacktrace$process_frame(frame_str){
if((clojure.string.blank_QMARK_.call(null,frame_str)) || ((cljs.core.re_find.call(null,/^\s+at/,frame_str) == null))){
return null;
} else {
var frame_str__$1 = clojure.string.replace.call(null,frame_str,/\s+at\s+/,"");
if(clojure.string.starts_with_QMARK_.call(null,frame_str__$1,"repl:")){
return null;
} else {
var parts = clojure.string.split.call(null,frame_str__$1,/\s+/);
var vec__40723 = ((((2) === cljs.core.count.call(null,parts)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.first.call(null,parts),cljs.core.subs.call(null,cljs.core.second.call(null,parts),(1),(cljs.core.count.call(null,cljs.core.second.call(null,parts)) - (1)))], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,cljs.core.first.call(null,parts)], null));
var function$ = cljs.core.nth.call(null,vec__40723,(0),null);
var file_AMPERSAND_line = cljs.core.nth.call(null,vec__40723,(1),null);
var vec__40726 = clojure.string.split.call(null,file_AMPERSAND_line,/:/);
var file_part = cljs.core.nth.call(null,vec__40726,(0),null);
var line_part = cljs.core.nth.call(null,vec__40726,(1),null);
var col_part = cljs.core.nth.call(null,vec__40726,(2),null);
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"file","file",-1269645878),(cljs.core.truth_(function$)?(function (){var G__40729 = file_part;
if(cljs.core.truth_(output_dir)){
return clojure.string.replace.call(null,G__40729,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(output_dir),"/"].join(''),"");
} else {
return G__40729;
}
})():file_part),new cljs.core.Keyword(null,"function","function",-2127255473),function$,new cljs.core.Keyword(null,"line","line",212345235),parse_source_loc_info.call(null,line_part),new cljs.core.Keyword(null,"column","column",2078222095),parse_source_loc_info.call(null,col_part)], null);
}
}
});})(map__40714,map__40714__$1,opts,output_dir))
;
return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.nil_QMARK_,cljs.core.map.call(null,process_frame,clojure.string.split.call(null,st,/\n/))));
}));
cljs.stacktrace.remove_ext = (function cljs$stacktrace$remove_ext(file){
return clojure.string.replace.call(null,clojure.string.replace.call(null,clojure.string.replace.call(null,clojure.string.replace.call(null,file,/\.js$/,""),/\.cljs$/,""),/\.cljc$/,""),/\.clj$/,"");
});
/**
* Given a cljs.source-map source map data structure map a generated line
* and column back to the original line, column, and function called.
*/
cljs.stacktrace.mapped_line_column_call = (function cljs$stacktrace$mapped_line_column_call(sms,file,line,column){
var source_map = cljs.core.get.call(null,sms,cljs.core.symbol.call(null,clojure.string.replace.call(null,cljs.stacktrace.remove_ext.call(null,file),"/",".")));
var get_best_column = ((function (source_map){
return (function cljs$stacktrace$mapped_line_column_call_$_get_best_column(columns,column__$1){
return cljs.core.last.call(null,(function (){var or__35498__auto__ = cljs.core.get.call(null,columns,cljs.core.last.call(null,cljs.core.filter.call(null,((function (source_map){
return (function (p1__40730_SHARP_){
return (p1__40730_SHARP_ <= (column__$1 - (1)));
});})(source_map))
,cljs.core.sort.call(null,cljs.core.keys.call(null,columns)))));
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return cljs.core.second.call(null,cljs.core.first.call(null,columns));
}
})());
});})(source_map))
;
var adjust = ((function (source_map){
return (function cljs$stacktrace$mapped_line_column_call_$_adjust(mapped){
return cljs.core.vec.call(null,cljs.core.map.call(null,((function (source_map){
return (function (p1__40731_SHARP_,p2__40732_SHARP_){
return p1__40731_SHARP_.call(null,p2__40732_SHARP_);
});})(source_map))
,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.inc,cljs.core.inc,cljs.core.identity], null),mapped));
});})(source_map))
;
var default$ = new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [line,column,null], null);
var temp__5455__auto__ = cljs.core.get.call(null,source_map,(line - (1)));
if(cljs.core.truth_(temp__5455__auto__)){
var columns = temp__5455__auto__;
return adjust.call(null,cljs.core.map.call(null,get_best_column.call(null,columns,column),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"line","line",212345235),new cljs.core.Keyword(null,"col","col",-1959363084),new cljs.core.Keyword(null,"name","name",1843675177)], null)));
} else {
return default$;
}
});
/**
* Given opts and a canonicalized JavaScript stacktrace frame, return the
* ClojureScript frame.
*/
cljs.stacktrace.mapped_frame = (function cljs$stacktrace$mapped_frame(p__40733,sms,opts){
var map__40734 = p__40733;
var map__40734__$1 = ((((!((map__40734 == null)))?((((map__40734.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__40734.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__40734):map__40734);
var function$ = cljs.core.get.call(null,map__40734__$1,new cljs.core.Keyword(null,"function","function",-2127255473));
var file = cljs.core.get.call(null,map__40734__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
var line = cljs.core.get.call(null,map__40734__$1,new cljs.core.Keyword(null,"line","line",212345235));
var column = cljs.core.get.call(null,map__40734__$1,new cljs.core.Keyword(null,"column","column",2078222095));
var no_source_file_QMARK_ = ((cljs.core.not.call(null,file))?true:cljs.stacktrace.starts_with_QMARK_.call(null,file,"<"));
var vec__40736 = ((no_source_file_QMARK_)?new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [line,column,null], null):cljs.stacktrace.mapped_line_column_call.call(null,sms,file,line,column));
var line_SINGLEQUOTE_ = cljs.core.nth.call(null,vec__40736,(0),null);
var column_SINGLEQUOTE_ = cljs.core.nth.call(null,vec__40736,(1),null);
var call = cljs.core.nth.call(null,vec__40736,(2),null);
var file_SINGLEQUOTE_ = ((no_source_file_QMARK_)?null:((cljs.stacktrace.ends_with_QMARK_.call(null,file,".js"))?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.subs.call(null,file,(0),(cljs.core.count.call(null,file) - (3)))),".cljs"].join(''):file));
return new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"function","function",-2127255473),function$,new cljs.core.Keyword(null,"call","call",-519999866),call,new cljs.core.Keyword(null,"file","file",-1269645878),((no_source_file_QMARK_)?["NO_SOURCE_FILE",cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(file)?[" ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(file)].join(''):null))].join(''):file_SINGLEQUOTE_),new cljs.core.Keyword(null,"line","line",212345235),line_SINGLEQUOTE_,new cljs.core.Keyword(null,"column","column",2078222095),column_SINGLEQUOTE_], null);
});
/**
* Given a vector representing the canonicalized JavaScript stacktrace
* return the ClojureScript stacktrace. The canonical stacktrace must be
* in the form:
*
* [{:file <string>
* :function <string>
* :line <integer>
* :column <integer>}*]
*
* :file must be a URL path (without protocol) relative to :output-dir or a
* identifier delimited by angle brackets. The returned mapped stacktrace will
* also contain :url entries to the original sources if it can be determined
* from the classpath.
*/
cljs.stacktrace.mapped_stacktrace = (function cljs$stacktrace$mapped_stacktrace(var_args){
var G__40742 = arguments.length;
switch (G__40742) {
case 2:
return cljs.stacktrace.mapped_stacktrace.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
case 3:
return cljs.stacktrace.mapped_stacktrace.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.stacktrace.mapped_stacktrace.cljs$core$IFn$_invoke$arity$2 = (function (stacktrace,sms){
return cljs.stacktrace.mapped_stacktrace.call(null,stacktrace,sms,null);
});
cljs.stacktrace.mapped_stacktrace.cljs$core$IFn$_invoke$arity$3 = (function (stacktrace,sms,opts){
var call__GT_function = (function cljs$stacktrace$call__GT_function(x){
if(cljs.core.truth_(new cljs.core.Keyword(null,"call","call",-519999866).cljs$core$IFn$_invoke$arity$1(x))){
return cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"function","function",-2127255473)],[new cljs.core.Keyword(null,"call","call",-519999866).cljs$core$IFn$_invoke$arity$1(x)]);
} else {
return cljs.core.PersistentArrayMap.EMPTY;
}
});
var call_merge = (function cljs$stacktrace$call_merge(function$,call){
return cljs.core.merge_with.call(null,(function (munged_fn_name,unmunged_call_name){
if(cljs.core._EQ_.call(null,munged_fn_name,clojure.string.replace.call(null,cljs.core.munge.call(null,unmunged_call_name),".","$"))){
return unmunged_call_name;
} else {
return munged_fn_name;
}
}),function$,call);
});
var mapped_frames = cljs.core.map.call(null,cljs.core.memoize.call(null,(function (p1__40739_SHARP_){
return cljs.stacktrace.mapped_frame.call(null,p1__40739_SHARP_,sms,opts);
})),stacktrace);
return cljs.core.vec.call(null,cljs.core.map.call(null,call_merge,cljs.core.map.call(null,((function (mapped_frames){
return (function (p1__40740_SHARP_){
return cljs.core.dissoc.call(null,p1__40740_SHARP_,new cljs.core.Keyword(null,"call","call",-519999866));
});})(mapped_frames))
,mapped_frames),cljs.core.concat.call(null,cljs.core.rest.call(null,cljs.core.map.call(null,call__GT_function,mapped_frames)),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.PersistentArrayMap.EMPTY], null))));
});
cljs.stacktrace.mapped_stacktrace.cljs$lang$maxFixedArity = 3;
/**
* Given a vector representing the canonicalized JavaScript stacktrace and a map
* of library names to decoded source maps, print the ClojureScript stacktrace .
* See mapped-stacktrace.
*/
cljs.stacktrace.mapped_stacktrace_str = (function cljs$stacktrace$mapped_stacktrace_str(var_args){
var G__40745 = arguments.length;
switch (G__40745) {
case 2:
return cljs.stacktrace.mapped_stacktrace_str.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
case 3:
return cljs.stacktrace.mapped_stacktrace_str.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.stacktrace.mapped_stacktrace_str.cljs$core$IFn$_invoke$arity$2 = (function (stacktrace,sms){
return cljs.stacktrace.mapped_stacktrace_str.call(null,stacktrace,sms,null);
});
cljs.stacktrace.mapped_stacktrace_str.cljs$core$IFn$_invoke$arity$3 = (function (stacktrace,sms,opts){
var sb__36625__auto__ = (new goog.string.StringBuffer());
var _STAR_print_newline_STAR_40746_40757 = cljs.core._STAR_print_newline_STAR_;
var _STAR_print_fn_STAR_40747_40758 = cljs.core._STAR_print_fn_STAR_;
cljs.core._STAR_print_newline_STAR_ = true;
cljs.core._STAR_print_fn_STAR_ = ((function (_STAR_print_newline_STAR_40746_40757,_STAR_print_fn_STAR_40747_40758,sb__36625__auto__){
return (function (x__36626__auto__){
return sb__36625__auto__.append(x__36626__auto__);
});})(_STAR_print_newline_STAR_40746_40757,_STAR_print_fn_STAR_40747_40758,sb__36625__auto__))
;
try{var seq__40748_40759 = cljs.core.seq.call(null,cljs.stacktrace.mapped_stacktrace.call(null,stacktrace,sms,opts));
var chunk__40749_40760 = null;
var count__40750_40761 = (0);
var i__40751_40762 = (0);
while(true){
if((i__40751_40762 < count__40750_40761)){
var map__40752_40763 = cljs.core._nth.call(null,chunk__40749_40760,i__40751_40762);
var map__40752_40764__$1 = ((((!((map__40752_40763 == null)))?((((map__40752_40763.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__40752_40763.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__40752_40763):map__40752_40763);
var function_40765 = cljs.core.get.call(null,map__40752_40764__$1,new cljs.core.Keyword(null,"function","function",-2127255473));
var file_40766 = cljs.core.get.call(null,map__40752_40764__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
var line_40767 = cljs.core.get.call(null,map__40752_40764__$1,new cljs.core.Keyword(null,"line","line",212345235));
var column_40768 = cljs.core.get.call(null,map__40752_40764__$1,new cljs.core.Keyword(null,"column","column",2078222095));
cljs.core.println.call(null,"\t",[cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(function_40765)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(function_40765)," "].join(''):null)),"(",cljs.core.str.cljs$core$IFn$_invoke$arity$1(file_40766),cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(line_40767)?[":",cljs.core.str.cljs$core$IFn$_invoke$arity$1(line_40767)].join(''):null)),cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(column_40768)?[":",cljs.core.str.cljs$core$IFn$_invoke$arity$1(column_40768)].join(''):null)),")"].join(''));
var G__40769 = seq__40748_40759;
var G__40770 = chunk__40749_40760;
var G__40771 = count__40750_40761;
var G__40772 = (i__40751_40762 + (1));
seq__40748_40759 = G__40769;
chunk__40749_40760 = G__40770;
count__40750_40761 = G__40771;
i__40751_40762 = G__40772;
continue;
} else {
var temp__5457__auto___40773 = cljs.core.seq.call(null,seq__40748_40759);
if(temp__5457__auto___40773){
var seq__40748_40774__$1 = temp__5457__auto___40773;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__40748_40774__$1)){
var c__36429__auto___40775 = cljs.core.chunk_first.call(null,seq__40748_40774__$1);
var G__40776 = cljs.core.chunk_rest.call(null,seq__40748_40774__$1);
var G__40777 = c__36429__auto___40775;
var G__40778 = cljs.core.count.call(null,c__36429__auto___40775);
var G__40779 = (0);
seq__40748_40759 = G__40776;
chunk__40749_40760 = G__40777;
count__40750_40761 = G__40778;
i__40751_40762 = G__40779;
continue;
} else {
var map__40754_40780 = cljs.core.first.call(null,seq__40748_40774__$1);
var map__40754_40781__$1 = ((((!((map__40754_40780 == null)))?((((map__40754_40780.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__40754_40780.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__40754_40780):map__40754_40780);
var function_40782 = cljs.core.get.call(null,map__40754_40781__$1,new cljs.core.Keyword(null,"function","function",-2127255473));
var file_40783 = cljs.core.get.call(null,map__40754_40781__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
var line_40784 = cljs.core.get.call(null,map__40754_40781__$1,new cljs.core.Keyword(null,"line","line",212345235));
var column_40785 = cljs.core.get.call(null,map__40754_40781__$1,new cljs.core.Keyword(null,"column","column",2078222095));
cljs.core.println.call(null,"\t",[cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(function_40782)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(function_40782)," "].join(''):null)),"(",cljs.core.str.cljs$core$IFn$_invoke$arity$1(file_40783),cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(line_40784)?[":",cljs.core.str.cljs$core$IFn$_invoke$arity$1(line_40784)].join(''):null)),cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(column_40785)?[":",cljs.core.str.cljs$core$IFn$_invoke$arity$1(column_40785)].join(''):null)),")"].join(''));
var G__40786 = cljs.core.next.call(null,seq__40748_40774__$1);
var G__40787 = null;
var G__40788 = (0);
var G__40789 = (0);
seq__40748_40759 = G__40786;
chunk__40749_40760 = G__40787;
count__40750_40761 = G__40788;
i__40751_40762 = G__40789;
continue;
}
} else {
}
}
break;
}
}finally {cljs.core._STAR_print_fn_STAR_ = _STAR_print_fn_STAR_40747_40758;
cljs.core._STAR_print_newline_STAR_ = _STAR_print_newline_STAR_40746_40757;
}
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(sb__36625__auto__)].join('');
});
cljs.stacktrace.mapped_stacktrace_str.cljs$lang$maxFixedArity = 3;
//# sourceMappingURL=stacktrace.js.map?rel=1517021944558
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/stacktrace.js","sources":["stacktrace.cljc?rel=1517021944562"],"lineCount":633,"mappings":";AAQA;;;;AAQA,GAAA,OAAUU;AAAV;AAAA,AAAA;;;;;;;;;;;;;;;mCAAA,iBAAAV,8BAAA,AAAAC,yBAAA,3GAAUS;IAAVR,8BAAA,AAAAD,yBAAA;IAAAE,8BAAA,AAAAF,yBAAA;IAAAG,kCAAA,AAAAH,yBAAA;IAAAI,2BAAA,AAAAC,wBAAA,mCAAA,gEAAA,AAAAC;AAAA,AAAA,YAAAC,kBAAA,AAAAC,2BAAA,kBAAA,oBAcE;kBAAKE,SAASC,GAAGC,IAAIC;AAArB,AAA2B,OAAA,8FAAaD;;CAd1C,4DAAAR,yBAAAL,4BAAAE,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AAAA,oBAAAR;AAAA,IAAAA,yBAAmBpC;AAAnB,AAAA,oBAAAoC;AAAwBnC;;AAAxBmC;;;AAAAA;;;AAAAA;;;AAAJ,kDAAA,+GAAA,uGAAA,yDAAA,zNACS,AAACR,qCAAWxD,SAAS2C,KAAKxC,oEACtB,AAACqF,8BAAYhB,+DACjB5C,8DACEC;;AACT,GAAU,AAAC8C,sCAAcH;AAAzB;;AAAA,AAAA,kDAAA,sDAAA,KAAA,uGAAA,oDAAA,KAAA,yDAAA,3JAEa,AAACgB,8BLine truncated
+944
View File
@@ -0,0 +1,944 @@
;; Copyright (c) Nicola Mometto, Rich Hickey & contributors.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns ^{:doc "A clojure reader in clojure"
:author "Bronsa"}
cljs.tools.reader
(:refer-clojure :exclude [read read-line read-string char
default-data-readers *default-data-reader-fn*
*data-readers* *suppress-read*])
(:require-macros [cljs.tools.reader.reader-types :refer [log-source]])
(:require [cljs.tools.reader.reader-types :refer
[read-char unread peek-char indexing-reader?
get-line-number get-column-number get-file-name
string-push-back-reader]]
[cljs.tools.reader.impl.utils :refer
[char ex-info? whitespace? numeric? desugar-meta next-id namespace-keys second'
ReaderConditional reader-conditional reader-conditional?]]
[cljs.tools.reader.impl.commons :refer
[number-literal? read-past match-number parse-symbol read-comment throwing-reader]]
[cljs.tools.reader.impl.errors :as err]
[goog.array :as garray]
[goog.string :as gstring])
(:import goog.string.StringBuffer))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; helpers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare ^:private read*
macros dispatch-macros
^:dynamic *data-readers*
^:dynamic *default-data-reader-fn*
^:dynamic *suppress-read*
default-data-readers)
(defn- ^boolean macro-terminating? [ch]
(case ch
(\" \; \@ \^ \` \~ \( \) \[ \] \{ \} \\) true
false))
(def sb (StringBuffer.))
(defn- read-token
"Read in a single logical token from the reader"
[^not-native rdr kind initch]
(if (nil? initch)
(err/throw-eof-at-start rdr kind)
(do
(.clear sb)
(loop [ch initch]
(if (or (whitespace? ch)
(macro-terminating? ch)
(nil? ch))
(do
(when-not (nil? ch)
(unread rdr ch))
(.toString sb))
(do
(.append sb ch)
(recur (read-char rdr))))))))
(declare read-tagged)
(defn- read-dispatch
[^not-native rdr _ opts pending-forms]
(if-let [ch (read-char rdr)]
(if-let [dm (dispatch-macros ch)]
(dm rdr ch opts pending-forms)
(read-tagged (doto rdr (unread ch)) ch opts pending-forms)) ;; ctor reader is implemented as a tagged literal
(err/throw-eof-at-dispatch rdr)))
(defn- read-unmatched-delimiter
[rdr ch opts pending-forms]
(err/throw-unmatch-delimiter rdr ch))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; readers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn read-regex
[^not-native rdr ch opts pending-forms]
(let [sb (StringBuffer.)]
(loop [ch (read-char rdr)]
(if (identical? \" ch)
(re-pattern (str sb))
(if (nil? ch)
(err/throw-eof-reading rdr :regex sb)
(do
(.append sb ch )
(when (identical? \\ ch)
(let [ch (read-char rdr)]
(if (nil? ch)
(err/throw-eof-reading rdr :regex sb))
(.append sb ch)))
(recur (read-char rdr))))))))
(defn- char-code [ch base]
(let [code (js/parseInt ch base)]
(if (js/isNaN code)
-1
code)))
(defn- read-unicode-char
([token offset length base]
(let [l (+ offset length)]
(when-not (== (count token) l)
(err/throw-invalid-unicode-literal nil token))
(loop [i offset uc 0]
(if (== i l)
(js/String.fromCharCode uc)
(let [d (char-code (nth token i) base)]
(if (== d -1)
(err/throw-invalid-unicode-digit-in-token nil (nth token i) token)
(recur (inc i) (+ d (* uc base)))))))))
([^not-native rdr initch base length exact?]
(loop [i 1 uc (char-code initch base)]
(if (== uc -1)
(err/throw-invalid-unicode-digit rdr initch)
(if-not (== i length)
(let [ch (peek-char rdr)]
(if (or (whitespace? ch)
(macros ch)
(nil? ch))
(if exact?
(err/throw-invalid-unicode-len rdr i length)
(js/String.fromCharCode uc))
(let [d (char-code ch base)]
(read-char rdr)
(if (== d -1)
(err/throw-invalid-unicode-digit rdr ch)
(recur (inc i) (+ d (* uc base)))))))
(js/String.fromCharCode uc))))))
(def ^:private ^:const upper-limit (.charCodeAt \uD7ff 0))
(def ^:private ^:const lower-limit (.charCodeAt \uE000 0))
(defn- valid-octal? [token base]
(<= (js/parseInt token base) 0377))
(defn- read-char*
"Read in a character literal"
[^not-native rdr backslash opts pending-forms]
(let [ch (read-char rdr)]
(if-not (nil? ch)
(let [token (if (or (macro-terminating? ch)
(whitespace? ch))
(str ch)
(read-token rdr :character ch))
token-len (. token -length)]
(cond
(== 1 token-len) (.charAt token 0) ;;; no char type - so can't ensure/cache char
(= token "newline") \newline
(= token "space") \space
(= token "tab") \tab
(= token "backspace") \backspace
(= token "formfeed") \formfeed
(= token "return") \return
(gstring/startsWith token "u")
(let [c (read-unicode-char token 1 4 16)
ic (.charCodeAt c 0)]
(if (and (> ic upper-limit)
(< ic lower-limit))
(err/throw-invalid-character-literal rdr c)
c))
(gstring/startsWith token "o")
(let [len (dec token-len)]
(if (> len 3)
(err/throw-invalid-octal-len rdr token)
(let [offset 1
base 8
uc (read-unicode-char token offset len base)]
(if-not (valid-octal? (subs token offset) base)
(err/throw-bad-octal-number rdr)
uc))))
:else (err/throw-unsupported-character rdr token)))
(err/throw-eof-in-character rdr))))
(defn- starting-line-col-info [^not-native rdr]
(when (indexing-reader? rdr)
[(get-line-number rdr) (int (dec (get-column-number rdr)))]))
(defn- ending-line-col-info [^not-native rdr]
(when (indexing-reader? rdr)
[(get-line-number rdr) (get-column-number rdr)]))
(defonce ^:private READ_EOF (js/Object.))
(defonce ^:private READ_FINISHED (js/Object.))
(def ^:dynamic *read-delim* false)
(defn- read-delimited-internal [kind delim rdr opts pending-forms]
(let [[start-line start-column] (starting-line-col-info rdr)
delim (char delim)]
(loop [a (transient [])]
(let [form (read* rdr false READ_EOF delim opts pending-forms)]
(if (identical? form READ_FINISHED)
(persistent! a)
(if (identical? form READ_EOF)
(err/throw-eof-delimited rdr kind start-line start-column (count a))
(recur (conj! a form))))))))
(defn- read-delimited
"Reads and returns a collection ended with delim"
[kind delim rdr opts pending-forms]
(binding [*read-delim* true]
(read-delimited-internal kind delim rdr opts pending-forms)))
(defn- read-list
"Read in a list, including its location if the reader is an indexing reader"
[rdr _ opts pending-forms]
(let [[start-line start-column] (starting-line-col-info rdr)
the-list (read-delimited :list \) rdr opts pending-forms)
[end-line end-column] (ending-line-col-info rdr)]
(with-meta (if (empty? the-list)
'()
(apply list the-list))
(when start-line
(merge
(when-let [file (get-file-name rdr)]
{:file file})
{:line start-line
:column start-column
:end-line end-line
:end-column end-column})))))
(defn- read-vector
"Read in a vector, including its location if the reader is an indexing reader"
[rdr _ opts pending-forms]
(let [[start-line start-column] (starting-line-col-info rdr)
the-vector (read-delimited :vector \] rdr opts pending-forms)
[end-line end-column] (ending-line-col-info rdr)]
(with-meta the-vector
(when start-line
(merge
(when-let [file (get-file-name rdr)]
{:file file})
{:line start-line
:column start-column
:end-line end-line
:end-column end-column})))))
(defn- read-map
"Read in a map, including its location if the reader is an indexing reader"
[rdr _ opts pending-forms]
(let [[start-line start-column] (starting-line-col-info rdr)
the-map (read-delimited :map \} rdr opts pending-forms)
map-count (count the-map)
ks (take-nth 2 the-map)
key-set (set ks)
[end-line end-column] (ending-line-col-info rdr)]
(when (odd? map-count)
(err/throw-odd-map rdr start-line start-column the-map))
(when-not (= (count key-set) (count ks))
(err/throw-dup-keys rdr :map ks))
(with-meta
(if (<= map-count (* 2 (.-HASHMAP-THRESHOLD cljs.core/PersistentArrayMap)))
(.fromArray cljs.core/PersistentArrayMap (to-array the-map) true true)
(.fromArray cljs.core/PersistentHashMap (to-array the-map) true))
(when start-line
(merge
(when-let [file (get-file-name rdr)]
{:file file})
{:line start-line
:column start-column
:end-line end-line
:end-column end-column})))))
(defn- read-number
[^not-native rdr initch]
(loop [sb (doto (StringBuffer.) (.append initch))
ch (read-char rdr)]
(if (or (whitespace? ch) (macros ch) (nil? ch))
(let [s (str sb)]
(unread rdr ch)
(or (match-number s)
(err/throw-invalid-number rdr s)))
(recur (doto sb (.append ch)) (read-char rdr)))))
(defn- escape-char [sb ^not-native rdr]
(let [ch (read-char rdr)]
(case ch
\t "\t"
\r "\r"
\n "\n"
\\ "\\"
\" "\""
\b "\b"
\f "\f"
\u (let [ch (read-char rdr)]
(if (== -1 (js/parseInt (int ch) 16))
(err/throw-invalid-unicode-escape rdr ch)
(read-unicode-char rdr ch 16 4 true)))
(if (numeric? ch)
(let [ch (read-unicode-char rdr ch 8 3 false)]
(if (> (int ch) 0337)
(err/throw-bad-octal-number rdr)
ch))
(err/throw-bad-escape-char rdr ch)))))
(defn- read-string*
[^not-native reader _ opts pending-forms]
(loop [sb (StringBuffer.)
ch (read-char reader)]
(if (nil? ch)
(err/throw-eof-reading reader :string \" sb)
(case ch
\\ (recur (doto sb (.append (escape-char sb reader)))
(read-char reader))
\" (str sb)
(recur (doto sb (.append ch)) (read-char reader))))))
(defn- loc-info [rdr line column]
(when-not (nil? line)
(let [file (get-file-name rdr)
filem (when-not (nil? file) {:file file})
[end-line end-column] (ending-line-col-info rdr)
lcm {:line line
:column column
:end-line end-line
:end-column end-column}]
(merge filem lcm))))
(defn- read-symbol
[rdr initch]
(let [[line column] (starting-line-col-info rdr)
token (read-token rdr :symbol initch)]
(when-not (nil? token)
(case token
;; special symbols
"nil" nil
"true" true
"false" false
"/" '/
(let [^not-native p (parse-symbol token)]
(if-not (nil? p)
(let [^not-native sym (symbol (-nth p 0) (-nth p 1))]
(-with-meta sym (loc-info rdr line column)))
(err/throw-invalid rdr :symbol token)))))))
(def ^:dynamic *alias-map*
"Map from ns alias to ns, if non-nil, it will be used to resolve read-time
ns aliases.
Defaults to nil"
nil)
(defn- resolve-alias [sym]
(get *alias-map* sym))
(defn- resolve-ns [sym]
(or (resolve-alias sym)
(when-let [ns (find-ns sym)]
(symbol (ns-name ns)))))
(defn- read-keyword
[^not-native reader initch opts pending-forms]
(let [ch (read-char reader)]
(if-not (whitespace? ch)
(let [token (read-token reader :keyword ch)
^not-native s (parse-symbol token)]
(if-not (nil? s)
(let [ns (-nth s 0)
name (-nth s 1)]
(if (identical? \: (.charAt token 0))
(if-not (nil? ns)
(if-let [ns (resolve-alias (symbol (subs ns 1)))]
(keyword (str ns) name)
(err/throw-invalid reader :keyword (str \: token)))
(if-let [ns *ns*]
(keyword (str ns) (subs name 1))
(err/reader-error reader "Invalid token: :" token)))
(keyword ns name)))
(err/throw-invalid reader :keyword (str \: token))))
(err/throw-single-colon reader))))
(defn- wrapping-reader
"Returns a function which wraps a reader in a call to sym"
[sym]
(fn [rdr _ opts pending-forms]
(list sym (read* rdr true nil opts pending-forms))))
(defn- read-meta
"Read metadata and return the following object with the metadata applied"
[rdr _ opts pending-forms]
(log-source rdr
(let [[line column] (starting-line-col-info rdr)
m (desugar-meta (read* rdr true nil opts pending-forms))]
(when-not (map? m)
(err/throw-bad-metadata rdr m))
(let [o (read* rdr true nil opts pending-forms)]
(if (implements? IMeta o)
(let [m (if (and line (seq? o))
(assoc m :line line :column column)
m)]
(if (implements? IWithMeta o)
(with-meta o (merge (meta o) m))
(reset-meta! o m)))
(err/throw-bad-metadata-target rdr o))))))
(defn- read-set
[rdr _ opts pending-forms]
(let [[start-line start-column] (starting-line-col-info rdr)
;; subtract 1 from start-column so it includes the # in the leading #{
start-column (if start-column (int (dec start-column)))
coll (read-delimited :set \} rdr opts pending-forms)
the-set (set coll)
[end-line end-column] (ending-line-col-info rdr)]
(when-not (= (count coll) (count the-set))
(err/reader-error rdr (err/throw-dup-keys rdr :set coll)))
(with-meta the-set
(when start-line
(merge
(when-let [file (get-file-name rdr)]
{:file file})
{:line start-line
:column start-column
:end-line end-line
:end-column end-column})))))
(defn- read-discard
"Read and discard the first object from rdr"
[rdr _ opts pending-forms]
(doto rdr
(read* true nil opts pending-forms)))
(defn- read-symbolic-value
[rdr _ opts pending-forms]
(let [sym (read* rdr true nil opts pending-forms)]
(case sym
NaN js/Number.NaN
-Inf js/Number.NEGATIVE_INFINITY
Inf js/Number.POSITIVE_INFINITY
(err/reader-error rdr (str "Invalid token: ##" sym)))))
(def ^:private RESERVED_FEATURES #{:else :none})
(defn- has-feature?
[rdr feature opts]
(if (keyword? feature)
(or (= :default feature) (contains? (get opts :features) feature))
(err/reader-error rdr "Feature should be a keyword: " feature)))
(defn- check-eof-error
[form rdr first-line]
(when (identical? form READ_EOF)
(err/throw-eof-error rdr (and (< first-line 0) first-line))))
(defn- check-reserved-features
[rdr form]
(when (get RESERVED_FEATURES form)
(err/reader-error rdr "Feature name " form " is reserved")))
(defn- check-invalid-read-cond
[form rdr first-line]
(when (identical? form READ_FINISHED)
(if (< first-line 0)
(err/reader-error rdr "read-cond requires an even number of forms")
(err/reader-error rdr "read-cond starting on line " first-line " requires an even number of forms"))))
(defn- read-suppress
"Read next form and suppress. Return nil or READ_FINISHED."
[first-line rdr opts pending-forms]
(binding [*suppress-read* true]
(let [form (read* rdr false READ_EOF \) opts pending-forms)]
(check-eof-error form rdr first-line)
(when (identical? form READ_FINISHED)
READ_FINISHED))))
(defonce ^:private NO_MATCH (js/Object.))
(defn- match-feature
"Read next feature. If matched, read next form and return.
Otherwise, read and skip next form, returning READ_FINISHED or nil."
[first-line rdr opts pending-forms]
(let [feature (read* rdr false READ_EOF \) opts pending-forms)]
(check-eof-error feature rdr first-line)
(if (= feature READ_FINISHED)
READ_FINISHED
(do
(check-reserved-features rdr feature)
(if (has-feature? rdr feature opts)
;; feature matched, read selected form
(doto (read* rdr false READ_EOF \) opts pending-forms)
(check-eof-error rdr first-line)
(check-invalid-read-cond rdr first-line))
;; feature not matched, ignore next form
(or (read-suppress first-line rdr opts pending-forms)
NO_MATCH))))))
(defn- read-cond-delimited
[rdr splicing opts pending-forms]
(let [first-line (if (indexing-reader? rdr) (get-line-number rdr) -1)
result (loop [matched NO_MATCH
finished nil]
(cond
;; still looking for match, read feature+form
(identical? matched NO_MATCH)
(let [match (match-feature first-line rdr opts pending-forms)]
(if (identical? match READ_FINISHED)
READ_FINISHED
(recur match nil)))
;; found match, just read and ignore the rest
(not (identical? finished READ_FINISHED))
(recur matched (read-suppress first-line rdr opts pending-forms))
:else
matched))]
(if (identical? result READ_FINISHED)
rdr
(if splicing
(do
(if (implements? ISequential result)
(do
(garray/insertArrayAt pending-forms (to-array result) 0)
rdr)
(err/reader-error rdr "Spliced form list in read-cond-splicing must implement ISequential")))
result))))
(defn- read-cond
[^not-native rdr _ opts pending-forms]
(when (not (and opts (#{:allow :preserve} (:read-cond opts))))
(throw (ex-info "Conditional read not allowed"
{:type :runtime-exception})))
(if-let [ch (read-char rdr)]
(let [splicing (= ch \@)
ch (if splicing (read-char rdr) ch)]
(when splicing
(when-not *read-delim*
(err/reader-error rdr "cond-splice not in list")))
(if-let [ch (if (whitespace? ch) (read-past whitespace? rdr) ch)]
(if (not= ch \()
(throw (ex-info "read-cond body must be a list"
{:type :runtime-exception}))
(binding [*suppress-read* (or *suppress-read* (= :preserve (:read-cond opts)))]
(if *suppress-read*
(reader-conditional (read-list rdr ch opts pending-forms) splicing)
(read-cond-delimited rdr splicing opts pending-forms))))
(err/throw-eof-in-character rdr)))
(err/throw-eof-in-character rdr)))
(def ^:private ^:dynamic arg-env nil)
(defn- garg
"Get a symbol for an anonymous ?argument?"
[n]
(symbol (str (if (== -1 n) "rest" (str "p" n))
"__" (next-id) "#")))
(defn- read-fn
[rdr _ opts pending-forms]
(if arg-env
(throw (ex-info "Nested #()s are not allowed" {:type :illegal-state})))
(binding [arg-env (sorted-map)]
(let [form (read* (doto rdr (unread \()) true nil opts pending-forms) ;; this sets bindings
rargs (rseq arg-env)
args (if rargs
(let [higharg (key (first rargs))]
(let [args (loop [i 1 args (transient [])]
(if (> i higharg)
(persistent! args)
(recur (inc i) (conj! args (or (get arg-env i)
(garg i))))))
args (if (arg-env -1)
(conj args '& (arg-env -1))
args)]
args))
[])]
(list 'fn* args form))))
(defn- register-arg
"Registers an argument to the arg-env"
[n]
(if arg-env
(if-let [ret (arg-env n)]
ret
(let [g (garg n)]
(set! arg-env (assoc arg-env n g))
g))
(throw (ex-info "Arg literal not in #()"
{:type :illegal-state})))) ;; should never hit this
(declare read-symbol)
(defn- read-arg
[^not-native rdr pct opts pending-forms]
(if (nil? arg-env)
(read-symbol rdr pct)
(let [ch (peek-char rdr)]
(cond
(or (whitespace? ch)
(macro-terminating? ch)
(nil? ch))
(register-arg 1)
(= ch \&)
(do (read-char rdr)
(register-arg -1))
:else
(let [n (read* rdr true nil opts pending-forms)]
(if-not (integer? n)
(throw (ex-info "Arg literal must be %, %& or %integer"
{:type :illegal-state}))
(register-arg n)))))))
(def ^:private ^:dynamic gensym-env nil)
(defn- read-unquote
[^not-native rdr comma opts pending-forms]
(if-let [ch (peek-char rdr)]
(if (= \@ ch)
((wrapping-reader 'clojure.core/unquote-splicing) (doto rdr read-char) \@ opts pending-forms)
((wrapping-reader 'clojure.core/unquote) rdr \~ opts pending-forms))))
(declare syntax-quote*)
(defn- unquote-splicing? [form]
(and (seq? form)
(= (first form) 'clojure.core/unquote-splicing)))
(defn- unquote? [form]
(and (seq? form)
(= (first form) 'clojure.core/unquote)))
(defn- expand-list
"Expand a list by resolving its syntax quotes and unquotes"
[s]
(loop [s (seq s) r (transient [])]
(if s
(let [item (first s)
ret (conj! r
(cond
(unquote? item) (list 'clojure.core/list (second item))
(unquote-splicing? item) (second item)
:else (list 'clojure.core/list (syntax-quote* item))))]
(recur (next s) ret))
(seq (persistent! r)))))
(defn- flatten-map
"Flatten a map into a seq of alternate keys and values"
[form]
(loop [s (seq form) key-vals (transient [])]
(if s
(let [e (first s)]
(recur (next s) (-> key-vals
(conj! (key e))
(conj! (val e)))))
(seq (persistent! key-vals)))))
(defn- register-gensym [sym]
(if-not gensym-env
(throw (ex-info "Gensym literal not in syntax-quote"
{:type :illegal-state})))
(or (get gensym-env sym)
(let [gs (symbol (str (subs (name sym)
0 (dec (count (name sym))))
"__" (next-id) "__auto__"))]
(set! gensym-env (assoc gensym-env sym gs))
gs)))
(defn- add-meta [form ret]
(if (and (implements? IWithMeta form)
(seq (dissoc (meta form) :line :column :end-line :end-column :file :source)))
(list 'cljs.core/with-meta ret (syntax-quote* (meta form)))
ret))
(defn- syntax-quote-coll [type coll]
(let [res (list 'cljs.core/sequence
(cons 'cljs.core/concat
(expand-list coll)))]
(if type
(list 'cljs.core/apply type res)
res)))
(defn map-func
"Decide which map type to use, array-map if less than 16 elements"
[coll]
(if (>= (count coll) 16)
'cljs.core/hash-map
'cljs.core/array-map))
(defn bool? [x]
(or (instance? js/Boolean x)
(true? x)
(false? x)))
(defn ^:dynamic resolve-symbol
"Resolve a symbol s into its fully qualified namespace version"
[s]
(throw (ex-info "resolve-symbol is not implemented" {:sym s})))
(defn- syntax-quote* [form]
(->>
(cond
(special-symbol? form) (list 'quote form)
(symbol? form)
(list 'quote
(if (and (not (namespace form))
(gstring/endsWith (name form) "#"))
(register-gensym form)
(let [sym (str form)]
(if (gstring/endsWith sym ".")
(let [csym (symbol (subs sym 0 (dec (count sym))))]
(symbol (str (resolve-symbol csym) ".")))
(resolve-symbol form)))))
(unquote? form) (second form)
(unquote-splicing? form) (throw (ex-info "unquote-splice not in list"
{:type :illegal-state}))
(coll? form)
(cond
(implements? IRecord form) form
(map? form) (syntax-quote-coll (map-func form) (flatten-map form))
(vector? form) (list 'cljs.core/vec (syntax-quote-coll nil form))
(set? form) (syntax-quote-coll 'cljs.core/hash-set form)
(or (seq? form) (list? form))
(let [seq (seq form)]
(if seq
(syntax-quote-coll nil seq)
'(cljs.core/list)))
:else (throw (ex-info "Unknown Collection type"
{:type :unsupported-operation})))
(or (keyword? form)
(number? form)
(string? form)
(nil? form)
(bool? form)
(instance? js/RegExp form))
form
:else (list 'quote form))
(add-meta form)))
(defn- read-syntax-quote
[rdr backquote opts pending-forms]
(binding [gensym-env {}]
(-> (read* rdr true nil opts pending-forms)
syntax-quote*)))
(defn- read-namespaced-map
[rdr _ opts pending-forms]
(let [token (read-token rdr :namespaced-map (read-char rdr))]
(if-let [ns (cond
(= token ":")
(ns-name *ns*)
(= \: (first token))
(some-> token (subs 1) parse-symbol second' symbol resolve-ns)
:else
(some-> token parse-symbol second'))]
(let [ch (read-past whitespace? rdr)]
(if (identical? ch \{)
(let [items (read-delimited :namespaced-map \} rdr opts pending-forms)]
(when (odd? (count items))
(err/throw-odd-map rdr nil nil items))
(let [keys (namespace-keys (str ns) (take-nth 2 items))
vals (take-nth 2 (rest items))]
(when-not (= (count (set keys)) (count keys))
(err/throw-dup-keys rdr :namespaced-map keys))
(zipmap keys vals)))
(err/throw-ns-map-no-map rdr token)))
(err/throw-bad-ns rdr token))))
(defn- macros [ch]
(case ch
\" read-string*
\: read-keyword
\; read-comment
\' (wrapping-reader 'quote)
\@ (wrapping-reader 'clojure.core/deref)
\^ read-meta
\` read-syntax-quote
\~ read-unquote
\( read-list
\) read-unmatched-delimiter
\[ read-vector
\] read-unmatched-delimiter
\{ read-map
\} read-unmatched-delimiter
\\ read-char*
\% read-arg
\# read-dispatch
nil))
(defn- dispatch-macros [ch]
(case ch
\^ read-meta ;; deprecated
\' (wrapping-reader 'var)
\( read-fn
\{ read-set
\< (throwing-reader "Unreadable form")
\= (throwing-reader "read-eval not supported")
\" read-regex
\! read-comment
\_ read-discard
\? read-cond
\: read-namespaced-map
\# read-symbolic-value
nil))
(defn- read-tagged [^not-native rdr initch opts pending-forms]
(let [tag (read* rdr true nil opts pending-forms)]
(if-not (symbol? tag)
(err/throw-bad-reader-tag rdr tag))
(if *suppress-read*
(tagged-literal tag (read* rdr true nil opts pending-forms))
(if-let [f (or (*data-readers* tag)
(default-data-readers tag))]
(f (read* rdr true nil opts pending-forms))
(if-let [f *default-data-reader-fn*]
(f tag (read* rdr true nil opts pending-forms))
(err/throw-unknown-reader-tag rdr tag))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Public API
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def ^:dynamic *data-readers*
"Map from reader tag symbols to data reader Vars.
Reader tags without namespace qualifiers are reserved for Clojure.
This light version of tools.reader has no implementation for default
reader tags such as #inst and #uuid."
{})
(def ^:dynamic *default-data-reader-fn*
"When no data reader is found for a tag and *default-data-reader-fn*
is non-nil, it will be called with two arguments, the tag and the value.
If *default-data-reader-fn* is nil (the default value), an exception
will be thrown for the unknown tag."
nil)
(def ^:dynamic *suppress-read* false)
(def default-data-readers
"Default map of data reader functions provided by Clojure.
May be overridden by binding *data-readers*"
{})
(defn- read*-internal
[^not-native reader ^boolean eof-error? sentinel return-on opts pending-forms]
(loop []
(log-source reader
(if-not ^boolean (garray/isEmpty pending-forms)
(let [form (aget pending-forms 0)]
(garray/removeAt pending-forms 0)
form)
(let [ch (read-char reader)]
(cond
(whitespace? ch) (recur)
(nil? ch) (if eof-error? (err/throw-eof-error reader nil) sentinel)
(identical? ch return-on) READ_FINISHED
(number-literal? reader ch) (read-number reader ch)
:else (let [f (macros ch)]
(if-not (nil? f)
(let [res (f reader ch opts pending-forms)]
(if (identical? res reader)
(recur)
res))
(read-symbol reader ch)))))))))
(defn- read*
([reader eof-error? sentinel opts pending-forms]
(read* reader eof-error? sentinel nil opts pending-forms))
([^not-native reader eof-error? sentinel return-on opts pending-forms]
(try
(read*-internal reader eof-error? sentinel return-on opts pending-forms)
(catch js/Error e
(if (ex-info? e)
(let [d (ex-data e)]
(if (= :reader-exception (:type d))
(throw e)
(throw (ex-info (.-message e)
(merge {:type :reader-exception}
d
(if (indexing-reader? reader)
{:line (get-line-number reader)
:column (get-column-number reader)
:file (get-file-name reader)}))
e))))
(throw (ex-info (.-message e)
(merge {:type :reader-exception}
(if (indexing-reader? reader)
{:line (get-line-number reader)
:column (get-column-number reader)
:file (get-file-name reader)}))
e)))))))
(defn read
"Reads the first object from an IPushbackReader.
Returns the object read. If EOF, throws if eof-error? is true.
Otherwise returns sentinel. If no stream is providen, *in* will be used.
Opts is a persistent map with valid keys:
:read-cond - :allow to process reader conditionals, or
:preserve to keep all branches
:features - persistent set of feature keywords for reader conditionals
:eof - on eof, return value unless :eofthrow, then throw.
if not specified, will throw
To read data structures only, use clojure.tools.reader.edn/read
Note that the function signature of clojure.tools.reader/read and
clojure.tools.reader.edn/read is not the same for eof-handling"
{:arglists '([] [reader] [opts reader] [reader eof-error? eof-value])}
([reader] (read reader true nil))
([{eof :eof :as opts :or {eof :eofthrow}} reader] (read* reader (= eof :eofthrow) eof nil opts (to-array [])))
([reader eof-error? sentinel] (read* reader eof-error? sentinel nil {} (to-array []))))
(defn read-string
"Reads one object from the string s.
Returns nil when s is nil or empty.
To read data structures only, use clojure.tools.reader.edn/read-string
Note that the function signature of clojure.tools.reader/read-string and
clojure.tools.reader.edn/read-string is not the same for eof-handling"
([s]
(read-string {} s))
([opts s]
(when (and s (not (identical? s "")))
(read opts (string-push-back-reader s)))))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {parseInt {}, isNaN {}, Error {}, String {fromCharCode {}}, Object {}, Number {NaN {}, NEGATIVE_INFINITY {}, POSITIVE_INFINITY {}}, Boolean {}, RegExp {}}, :use-macros {log-source cljs.tools.reader.reader-types}, :excludes #{char *suppress-read* *default-data-reader-fn* read default-data-readers *data-readers* read-line read-string}, :name cljs.tools.reader, :imports {StringBuffer goog.string.StringBuffer}, :requires {cljs.tools.reader.impl.commons cljs.tools.reader.impl.commons, gstring goog.string, goog.string goog.string, cljs.tools.reader.impl.errors cljs.tools.reader.impl.errors, garray goog.array, cljs.tools.reader.reader-types cljs.tools.reader.reader-types, err cljs.tools.reader.impl.errors, StringBuffer goog.string.StringBuffer, cljs.tools.reader.impl.utils cljs.tools.reader.impl.utils, goog.array goog.array}, :cljs.spec/speced-vars [], :uses {match-number cljs.tools.reader.impl.commons, reader-conditional cljs.tools.reader.impl.utils, whitespace? cljs.tools.reader.impl.utils, read-comment cljs.tools.reader.impl.commons, char cljs.tools.reader.impl.utils, numeric? cljs.tools.reader.impl.utils, ReaderConditional cljs.tools.reader.impl.utils, unread cljs.tools.reader.reader-types, peek-char cljs.tools.reader.reader-types, parse-symbol cljs.tools.reader.impl.commons, second' cljs.tools.reader.impl.utils, desugar-meta cljs.tools.reader.impl.utils, next-id cljs.tools.reader.impl.utils, number-literal? cljs.tools.reader.impl.commons, read-past cljs.tools.reader.impl.commons, indexing-reader? cljs.tools.reader.reader-types, read-char cljs.tools.reader.reader-types, get-column-number cljs.tools.reader.reader-types, ex-info? cljs.tools.reader.impl.utils, get-file-name cljs.tools.reader.reader-types, reader-conditional? cljs.tools.reader.impl.utils, throwing-reader cljs.tools.reader.impl.commons, string-push-back-reader cljs.tools.reader.reader-types, namespace-keys cljs.tools.reader.impl.utils, get-line-number cljs.tools.reader.reader-types}, :defs {NO_MATCH {:name cljs.tools.reader/NO_MATCH, :file "target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :line 484, :column 1, :end-line 484, :end-column 28, :private true, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :line 484, :column 20, :end-line 484, :end-column 28, :private true}, :tag object}, READ_EOF {:name cljs.tools.reader/READ_EOF, :file "target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :line 197, :column 1, :end-line 197, :end-column 28, :private true, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :line 197, :column 20, :end-line 197, :end-column 28, :private true}, :tag object}, unquote-splicing? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :line 633, :column 8, :end-line 633, :end-column 25, :private true, :arglists (quote ([form]))}, :private true, :name cljs.tools.reader/unquote-splicing?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :end-column 25, :method-params ([form]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 633, :end-line 633, :max-fixed-arity 1, :fn-var true, :arglists (quote ([form]))}, read-symbolic-value {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :line 439, :column 8, :end-line 439, :end-column 27, :private true, :arglists (quote ([rdr _ opts pending-forms]))}, :private true, :name cljs.tools.reader/read-symbolic-value, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :end-column 27, :method-params ([rdr _ opts pending-forms]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 439, :end-line 439, :max-fixed-arity 4, :fn-var true, :arglists (quote ([rdr _ opts pending-forms]))}, read-tagged {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :line 824, :column 8, :end-line 824, :end-column 19, :private true, :arglists (quote ([rdr initch opts pending-forms]))}, :private true, :name cljs.tools.reader/read-tagged, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :end-column 19, :method-params ([rdr initch opts pending-forms]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 824, :end-line 824, :max-fixed-arity 4, :fn-var true, :arglists (quote ([rdr initch opts pending-forms]))}, starting-line-col-info {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :line 189, :column 8, :end-line 189, :end-column 30, :private true, :arglists (quote ([rdr]))}, :private true, :name cljs.tools.reader/starting-line-col-info, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader.cljs", :end-column 30, :method-params ([rdr]), :pLine truncated
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/tools\/reader.js","sources":["reader.cljs?rel=1517021946754"],"lineCount":1759,"mappings":";AAQA;;;;;;;;;AAyBA,AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,AAOA,6CAAA,7CAAgBA,kGAAoBC;AAApC,AACE,IAAAC,WAAMD;AAAN,AAAA,QAAAC;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;AAAA;;;;AAAA;;;;AAIF,AAAKC,uBAAG,KAAAC;AAER;;;+BAAA,\/BAAOC,sEAEQC,IAAIC,KAAKC;AAFxB,AAGE,GAAI,WAAA,VAAMA;AACR,OAACC,2DAAuBH,IAAIC;;AAC5B,AACE,AAAQJ;;AACR,IAAOF,KAAGO;;AAAV,AACE,GAAI,CAAI,AAACE,yDAAYT,SACb,AAACD,qDAAmBC,SACpB,OAAA,NAAMA;AACZ,AACE,GAAU,OAAA,NAAMA;AAAhB;AAAA,AACE,AAACU,gDAAOL,IAAIL;;;AACd,OAAWE;;AACb,AACE,AAASA,4BAAGF;;AACZ,eAAO,AAACW,mDAAUN;;;;;;;;AAE9B,AAAA,AAEA,kCAAA,lCAAOO,4EACQP,IAAIQ,EAAEC,KAAKC;AAD1B,AAEE,IAAAC,qBAAY,AAACL,mDAAUN;AAAvB,AAAA,oBAAAW;AAAA,SAAAA,LAAShB;AAAT,AACE,IAAAgB,yBAAY,AAACE,4CAAgBlB;AAA7B,AAAA,oBAAAgB;AAAA,SAAAA,LAASC;AAAT,AACE,OAACA,aAAGZ,IAAIL,GAAGc,KAAKC;;AAChB,OAACI,wCAAY,iBAAAC,WAAMf;AAAN,AAAU,gDAAAe,hDAACV,yDAAOV;;AAAlBoB;KAAuBpB,GAAGc,KAAKC;;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jE;;AAC5BuC;;;;AA5BT,AA8BO,OAAC2B,oEAAgClE,IAAIgC;;;;;;;;;;;;AAC9C,OAACmC,+DAA2BnE;;;AAElC,2CAAA,3CAAOoE,8FAAoCpE;AAA3C,AACE,oBAAM,AAACqE,gEAAiBrE;AAAxB,AAAA,0FACG,AAACsE,yDAAgBtE,KAAK,2EAAA,1EAAK,mEAAA,lEAAK,AAACuE,2DAAkBvE;;AADtD;;;AAGF,yCAAA,zCAAOwE,0FAAkCxE;AAAzC,AACE,oBAAM,AAACqE,gEAAiBrE;AAAxB,AAAA,0FACG,AAACsE,yDAAgBtE,KAAK,AAACuE,2DAAkBvE;;AAD5C;;;AAGF,GAAA,OAAmByE;AAAnB;AAAA,AAAA,AAAmBA,6BAAS,KAAAC;;AAC5B,GAAA,OAAmBC;AAAnB;AAAA,AAAA,AAAmBA,kCAAc,KAAAD;;AAEjC,2CAAA,3CAAeE;AAEf,4CAAA,5CAAOC,gGAAyB5E,KAAK6E,MAAM9E,IAAIS,KAAKC;AAApD,AACE,IAAAqE,aAAgC,AAACX,mDAAuBpE;iBAAxD,AAAA0C,wBAAAqC,WAAA,IAAA,pDAAOC;mBAAP,AAAAtC,wBAAAqC,WAAA,IAAA,tDAAkBE;IACZH,YAAM,AAACI,6CAAKJ;AADlB,AAEE,IAAOK,IAAE,+BAAA,\/BAACC;;AAAV,AACE,IAAMC,OAAK,Line truncated
+448
View File
@@ -0,0 +1,448 @@
;; Copyright (c) Nicola Mometto, Rich Hickey & contributors.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns ^{:doc "An EDN reader in clojure"
:author "Bronsa"}
cljs.tools.reader.edn
(:refer-clojure :exclude [read read-string char default-data-readers])
(:require [cljs.tools.reader.impl.errors :as err]
[cljs.tools.reader.reader-types :refer
[read-char unread peek-char indexing-reader?
get-line-number get-column-number get-file-name string-push-back-reader]]
[cljs.tools.reader.impl.utils :refer
[char ex-info? whitespace? numeric? desugar-meta namespace-keys second']]
[cljs.tools.reader.impl.commons :refer
[number-literal? read-past match-number parse-symbol read-comment throwing-reader]]
[cljs.tools.reader :refer [default-data-readers char-code]]
[goog.string :as gstring])
(:import goog.string.StringBuffer))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; helpers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare read macros dispatch-macros)
(defn- ^boolean macro-terminating? [ch]
(and (not (identical? \# ch))
(not (identical? \' ch))
(not (identical? \: ch))
(macros ch)))
(defn- ^boolean not-constituent? [ch]
(or (identical? \@ ch)
(identical? \` ch)
(identical? \~ ch)))
(defn- read-token
([rdr kind initch]
(read-token rdr kind initch true))
([rdr kind initch validate-leading?]
(cond
(not initch)
(err/throw-eof-at-start rdr kind)
(and validate-leading?
(not-constituent? initch))
(err/throw-bad-char rdr kind initch)
:else
(loop [sb (StringBuffer.)
ch (do (unread rdr initch) initch)]
(if (or (whitespace? ch)
(macro-terminating? ch)
(nil? ch))
(str sb)
(if (not-constituent? ch)
(err/throw-bad-char rdr kind ch)
(recur (doto sb (.append (read-char rdr))) (peek-char rdr))))))))
(declare read-tagged)
(defn- read-dispatch
[rdr _ opts]
(if-let [ch (read-char rdr)]
(if-let [dm (dispatch-macros ch)]
(dm rdr ch opts)
(if-let [obj (read-tagged (doto rdr (unread ch)) ch opts)]
obj
(err/throw-no-dispatch rdr ch)))
(err/throw-eof-at-dispatch rdr)))
(defn- read-unmatched-delimiter
[rdr ch opts]
(err/throw-unmatch-delimiter rdr ch))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; readers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- read-unicode-char
([token offset length base]
(let [l (+ offset length)]
(when-not (== (count token) l)
(err/throw-invalid-unicode-literal nil token))
(loop [i offset uc 0]
(if (== i l)
(js/String.fromCharCode uc)
(let [d (char-code (nth token i) base)]
(if (== d -1)
(err/throw-invalid-unicode-digit-in-token nil (nth token i) token)
(recur (inc i) (+ d (* uc base)))))))))
([rdr initch base length exact?]
(loop [i 1 uc (char-code initch base)]
(if (== uc -1)
(err/throw-invalid-unicode-digit rdr initch)
(if-not (== i length)
(let [ch (peek-char rdr)]
(if (or (whitespace? ch)
(macros ch)
(nil? ch))
(if exact?
(err/throw-invalid-unicode-len rdr i length)
(js/String.fromCharCode uc))
(let [d (char-code ch base)]
(read-char rdr)
(if (== d -1)
(err/throw-invalid-unicode-digit rdr ch)
(recur (inc i) (+ d (* uc base)))))))
(js/String.fromCharCode uc))))))
(def ^:private ^:const upper-limit (int \uD7ff))
(def ^:private ^:const lower-limit (int \uE000))
(defn- read-char*
[rdr backslash opts]
(let [ch (read-char rdr)]
(if-not (nil? ch)
(let [token (if (or (macro-terminating? ch)
(not-constituent? ch)
(whitespace? ch))
(str ch)
(read-token rdr :character ch false))
token-len (count token)]
(cond
(== 1 token-len) (nth token 0)
(identical? token "newline") \newline
(identical? token "space") \space
(identical? token "tab") \tab
(identical? token "backspace") \backspace
(identical? token "formfeed") \formfeed
(identical? token "return") \return
(gstring/startsWith token "u")
(let [c (read-unicode-char token 1 4 16)
ic (.charCodeAt c)]
(if (and (> ic upper-limit)
(< ic lower-limit))
(err/throw-invalid-character-literal rdr c)
c))
(gstring/startsWith token "o")
(let [len (dec token-len)]
(if (> len 3)
(err/throw-invalid-octal-len rdr token)
(let [uc (read-unicode-char token 1 len 8)]
(if (> (int uc) 0377)
(err/throw-bad-octal-number rdr)
uc))))
:else (err/throw-unsupported-character rdr token)))
(err/throw-eof-in-character rdr))))
(defn ^:private starting-line-col-info [rdr]
(when (indexing-reader? rdr)
[(get-line-number rdr) (int (dec (int (get-column-number rdr))))]))
(defn- read-delimited
[kind delim rdr opts]
(let [[start-line start-column] (starting-line-col-info rdr)
delim (char delim)]
(loop [a (transient [])]
(let [ch (read-past whitespace? rdr)]
(when-not ch
(err/throw-eof-delimited rdr kind start-line start-column (count a)))
(if (= delim (char ch))
(persistent! a)
(if-let [macrofn (macros ch)]
(let [mret (macrofn rdr ch opts)]
(recur (if-not (identical? mret rdr) (conj! a mret) a)))
(let [o (read (doto rdr (unread ch)) true nil opts)]
(recur (if-not (identical? o rdr) (conj! a o) a)))))))))
(defn- read-list
[rdr _ opts]
(let [the-list (read-delimited :list \) rdr opts)]
(if (empty? the-list)
'()
(apply list the-list))))
(defn- read-vector
[rdr _ opts]
(read-delimited :vector \] rdr opts))
(defn- read-map
[rdr _ opts]
(let [[start-line start-column] (starting-line-col-info rdr)
the-map (read-delimited :map \} rdr opts)
map-count (count the-map)
ks (take-nth 2 the-map)
key-set (set ks)]
(when (odd? map-count)
(err/throw-odd-map rdr start-line start-column the-map))
(when-not (= (count key-set) (count ks))
(err/throw-dup-keys rdr :map ks))
(if (<= map-count (* 2 (.-HASHMAP-THRESHOLD cljs.core/PersistentArrayMap)))
(.fromArray cljs.core/PersistentArrayMap (to-array the-map) true true)
(.fromArray cljs.core/PersistentHashMap (to-array the-map) true))))
(defn- read-number
[rdr initch opts]
(loop [sb (doto (StringBuffer.) (.append initch))
ch (read-char rdr)]
(if (or (whitespace? ch) (macros ch) (nil? ch))
(let [s (str sb)]
(unread rdr ch)
(or (match-number s)
(err/throw-invalid-number rdr s)))
(recur (doto sb (.append ch)) (read-char rdr)))))
(defn- escape-char [sb rdr]
(let [ch (read-char rdr)]
(case ch
\t "\t"
\r "\r"
\n "\n"
\\ "\\"
\" "\""
\b "\b"
\f "\f"
\u (let [ch (read-char rdr)]
(if (== -1 (js/parseInt (int ch) 16))
(err/throw-invalid-unicode-escape rdr ch)
(read-unicode-char rdr ch 16 4 true)))
(if (numeric? ch)
(let [ch (read-unicode-char rdr ch 8 3 false)]
(if (> (int ch) 0337)
(err/throw-bad-octal-number rdr)
ch))
(err/throw-bad-escape-char rdr ch)))))
(defn- read-string*
[rdr _ opts]
(loop [sb (StringBuffer.)
ch (read-char rdr)]
(case ch
nil (err/throw-eof-reading rdr :string \" sb)
\\ (recur (doto sb (.append (escape-char sb rdr)))
(read-char rdr))
\" (str sb)
(recur (doto sb (.append ch)) (read-char rdr)))))
(defn- read-symbol
[rdr initch]
(when-let [token (read-token rdr :symbol initch)]
(case token
;; special symbols
"nil" nil
"true" true
"false" false
"/" '/
(or (when-let [p (parse-symbol token)]
(symbol (p 0) (p 1)))
(err/throw-invalid rdr :symbol token)))))
(defn- read-keyword
[reader initch opts]
(let [ch (read-char reader)]
(if-not (whitespace? ch)
(let [token (read-token reader :keyword ch)
s (parse-symbol token)]
(if (and s (== -1 (.indexOf token "::")))
(let [ns (s 0)
name (s 1)]
(if (identical? \: (nth token 0))
(err/throw-invalid reader :keyword token) ;; no ::keyword in edn
(keyword ns name)))
(err/throw-invalid reader :keyword token)))
(err/throw-single-colon reader))))
(defn- wrapping-reader
[sym]
(fn [rdr _ opts]
(list sym (read rdr true nil opts))))
(defn- read-meta
[rdr _ opts]
(let [m (desugar-meta (read rdr true nil opts))]
(when-not (map? m)
(err/throw-bad-metadata rdr m))
(let [o (read rdr true nil opts)]
(if (implements? IMeta o)
(with-meta o (merge (meta o) m))
(err/throw-bad-metadata-target rdr o)))))
(defn- read-set
[rdr _ opts]
(let [coll (read-delimited :set \} rdr opts)
the-set (set coll)]
(when-not (= (count coll) (count the-set))
(err/throw-dup-keys rdr :set coll))
the-set))
(defn- read-discard
[rdr _ opts]
(doto rdr
(read true nil true)))
(defn- read-namespaced-map
[rdr _ opts]
(let [token (read-token rdr :namespaced-map (read-char rdr))]
(if-let [ns (some-> token parse-symbol second')]
(let [ch (read-past whitespace? rdr)]
(if (identical? ch \{)
(let [items (read-delimited :namespaced-map \} rdr opts)]
(when (odd? (count items))
(err/throw-odd-map rdr nil nil items))
(let [keys (namespace-keys (str ns) (take-nth 2 items))
vals (take-nth 2 (rest items))]
(when-not (= (count (set keys)) (count keys))
(err/throw-dup-keys rdr :namespaced-map keys))
(zipmap keys vals)))
(err/throw-ns-map-no-map rdr token)))
(err/throw-bad-ns rdr token))))
(defn- read-symbolic-value
[rdr _ opts]
(let [sym (read rdr true nil opts)]
(case sym
NaN js/Number.NaN
-Inf js/Number.NEGATIVE_INFINITY
Inf js/Number.POSITIVE_INFINITY
(err/reader-error rdr (str "Invalid token: ##" sym)))))
(defn- macros [ch]
(case ch
\" read-string*
\: read-keyword
\; read-comment
\^ read-meta
\( read-list
\) read-unmatched-delimiter
\[ read-vector
\] read-unmatched-delimiter
\{ read-map
\} read-unmatched-delimiter
\\ read-char*
\# read-dispatch
nil))
(defn- dispatch-macros [ch]
(case ch
\^ read-meta ;deprecated
\{ read-set
\< (throwing-reader "Unreadable form")
\! read-comment
\_ read-discard
\: read-namespaced-map
\# read-symbolic-value
nil))
(defn- read-tagged [rdr initch opts]
(let [tag (read rdr true nil opts)
object (read rdr true nil opts)]
(if-not (symbol? tag)
(err/throw-bad-reader-tag rdr "Reader tag must be a symbol"))
(if-let [f (or (get (:readers opts) tag)
(default-data-readers tag))]
(f object)
(if-let [d (:default opts)]
(d tag object)
(err/throw-unknown-reader-tag rdr tag)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Public API
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn read
"Reads the first object from an IPushbackReader.
Returns the object read. If EOF, throws if eof-error? is true otherwise returns eof.
If no reader is provided, *in* will be used.
Reads data in the edn format (subset of Clojure data):
http://edn-format.org
clojure.tools.reader.edn/read doesn't depend on dynamic Vars, all configuration
is done by passing an opt map.
opts is a map that can include the following keys:
:eof - value to return on end-of-file. When not supplied, eof throws an exception.
:readers - a map of tag symbols to data-reader functions to be considered before default-data-readers.
When not supplied, only the default-data-readers will be used.
:default - A function of two args, that will, if present and no reader is found for a tag,
be called with the tag and the value."
([reader] (read {} reader))
([{:keys [eof] :as opts} reader]
(let [eof-error? (not (contains? opts :eof))]
(read reader eof-error? eof opts)))
([reader eof-error? eof opts]
(try
(loop []
(let [ch (read-char reader)]
(cond
(whitespace? ch) (recur)
(nil? ch) (if eof-error? (err/throw-eof-error reader nil) eof)
(number-literal? reader ch) (read-number reader ch opts)
:else (let [f (macros ch)]
(if f
(let [res (f reader ch opts)]
(if (identical? res reader)
(recur)
res))
(read-symbol reader ch))))))
(catch js/Error e
(if (ex-info? e)
(let [d (ex-data e)]
(if (= :reader-exception (:type d))
(throw e)
(throw (ex-info (.-message e)
(merge {:type :reader-exception}
d
(if (indexing-reader? reader)
{:line (get-line-number reader)
:column (get-column-number reader)
:file (get-file-name reader)}))
e))))
(throw (ex-info (.-message e)
(merge {:type :reader-exception}
(if (indexing-reader? reader)
{:line (get-line-number reader)
:column (get-column-number reader)
:file (get-file-name reader)}))
e)))))))
(defn read-string
"Reads one object from the string s.
Returns nil when s is nil or empty.
Reads data in the edn format (subset of Clojure data):
http://edn-format.org
opts is a map as per clojure.tools.reader.edn/read"
([s] (read-string {:eof nil} s))
([opts s]
(when (and s (not= s ""))
(read opts (string-push-back-reader s)))))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}, String {fromCharCode {}}, parseInt {}, Number {NaN {}, NEGATIVE_INFINITY {}, POSITIVE_INFINITY {}}}, :use-macros {}, :excludes #{char read default-data-readers read-string}, :name cljs.tools.reader.edn, :imports {StringBuffer goog.string.StringBuffer}, :requires {err cljs.tools.reader.impl.errors, cljs.tools.reader.impl.errors cljs.tools.reader.impl.errors, cljs.tools.reader.reader-types cljs.tools.reader.reader-types, cljs.tools.reader.impl.utils cljs.tools.reader.impl.utils, cljs.tools.reader.impl.commons cljs.tools.reader.impl.commons, cljs.tools.reader cljs.tools.reader, gstring goog.string, goog.string goog.string, StringBuffer goog.string.StringBuffer}, :cljs.spec/speced-vars [], :uses {match-number cljs.tools.reader.impl.commons, whitespace? cljs.tools.reader.impl.utils, read-comment cljs.tools.reader.impl.commons, char-code cljs.tools.reader, char cljs.tools.reader.impl.utils, numeric? cljs.tools.reader.impl.utils, unread cljs.tools.reader.reader-types, peek-char cljs.tools.reader.reader-types, parse-symbol cljs.tools.reader.impl.commons, second' cljs.tools.reader.impl.utils, desugar-meta cljs.tools.reader.impl.utils, default-data-readers cljs.tools.reader, number-literal? cljs.tools.reader.impl.commons, read-past cljs.tools.reader.impl.commons, indexing-reader? cljs.tools.reader.reader-types, read-char cljs.tools.reader.reader-types, get-column-number cljs.tools.reader.reader-types, ex-info? cljs.tools.reader.impl.utils, get-file-name cljs.tools.reader.reader-types, throwing-reader cljs.tools.reader.impl.commons, string-push-back-reader cljs.tools.reader.reader-types, namespace-keys cljs.tools.reader.impl.utils, get-line-number cljs.tools.reader.reader-types}, :defs {read-symbolic-value {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :line 326, :column 8, :end-line 326, :end-column 27, :private true, :arglists (quote ([rdr _ opts]))}, :private true, :name cljs.tools.reader.edn/read-symbolic-value, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :end-column 27, :method-params ([rdr _ opts]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 326, :end-line 326, :max-fixed-arity 3, :fn-var true, :arglists (quote ([rdr _ opts]))}, read-tagged {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :line 364, :column 8, :end-line 364, :end-column 19, :private true, :arglists (quote ([rdr initch opts]))}, :private true, :name cljs.tools.reader.edn/read-tagged, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :end-column 19, :method-params ([rdr initch opts]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 364, :end-line 364, :max-fixed-arity 3, :fn-var true, :arglists (quote ([rdr initch opts]))}, starting-line-col-info {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :line 161, :column 17, :end-line 161, :end-column 39, :private true, :arglists (quote ([rdr]))}, :private true, :name cljs.tools.reader.edn/starting-line-col-info, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :end-column 39, :method-params ([rdr]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 161, :end-line 161, :max-fixed-arity 1, :fn-var true, :arglists (quote ([rdr]))}, wrapping-reader {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :line 281, :column 8, :end-line 281, :end-column 23, :private true, :arglists (quote ([sym]))}, :private true, :name cljs.tools.reader.edn/wrapping-reader, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :end-column 23, :method-params ([sym]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 281, :end-line 281, :max-fixed-arity 1, :fn-var true, :arglists (quote ([sym]))}, read-meta {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :line 286, :column 8, :end-line 286, :end-column 17, :private true, :arglists (quote ([rdr _ opts]))}, :private true, :name cljs.tools.reader.edn/read-meta, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :end-column 17, :method-params ([rdr _ opts]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 286, :end-line 286, :max-fixed-arity 3, :fn-var true, :arglists (quote ([rdr _ opts]))}, read-unicode-char {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/edn.cljs", :line 85, :column 8, :end-line 85, :end-column 25, :private true, :arglists (quote ([token offset length base] [rdr initch base length exact?])), :top-fn {:variadiLine truncated
+936
View File
@@ -0,0 +1,936 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.tools.reader.edn');
goog.require('cljs.core');
goog.require('cljs.tools.reader.impl.errors');
goog.require('cljs.tools.reader.reader_types');
goog.require('cljs.tools.reader.impl.utils');
goog.require('cljs.tools.reader.impl.commons');
goog.require('cljs.tools.reader');
goog.require('goog.string');
goog.require('goog.string.StringBuffer');
cljs.tools.reader.edn.macro_terminating_QMARK_ = (function cljs$tools$reader$edn$macro_terminating_QMARK_(ch){
var and__35486__auto__ = !(("#" === ch));
if(and__35486__auto__){
var and__35486__auto____$1 = !(("'" === ch));
if(and__35486__auto____$1){
var and__35486__auto____$2 = !((":" === ch));
if(and__35486__auto____$2){
return cljs.tools.reader.edn.macros.call(null,ch);
} else {
return and__35486__auto____$2;
}
} else {
return and__35486__auto____$1;
}
} else {
return and__35486__auto__;
}
});
cljs.tools.reader.edn.not_constituent_QMARK_ = (function cljs$tools$reader$edn$not_constituent_QMARK_(ch){
return (("@" === ch)) || (("`" === ch)) || (("~" === ch));
});
cljs.tools.reader.edn.read_token = (function cljs$tools$reader$edn$read_token(var_args){
var G__44424 = arguments.length;
switch (G__44424) {
case 3:
return cljs.tools.reader.edn.read_token.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
break;
case 4:
return cljs.tools.reader.edn.read_token.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.edn.read_token.cljs$core$IFn$_invoke$arity$3 = (function (rdr,kind,initch){
return cljs.tools.reader.edn.read_token.call(null,rdr,kind,initch,true);
});
cljs.tools.reader.edn.read_token.cljs$core$IFn$_invoke$arity$4 = (function (rdr,kind,initch,validate_leading_QMARK_){
if(cljs.core.not.call(null,initch)){
return cljs.tools.reader.impl.errors.throw_eof_at_start.call(null,rdr,kind);
} else {
if(cljs.core.truth_((function (){var and__35486__auto__ = validate_leading_QMARK_;
if(cljs.core.truth_(and__35486__auto__)){
return cljs.tools.reader.edn.not_constituent_QMARK_.call(null,initch);
} else {
return and__35486__auto__;
}
})())){
return cljs.tools.reader.impl.errors.throw_bad_char.call(null,rdr,kind,initch);
} else {
var sb = (new goog.string.StringBuffer());
var ch = (function (){
cljs.tools.reader.reader_types.unread.call(null,rdr,initch);
return initch;
})()
;
while(true){
if((cljs.tools.reader.impl.utils.whitespace_QMARK_.call(null,ch)) || (cljs.tools.reader.edn.macro_terminating_QMARK_.call(null,ch)) || ((ch == null))){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(sb)].join('');
} else {
if(cljs.tools.reader.edn.not_constituent_QMARK_.call(null,ch)){
return cljs.tools.reader.impl.errors.throw_bad_char.call(null,rdr,kind,ch);
} else {
var G__44427 = (function (){var G__44425 = sb;
G__44425.append(cljs.tools.reader.reader_types.read_char.call(null,rdr));
return G__44425;
})();
var G__44428 = cljs.tools.reader.reader_types.peek_char.call(null,rdr);
sb = G__44427;
ch = G__44428;
continue;
}
}
break;
}
}
}
});
cljs.tools.reader.edn.read_token.cljs$lang$maxFixedArity = 4;
cljs.tools.reader.edn.read_dispatch = (function cljs$tools$reader$edn$read_dispatch(rdr,_,opts){
var temp__5455__auto__ = cljs.tools.reader.reader_types.read_char.call(null,rdr);
if(cljs.core.truth_(temp__5455__auto__)){
var ch = temp__5455__auto__;
var temp__5455__auto____$1 = cljs.tools.reader.edn.dispatch_macros.call(null,ch);
if(cljs.core.truth_(temp__5455__auto____$1)){
var dm = temp__5455__auto____$1;
return dm.call(null,rdr,ch,opts);
} else {
var temp__5455__auto____$2 = cljs.tools.reader.edn.read_tagged.call(null,(function (){var G__44429 = rdr;
cljs.tools.reader.reader_types.unread.call(null,G__44429,ch);
return G__44429;
})(),ch,opts);
if(cljs.core.truth_(temp__5455__auto____$2)){
var obj = temp__5455__auto____$2;
return obj;
} else {
return cljs.tools.reader.impl.errors.throw_no_dispatch.call(null,rdr,ch);
}
}
} else {
return cljs.tools.reader.impl.errors.throw_eof_at_dispatch.call(null,rdr);
}
});
cljs.tools.reader.edn.read_unmatched_delimiter = (function cljs$tools$reader$edn$read_unmatched_delimiter(rdr,ch,opts){
return cljs.tools.reader.impl.errors.throw_unmatch_delimiter.call(null,rdr,ch);
});
cljs.tools.reader.edn.read_unicode_char = (function cljs$tools$reader$edn$read_unicode_char(var_args){
var G__44431 = arguments.length;
switch (G__44431) {
case 4:
return cljs.tools.reader.edn.read_unicode_char.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
case 5:
return cljs.tools.reader.edn.read_unicode_char.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.edn.read_unicode_char.cljs$core$IFn$_invoke$arity$4 = (function (token,offset,length,base){
var l = (offset + length);
if((cljs.core.count.call(null,token) === l)){
} else {
cljs.tools.reader.impl.errors.throw_invalid_unicode_literal.call(null,null,token);
}
var i = offset;
var uc = (0);
while(true){
if((i === l)){
return String.fromCharCode(uc);
} else {
var d = cljs.tools.reader.char_code.call(null,cljs.core.nth.call(null,token,i),base);
if((d === (-1))){
return cljs.tools.reader.impl.errors.throw_invalid_unicode_digit_in_token.call(null,null,cljs.core.nth.call(null,token,i),token);
} else {
var G__44433 = (i + (1));
var G__44434 = (d + (uc * base));
i = G__44433;
uc = G__44434;
continue;
}
}
break;
}
});
cljs.tools.reader.edn.read_unicode_char.cljs$core$IFn$_invoke$arity$5 = (function (rdr,initch,base,length,exact_QMARK_){
var i = (1);
var uc = cljs.tools.reader.char_code.call(null,initch,base);
while(true){
if((uc === (-1))){
return cljs.tools.reader.impl.errors.throw_invalid_unicode_digit.call(null,rdr,initch);
} else {
if(!((i === length))){
var ch = cljs.tools.reader.reader_types.peek_char.call(null,rdr);
if(cljs.core.truth_((function (){var or__35498__auto__ = cljs.tools.reader.impl.utils.whitespace_QMARK_.call(null,ch);
if(or__35498__auto__){
return or__35498__auto__;
} else {
var or__35498__auto____$1 = cljs.tools.reader.edn.macros.call(null,ch);
if(cljs.core.truth_(or__35498__auto____$1)){
return or__35498__auto____$1;
} else {
return (ch == null);
}
}
})())){
if(cljs.core.truth_(exact_QMARK_)){
return cljs.tools.reader.impl.errors.throw_invalid_unicode_len.call(null,rdr,i,length);
} else {
return String.fromCharCode(uc);
}
} else {
var d = cljs.tools.reader.char_code.call(null,ch,base);
cljs.tools.reader.reader_types.read_char.call(null,rdr);
if((d === (-1))){
return cljs.tools.reader.impl.errors.throw_invalid_unicode_digit.call(null,rdr,ch);
} else {
var G__44435 = (i + (1));
var G__44436 = (d + (uc * base));
i = G__44435;
uc = G__44436;
continue;
}
}
} else {
return String.fromCharCode(uc);
}
}
break;
}
});
cljs.tools.reader.edn.read_unicode_char.cljs$lang$maxFixedArity = 5;
cljs.tools.reader.edn.upper_limit = ("\uD7FF" | (0));
cljs.tools.reader.edn.lower_limit = ("\uE000" | (0));
cljs.tools.reader.edn.read_char_STAR_ = (function cljs$tools$reader$edn$read_char_STAR_(rdr,backslash,opts){
var ch = cljs.tools.reader.reader_types.read_char.call(null,rdr);
if(!((ch == null))){
var token = (((cljs.tools.reader.edn.macro_terminating_QMARK_.call(null,ch)) || (cljs.tools.reader.edn.not_constituent_QMARK_.call(null,ch)) || (cljs.tools.reader.impl.utils.whitespace_QMARK_.call(null,ch)))?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(ch)].join(''):cljs.tools.reader.edn.read_token.call(null,rdr,new cljs.core.Keyword(null,"character","character",380652989),ch,false));
var token_len = cljs.core.count.call(null,token);
if(((1) === token_len)){
return cljs.core.nth.call(null,token,(0));
} else {
if((token === "newline")){
return "\n";
} else {
if((token === "space")){
return " ";
} else {
if((token === "tab")){
return "\t";
} else {
if((token === "backspace")){
return "\b";
} else {
if((token === "formfeed")){
return "\f";
} else {
if((token === "return")){
return "\r";
} else {
if(cljs.core.truth_(goog.string.startsWith(token,"u"))){
var c = cljs.tools.reader.edn.read_unicode_char.call(null,token,(1),(4),(16));
var ic = c.charCodeAt();
if(((ic > cljs.tools.reader.edn.upper_limit)) && ((ic < cljs.tools.reader.edn.lower_limit))){
return cljs.tools.reader.impl.errors.throw_invalid_character_literal.call(null,rdr,c);
} else {
return c;
}
} else {
if(cljs.core.truth_(goog.string.startsWith(token,"o"))){
var len = (token_len - (1));
if((len > (3))){
return cljs.tools.reader.impl.errors.throw_invalid_octal_len.call(null,rdr,token);
} else {
var uc = cljs.tools.reader.edn.read_unicode_char.call(null,token,(1),len,(8));
if(((uc | (0)) > (255))){
return cljs.tools.reader.impl.errors.throw_bad_octal_number.call(null,rdr);
} else {
return uc;
}
}
} else {
return cljs.tools.reader.impl.errors.throw_unsupported_character.call(null,rdr,token);
}
}
}
}
}
}
}
}
}
} else {
return cljs.tools.reader.impl.errors.throw_eof_in_character.call(null,rdr);
}
});
cljs.tools.reader.edn.starting_line_col_info = (function cljs$tools$reader$edn$starting_line_col_info(rdr){
if(cljs.core.truth_(cljs.tools.reader.reader_types.indexing_reader_QMARK_.call(null,rdr))){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.tools.reader.reader_types.get_line_number.call(null,rdr),(((cljs.tools.reader.reader_types.get_column_number.call(null,rdr) | (0)) - (1)) | (0))], null);
} else {
return null;
}
});
cljs.tools.reader.edn.read_delimited = (function cljs$tools$reader$edn$read_delimited(kind,delim,rdr,opts){
var vec__44437 = cljs.tools.reader.edn.starting_line_col_info.call(null,rdr);
var start_line = cljs.core.nth.call(null,vec__44437,(0),null);
var start_column = cljs.core.nth.call(null,vec__44437,(1),null);
var delim__$1 = cljs.tools.reader.impl.utils.char$.call(null,delim);
var a = cljs.core.transient$.call(null,cljs.core.PersistentVector.EMPTY);
while(true){
var ch = cljs.tools.reader.impl.commons.read_past.call(null,cljs.tools.reader.impl.utils.whitespace_QMARK_,rdr);
if(cljs.core.truth_(ch)){
} else {
cljs.tools.reader.impl.errors.throw_eof_delimited.call(null,rdr,kind,start_line,start_column,cljs.core.count.call(null,a));
}
if(cljs.core._EQ_.call(null,delim__$1,cljs.tools.reader.impl.utils.char$.call(null,ch))){
return cljs.core.persistent_BANG_.call(null,a);
} else {
var temp__5455__auto__ = cljs.tools.reader.edn.macros.call(null,ch);
if(cljs.core.truth_(temp__5455__auto__)){
var macrofn = temp__5455__auto__;
var mret = macrofn.call(null,rdr,ch,opts);
var G__44441 = ((!((mret === rdr)))?cljs.core.conj_BANG_.call(null,a,mret):a);
a = G__44441;
continue;
} else {
var o = cljs.tools.reader.edn.read.call(null,(function (){var G__44440 = rdr;
cljs.tools.reader.reader_types.unread.call(null,G__44440,ch);
return G__44440;
})(),true,null,opts);
var G__44442 = ((!((o === rdr)))?cljs.core.conj_BANG_.call(null,a,o):a);
a = G__44442;
continue;
}
}
break;
}
});
cljs.tools.reader.edn.read_list = (function cljs$tools$reader$edn$read_list(rdr,_,opts){
var the_list = cljs.tools.reader.edn.read_delimited.call(null,new cljs.core.Keyword(null,"list","list",765357683),")",rdr,opts);
if(cljs.core.empty_QMARK_.call(null,the_list)){
return cljs.core.List.EMPTY;
} else {
return cljs.core.apply.call(null,cljs.core.list,the_list);
}
});
cljs.tools.reader.edn.read_vector = (function cljs$tools$reader$edn$read_vector(rdr,_,opts){
return cljs.tools.reader.edn.read_delimited.call(null,new cljs.core.Keyword(null,"vector","vector",1902966158),"]",rdr,opts);
});
cljs.tools.reader.edn.read_map = (function cljs$tools$reader$edn$read_map(rdr,_,opts){
var vec__44443 = cljs.tools.reader.edn.starting_line_col_info.call(null,rdr);
var start_line = cljs.core.nth.call(null,vec__44443,(0),null);
var start_column = cljs.core.nth.call(null,vec__44443,(1),null);
var the_map = cljs.tools.reader.edn.read_delimited.call(null,new cljs.core.Keyword(null,"map","map",1371690461),"}",rdr,opts);
var map_count = cljs.core.count.call(null,the_map);
var ks = cljs.core.take_nth.call(null,(2),the_map);
var key_set = cljs.core.set.call(null,ks);
if(cljs.core.odd_QMARK_.call(null,map_count)){
cljs.tools.reader.impl.errors.throw_odd_map.call(null,rdr,start_line,start_column,the_map);
} else {
}
if(cljs.core._EQ_.call(null,cljs.core.count.call(null,key_set),cljs.core.count.call(null,ks))){
} else {
cljs.tools.reader.impl.errors.throw_dup_keys.call(null,rdr,new cljs.core.Keyword(null,"map","map",1371690461),ks);
}
if((map_count <= ((2) * cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD))){
return cljs.core.PersistentArrayMap.fromArray(cljs.core.to_array.call(null,the_map),true,true);
} else {
return cljs.core.PersistentHashMap.fromArray(cljs.core.to_array.call(null,the_map),true);
}
});
cljs.tools.reader.edn.read_number = (function cljs$tools$reader$edn$read_number(rdr,initch,opts){
var sb = (function (){var G__44446 = (new goog.string.StringBuffer());
G__44446.append(initch);
return G__44446;
})();
var ch = cljs.tools.reader.reader_types.read_char.call(null,rdr);
while(true){
if(cljs.core.truth_((function (){var or__35498__auto__ = cljs.tools.reader.impl.utils.whitespace_QMARK_.call(null,ch);
if(or__35498__auto__){
return or__35498__auto__;
} else {
var or__35498__auto____$1 = cljs.tools.reader.edn.macros.call(null,ch);
if(cljs.core.truth_(or__35498__auto____$1)){
return or__35498__auto____$1;
} else {
return (ch == null);
}
}
})())){
var s = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(sb)].join('');
cljs.tools.reader.reader_types.unread.call(null,rdr,ch);
var or__35498__auto__ = cljs.tools.reader.impl.commons.match_number.call(null,s);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return cljs.tools.reader.impl.errors.throw_invalid_number.call(null,rdr,s);
}
} else {
var G__44448 = (function (){var G__44447 = sb;
G__44447.append(ch);
return G__44447;
})();
var G__44449 = cljs.tools.reader.reader_types.read_char.call(null,rdr);
sb = G__44448;
ch = G__44449;
continue;
}
break;
}
});
cljs.tools.reader.edn.escape_char = (function cljs$tools$reader$edn$escape_char(sb,rdr){
var ch = cljs.tools.reader.reader_types.read_char.call(null,rdr);
var G__44450 = ch;
switch (G__44450) {
case "t":
return "\t";
break;
case "r":
return "\r";
break;
case "n":
return "\n";
break;
case "\\":
return "\\";
break;
case "\"":
return "\"";
break;
case "b":
return "\b";
break;
case "f":
return "\f";
break;
case "u":
var ch__$1 = cljs.tools.reader.reader_types.read_char.call(null,rdr);
if(((-1) === parseInt((ch__$1 | (0)),(16)))){
return cljs.tools.reader.impl.errors.throw_invalid_unicode_escape.call(null,rdr,ch__$1);
} else {
return cljs.tools.reader.edn.read_unicode_char.call(null,rdr,ch__$1,(16),(4),true);
}
break;
default:
if(cljs.tools.reader.impl.utils.numeric_QMARK_.call(null,ch)){
var ch__$1 = cljs.tools.reader.edn.read_unicode_char.call(null,rdr,ch,(8),(3),false);
if(((ch__$1 | (0)) > (223))){
return cljs.tools.reader.impl.errors.throw_bad_octal_number.call(null,rdr);
} else {
return ch__$1;
}
} else {
return cljs.tools.reader.impl.errors.throw_bad_escape_char.call(null,rdr,ch);
}
}
});
cljs.tools.reader.edn.read_string_STAR_ = (function cljs$tools$reader$edn$read_string_STAR_(rdr,_,opts){
var sb = (new goog.string.StringBuffer());
var ch = cljs.tools.reader.reader_types.read_char.call(null,rdr);
while(true){
var G__44452 = ch;
if(cljs.core._EQ_.call(null,null,G__44452)){
return cljs.tools.reader.impl.errors.throw_eof_reading.call(null,rdr,new cljs.core.Keyword(null,"string","string",-1989541586),"\"",sb);
} else {
if(cljs.core._EQ_.call(null,"\\",G__44452)){
var G__44455 = (function (){var G__44453 = sb;
G__44453.append(cljs.tools.reader.edn.escape_char.call(null,sb,rdr));
return G__44453;
})();
var G__44456 = cljs.tools.reader.reader_types.read_char.call(null,rdr);
sb = G__44455;
ch = G__44456;
continue;
} else {
if(cljs.core._EQ_.call(null,"\"",G__44452)){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(sb)].join('');
} else {
var G__44457 = (function (){var G__44454 = sb;
G__44454.append(ch);
return G__44454;
})();
var G__44458 = cljs.tools.reader.reader_types.read_char.call(null,rdr);
sb = G__44457;
ch = G__44458;
continue;
}
}
}
break;
}
});
cljs.tools.reader.edn.read_symbol = (function cljs$tools$reader$edn$read_symbol(rdr,initch){
var temp__5457__auto__ = cljs.tools.reader.edn.read_token.call(null,rdr,new cljs.core.Keyword(null,"symbol","symbol",-1038572696),initch);
if(cljs.core.truth_(temp__5457__auto__)){
var token = temp__5457__auto__;
var G__44459 = token;
switch (G__44459) {
case "nil":
return null;
break;
case "true":
return true;
break;
case "false":
return false;
break;
case "/":
return new cljs.core.Symbol(null,"/","/",-1371932971,null);
break;
default:
var or__35498__auto__ = (function (){var temp__5457__auto____$1 = cljs.tools.reader.impl.commons.parse_symbol.call(null,token);
if(cljs.core.truth_(temp__5457__auto____$1)){
var p = temp__5457__auto____$1;
return cljs.core.symbol.call(null,p.call(null,(0)),p.call(null,(1)));
} else {
return null;
}
})();
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return cljs.tools.reader.impl.errors.throw_invalid.call(null,rdr,new cljs.core.Keyword(null,"symbol","symbol",-1038572696),token);
}
}
} else {
return null;
}
});
cljs.tools.reader.edn.read_keyword = (function cljs$tools$reader$edn$read_keyword(reader,initch,opts){
var ch = cljs.tools.reader.reader_types.read_char.call(null,reader);
if(!(cljs.tools.reader.impl.utils.whitespace_QMARK_.call(null,ch))){
var token = cljs.tools.reader.edn.read_token.call(null,reader,new cljs.core.Keyword(null,"keyword","keyword",811389747),ch);
var s = cljs.tools.reader.impl.commons.parse_symbol.call(null,token);
if(cljs.core.truth_((function (){var and__35486__auto__ = s;
if(cljs.core.truth_(and__35486__auto__)){
return ((-1) === token.indexOf("::"));
} else {
return and__35486__auto__;
}
})())){
var ns = s.call(null,(0));
var name = s.call(null,(1));
if((":" === cljs.core.nth.call(null,token,(0)))){
return cljs.tools.reader.impl.errors.throw_invalid.call(null,reader,new cljs.core.Keyword(null,"keyword","keyword",811389747),token);
} else {
return cljs.core.keyword.call(null,ns,name);
}
} else {
return cljs.tools.reader.impl.errors.throw_invalid.call(null,reader,new cljs.core.Keyword(null,"keyword","keyword",811389747),token);
}
} else {
return cljs.tools.reader.impl.errors.throw_single_colon.call(null,reader);
}
});
cljs.tools.reader.edn.wrapping_reader = (function cljs$tools$reader$edn$wrapping_reader(sym){
return (function (rdr,_,opts){
var x__36452__auto__ = sym;
return cljs.core._conj.call(null,(function (){var x__36452__auto____$1 = cljs.tools.reader.edn.read.call(null,rdr,true,null,opts);
return cljs.core._conj.call(null,cljs.core.List.EMPTY,x__36452__auto____$1);
})(),x__36452__auto__);
});
});
cljs.tools.reader.edn.read_meta = (function cljs$tools$reader$edn$read_meta(rdr,_,opts){
var m = cljs.tools.reader.impl.utils.desugar_meta.call(null,cljs.tools.reader.edn.read.call(null,rdr,true,null,opts));
if(cljs.core.map_QMARK_.call(null,m)){
} else {
cljs.tools.reader.impl.errors.throw_bad_metadata.call(null,rdr,m);
}
var o = cljs.tools.reader.edn.read.call(null,rdr,true,null,opts);
if(((!((o == null)))?((((o.cljs$lang$protocol_mask$partition0$ & (131072))) || ((cljs.core.PROTOCOL_SENTINEL === o.cljs$core$IMeta$)))?true:false):false)){
return cljs.core.with_meta.call(null,o,cljs.core.merge.call(null,cljs.core.meta.call(null,o),m));
} else {
return cljs.tools.reader.impl.errors.throw_bad_metadata_target.call(null,rdr,o);
}
});
cljs.tools.reader.edn.read_set = (function cljs$tools$reader$edn$read_set(rdr,_,opts){
var coll = cljs.tools.reader.edn.read_delimited.call(null,new cljs.core.Keyword(null,"set","set",304602554),"}",rdr,opts);
var the_set = cljs.core.set.call(null,coll);
if(cljs.core._EQ_.call(null,cljs.core.count.call(null,coll),cljs.core.count.call(null,the_set))){
} else {
cljs.tools.reader.impl.errors.throw_dup_keys.call(null,rdr,new cljs.core.Keyword(null,"set","set",304602554),coll);
}
return the_set;
});
cljs.tools.reader.edn.read_discard = (function cljs$tools$reader$edn$read_discard(rdr,_,opts){
var G__44462 = rdr;
cljs.tools.reader.edn.read.call(null,G__44462,true,null,true);
return G__44462;
});
cljs.tools.reader.edn.read_namespaced_map = (function cljs$tools$reader$edn$read_namespaced_map(rdr,_,opts){
var token = cljs.tools.reader.edn.read_token.call(null,rdr,new cljs.core.Keyword(null,"namespaced-map","namespaced-map",1235665380),cljs.tools.reader.reader_types.read_char.call(null,rdr));
var temp__5455__auto__ = (function (){var G__44463 = token;
var G__44463__$1 = (((G__44463 == null))?null:cljs.tools.reader.impl.commons.parse_symbol.call(null,G__44463));
if((G__44463__$1 == null)){
return null;
} else {
return cljs.tools.reader.impl.utils.second_SINGLEQUOTE_.call(null,G__44463__$1);
}
})();
if(cljs.core.truth_(temp__5455__auto__)){
var ns = temp__5455__auto__;
var ch = cljs.tools.reader.impl.commons.read_past.call(null,cljs.tools.reader.impl.utils.whitespace_QMARK_,rdr);
if((ch === "{")){
var items = cljs.tools.reader.edn.read_delimited.call(null,new cljs.core.Keyword(null,"namespaced-map","namespaced-map",1235665380),"}",rdr,opts);
if(cljs.core.odd_QMARK_.call(null,cljs.core.count.call(null,items))){
cljs.tools.reader.impl.errors.throw_odd_map.call(null,rdr,null,null,items);
} else {
}
var keys = cljs.tools.reader.impl.utils.namespace_keys.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns)].join(''),cljs.core.take_nth.call(null,(2),items));
var vals = cljs.core.take_nth.call(null,(2),cljs.core.rest.call(null,items));
if(cljs.core._EQ_.call(null,cljs.core.count.call(null,cljs.core.set.call(null,keys)),cljs.core.count.call(null,keys))){
} else {
cljs.tools.reader.impl.errors.throw_dup_keys.call(null,rdr,new cljs.core.Keyword(null,"namespaced-map","namespaced-map",1235665380),keys);
}
return cljs.core.zipmap.call(null,keys,vals);
} else {
return cljs.tools.reader.impl.errors.throw_ns_map_no_map.call(null,rdr,token);
}
} else {
return cljs.tools.reader.impl.errors.throw_bad_ns.call(null,rdr,token);
}
});
cljs.tools.reader.edn.read_symbolic_value = (function cljs$tools$reader$edn$read_symbolic_value(rdr,_,opts){
var sym = cljs.tools.reader.edn.read.call(null,rdr,true,null,opts);
var G__44464 = sym;
if(cljs.core._EQ_.call(null,new cljs.core.Symbol(null,"NaN","NaN",666918153,null),G__44464)){
return Number.NaN;
} else {
if(cljs.core._EQ_.call(null,new cljs.core.Symbol(null,"-Inf","-Inf",-2123243689,null),G__44464)){
return Number.NEGATIVE_INFINITY;
} else {
if(cljs.core._EQ_.call(null,new cljs.core.Symbol(null,"Inf","Inf",647172781,null),G__44464)){
return Number.POSITIVE_INFINITY;
} else {
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,["Invalid token: ##",cljs.core.str.cljs$core$IFn$_invoke$arity$1(sym)].join(''));
}
}
}
});
cljs.tools.reader.edn.macros = (function cljs$tools$reader$edn$macros(ch){
var G__44465 = ch;
switch (G__44465) {
case "\"":
return cljs.tools.reader.edn.read_string_STAR_;
break;
case ":":
return cljs.tools.reader.edn.read_keyword;
break;
case ";":
return cljs.tools.reader.impl.commons.read_comment;
break;
case "^":
return cljs.tools.reader.edn.read_meta;
break;
case "(":
return cljs.tools.reader.edn.read_list;
break;
case ")":
return cljs.tools.reader.edn.read_unmatched_delimiter;
break;
case "[":
return cljs.tools.reader.edn.read_vector;
break;
case "]":
return cljs.tools.reader.edn.read_unmatched_delimiter;
break;
case "{":
return cljs.tools.reader.edn.read_map;
break;
case "}":
return cljs.tools.reader.edn.read_unmatched_delimiter;
break;
case "\\":
return cljs.tools.reader.edn.read_char_STAR_;
break;
case "#":
return cljs.tools.reader.edn.read_dispatch;
break;
default:
return null;
}
});
cljs.tools.reader.edn.dispatch_macros = (function cljs$tools$reader$edn$dispatch_macros(ch){
var G__44467 = ch;
switch (G__44467) {
case "^":
return cljs.tools.reader.edn.read_meta;
break;
case "{":
return cljs.tools.reader.edn.read_set;
break;
case "<":
return cljs.tools.reader.impl.commons.throwing_reader.call(null,"Unreadable form");
break;
case "!":
return cljs.tools.reader.impl.commons.read_comment;
break;
case "_":
return cljs.tools.reader.edn.read_discard;
break;
case ":":
return cljs.tools.reader.edn.read_namespaced_map;
break;
case "#":
return cljs.tools.reader.edn.read_symbolic_value;
break;
default:
return null;
}
});
cljs.tools.reader.edn.read_tagged = (function cljs$tools$reader$edn$read_tagged(rdr,initch,opts){
var tag = cljs.tools.reader.edn.read.call(null,rdr,true,null,opts);
var object = cljs.tools.reader.edn.read.call(null,rdr,true,null,opts);
if(!((tag instanceof cljs.core.Symbol))){
cljs.tools.reader.impl.errors.throw_bad_reader_tag.call(null,rdr,"Reader tag must be a symbol");
} else {
}
var temp__5455__auto__ = (function (){var or__35498__auto__ = cljs.core.get.call(null,new cljs.core.Keyword(null,"readers","readers",-2118263030).cljs$core$IFn$_invoke$arity$1(opts),tag);
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return cljs.tools.reader.default_data_readers.call(null,tag);
}
})();
if(cljs.core.truth_(temp__5455__auto__)){
var f = temp__5455__auto__;
return f.call(null,object);
} else {
var temp__5455__auto____$1 = new cljs.core.Keyword(null,"default","default",-1987822328).cljs$core$IFn$_invoke$arity$1(opts);
if(cljs.core.truth_(temp__5455__auto____$1)){
var d = temp__5455__auto____$1;
return d.call(null,tag,object);
} else {
return cljs.tools.reader.impl.errors.throw_unknown_reader_tag.call(null,rdr,tag);
}
}
});
/**
* Reads the first object from an IPushbackReader.
* Returns the object read. If EOF, throws if eof-error? is true otherwise returns eof.
* If no reader is provided, *in* will be used.
*
* Reads data in the edn format (subset of Clojure data):
* http://edn-format.org
*
* clojure.tools.reader.edn/read doesn't depend on dynamic Vars, all configuration
* is done by passing an opt map.
*
* opts is a map that can include the following keys:
* :eof - value to return on end-of-file. When not supplied, eof throws an exception.
* :readers - a map of tag symbols to data-reader functions to be considered before default-data-readers.
* When not supplied, only the default-data-readers will be used.
* :default - A function of two args, that will, if present and no reader is found for a tag,
* be called with the tag and the value.
*/
cljs.tools.reader.edn.read = (function cljs$tools$reader$edn$read(var_args){
var G__44470 = arguments.length;
switch (G__44470) {
case 1:
return cljs.tools.reader.edn.read.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.tools.reader.edn.read.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
case 4:
return cljs.tools.reader.edn.read.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.edn.read.cljs$core$IFn$_invoke$arity$1 = (function (reader){
return cljs.tools.reader.edn.read.call(null,cljs.core.PersistentArrayMap.EMPTY,reader);
});
cljs.tools.reader.edn.read.cljs$core$IFn$_invoke$arity$2 = (function (p__44471,reader){
var map__44472 = p__44471;
var map__44472__$1 = ((((!((map__44472 == null)))?((((map__44472.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__44472.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__44472):map__44472);
var opts = map__44472__$1;
var eof = cljs.core.get.call(null,map__44472__$1,new cljs.core.Keyword(null,"eof","eof",-489063237));
var eof_error_QMARK_ = !(cljs.core.contains_QMARK_.call(null,opts,new cljs.core.Keyword(null,"eof","eof",-489063237)));
return cljs.tools.reader.edn.read.call(null,reader,eof_error_QMARK_,eof,opts);
});
cljs.tools.reader.edn.read.cljs$core$IFn$_invoke$arity$4 = (function (reader,eof_error_QMARK_,eof,opts){
try{while(true){
var ch = cljs.tools.reader.reader_types.read_char.call(null,reader);
if(cljs.tools.reader.impl.utils.whitespace_QMARK_.call(null,ch)){
continue;
} else {
if((ch == null)){
if(cljs.core.truth_(eof_error_QMARK_)){
return cljs.tools.reader.impl.errors.throw_eof_error.call(null,reader,null);
} else {
return eof;
}
} else {
if(cljs.tools.reader.impl.commons.number_literal_QMARK_.call(null,reader,ch)){
return cljs.tools.reader.edn.read_number.call(null,reader,ch,opts);
} else {
var f = cljs.tools.reader.edn.macros.call(null,ch);
if(cljs.core.truth_(f)){
var res = f.call(null,reader,ch,opts);
if((res === reader)){
continue;
} else {
return res;
}
} else {
return cljs.tools.reader.edn.read_symbol.call(null,reader,ch);
}
}
}
}
break;
}
}catch (e44474){if((e44474 instanceof Error)){
var e = e44474;
if(cljs.tools.reader.impl.utils.ex_info_QMARK_.call(null,e)){
var d = cljs.core.ex_data.call(null,e);
if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"reader-exception","reader-exception",-1938323098),new cljs.core.Keyword(null,"type","type",1174270348).cljs$core$IFn$_invoke$arity$1(d))){
throw e;
} else {
throw cljs.core.ex_info.call(null,e.message,cljs.core.merge.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"reader-exception","reader-exception",-1938323098)], null),d,(cljs.core.truth_(cljs.tools.reader.reader_types.indexing_reader_QMARK_.call(null,reader))?new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"line","line",212345235),cljs.tools.reader.reader_types.get_line_number.call(null,reader),new cljs.core.Keyword(null,"column","column",2078222095),cljs.tools.reader.reader_types.get_column_number.call(null,reader),new cljs.core.Keyword(null,"file","file",-1269645878),cljs.tools.reader.reader_types.get_file_name.call(null,reader)], null):null)),e);
}
} else {
throw cljs.core.ex_info.call(null,e.message,cljs.core.merge.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"reader-exception","reader-exception",-1938323098)], null),(cljs.core.truth_(cljs.tools.reader.reader_types.indexing_reader_QMARK_.call(null,reader))?new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"line","line",212345235),cljs.tools.reader.reader_types.get_line_number.call(null,reader),new cljs.core.Keyword(null,"column","column",2078222095),cljs.tools.reader.reader_types.get_column_number.call(null,reader),new cljs.core.Keyword(null,"file","file",-1269645878),cljs.tools.reader.reader_types.get_file_name.call(null,reader)], null):null)),e);
}
} else {
throw e44474;
}
}});
cljs.tools.reader.edn.read.cljs$lang$maxFixedArity = 4;
/**
* Reads one object from the string s.
* Returns nil when s is nil or empty.
*
* Reads data in the edn format (subset of Clojure data):
* http://edn-format.org
*
* opts is a map as per clojure.tools.reader.edn/read
*/
cljs.tools.reader.edn.read_string = (function cljs$tools$reader$edn$read_string(var_args){
var G__44477 = arguments.length;
switch (G__44477) {
case 1:
return cljs.tools.reader.edn.read_string.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.tools.reader.edn.read_string.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.edn.read_string.cljs$core$IFn$_invoke$arity$1 = (function (s){
return cljs.tools.reader.edn.read_string.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"eof","eof",-489063237),null], null),s);
});
cljs.tools.reader.edn.read_string.cljs$core$IFn$_invoke$arity$2 = (function (opts,s){
if(cljs.core.truth_((function (){var and__35486__auto__ = s;
if(cljs.core.truth_(and__35486__auto__)){
return cljs.core.not_EQ_.call(null,s,"");
} else {
return and__35486__auto__;
}
})())){
return cljs.tools.reader.edn.read.call(null,opts,cljs.tools.reader.reader_types.string_push_back_reader.call(null,s));
} else {
return null;
}
});
cljs.tools.reader.edn.read_string.cljs$lang$maxFixedArity = 2;
//# sourceMappingURL=edn.js.map?rel=1517021946884
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/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IAAI6B;;;;;;;;;;;;AAC9C,OAAC+B,+DAA2B5D;;;AAElC,+CAAA,\/CAAgB6D,sGAAwB7D;AAAxC,AACE,oBAAM,AAAC8D,gEAAiB9D;AAAxB,AAAA,0FACG,AAAC+D,yDAAgB\/D,KAAK,mFAAA,lFAAK,2EAAA,1EAAK,mEAAA,lEAAK,AAACgE,2DAAkBhE;;AAD3D;;;AAGF,uCAAA,vCAAOiE,sFACJhE,KAAKiE,MAAMlE,IAAIgB;AADlB,AAEE,IAAAmD,aAAgC,AAACN,uDAAuB7D;iBAAxD,AAAAyC,wBAAA0B,WAAA,IAAA,pDAAOC;mBAAP,AAAA3B,wBAAA0B,WAAA,IAAA,tDAAkBE;IACZH,YAAM,AAACI,6CAAKJ;AADlB,AAEE,IAAOK,IAAE,+BAAA,\/BAACC;;AAAV,AACE,IAAMhF,KAAG,AAACiF,mDAAU\/D,+CAAYV;AAAhC,AACE,oBAAUR;AAAV;AAAA,AACE,AAACkF,4DAAwB1E,IAAIC,KAAKmE,WAAWC,aAAa,AAACnC,0BAAMqC;;;AACnE,GAAI,AAACI,yBAAET,UAAM,AAACI,6CAAK9E;AACjB,OAACoF,qCAAYL;;AACb,IAAAtD,qBAAiB,AAACvBLine truncated
@@ -0,0 +1,131 @@
;; Copyright (c) Nicola Mometto, Rich Hickey & contributors.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.tools.reader.impl.commons
(:refer-clojure :exclude [char])
(:require
[cljs.tools.reader.impl.errors :refer [reader-error]]
[cljs.tools.reader.reader-types :refer [peek-char read-char]]
[cljs.tools.reader.impl.utils :refer [numeric? newline? char]]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; helpers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn ^boolean number-literal?
"Checks whether the reader is at the start of a number literal"
[^not-native reader initch]
(or (numeric? initch)
(and (or (identical? \+ initch) (identical? \- initch))
(numeric? (peek-char reader)))))
(defn read-past
"Read until first character that doesn't match pred, returning
char."
[pred ^not-native rdr]
(loop [ch (read-char rdr)]
(if ^boolean (pred ch)
(recur (read-char rdr))
ch)))
(defn skip-line
"Advances the reader to the end of a line. Returns the reader"
[^not-native reader]
(loop []
(when-not (newline? (read-char reader))
(recur)))
reader)
(def int-pattern #"^([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?$")
(def ratio-pattern #"([-+]?[0-9]+)/([0-9]+)")
(def float-pattern #"([-+]?[0-9]+(\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?")
(defn- match-int
[s]
(let [m (vec (re-find int-pattern s))]
(if-not (nil? (m 2))
0
(let [^boolean negate? (identical? "-" (m 1))
a (cond
(not (nil? (m 3))) [(m 3) 10]
(not (nil? (m 4))) [(m 4) 16]
(not (nil? (m 5))) [(m 5) 8]
(not (nil? (m 7))) [(m 7) (js/parseInt (m 6))]
:else [nil nil])
n (a 0)]
(when-not (nil? n)
(let [bn (js/parseInt n (a 1))
bn (if negate? (* -1 bn) bn)]
(when-not (js/isNaN bn)
bn)))))))
(defn- match-ratio
[s]
(let [m (vec (re-find ratio-pattern s))
numerator (m 1)
denominator (m 2)
numerator (if (re-find #"^\+" numerator)
(subs numerator 1)
numerator)]
(/ (-> numerator js/parseInt) ;;; No ratio type in cljs
(-> denominator js/parseInt)))); So will convert to js/Number
(defn- match-float
[s]
(let [m (vec (re-find float-pattern s))]
(if-not (nil? (m 4)) ;; for BigDecimal "10.03M", as all parsed to js/Number
(js/parseFloat (m 1))
(js/parseFloat s))))
(defn ^boolean matches? [pattern s]
(let [[match] (re-find pattern s)]
(identical? match s)))
(defn match-number [s]
(if (matches? int-pattern s)
(match-int s)
(if (matches? float-pattern s)
(match-float s)
(when (matches? ratio-pattern s)
(match-ratio s)))))
(defn parse-symbol
"Parses a string into a vector of the namespace and symbol"
[token]
(when-not (or (identical? "" token)
(true? (.test #":$" token))
(true? (.test #"^::" token)))
(let [ns-idx (.indexOf token "/")
ns (when (pos? ns-idx)
(subs token 0 ns-idx))]
(if-not (nil? ns)
(let [ns-idx (inc ns-idx)]
(when-not (== ns-idx (count token))
(let [sym (subs token ns-idx)]
(when (and (not (numeric? (nth sym 0)))
(not (identical? "" sym))
(false? (.test #":$" ns))
(or (identical? sym "/")
(== -1 (.indexOf sym "/"))))
[ns sym]))))
(when (or (identical? token "/")
(== -1 (.indexOf token "/")))
[nil token])))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; readers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn read-comment
[rdr & _]
(skip-line rdr))
(defn throwing-reader
[msg]
(fn [rdr & _]
(reader-error rdr msg)))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {parseInt {}, isNaN {}, parseFloat {}}, :use-macros {}, :excludes #{char}, :name cljs.tools.reader.impl.commons, :imports nil, :requires {cljs.tools.reader.impl.errors cljs.tools.reader.impl.errors, cljs.tools.reader.reader-types cljs.tools.reader.reader-types, cljs.tools.reader.impl.utils cljs.tools.reader.impl.utils}, :cljs.spec/speced-vars [], :uses {char cljs.tools.reader.impl.utils, numeric? cljs.tools.reader.impl.utils, reader-error cljs.tools.reader.impl.errors, peek-char cljs.tools.reader.reader-types, read-char cljs.tools.reader.reader-types, newline? cljs.tools.reader.impl.utils}, :defs {match-number {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :line 89, :column 7, :end-line 89, :end-column 19, :arglists (quote ([s]))}, :name cljs.tools.reader.impl.commons/match-number, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :end-column 19, :method-params ([s]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 89, :end-line 89, :max-fixed-arity 1, :fn-var true, :arglists (quote ([s]))}, skip-line {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :line 36, :column 7, :end-line 36, :end-column 16, :arglists (quote ([reader])), :doc "Advances the reader to the end of a line. Returns the reader"}, :name cljs.tools.reader.impl.commons/skip-line, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :end-column 16, :method-params ([reader]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 36, :end-line 36, :max-fixed-arity 1, :fn-var true, :arglists (quote ([reader])), :doc "Advances the reader to the end of a line. Returns the reader"}, int-pattern {:name cljs.tools.reader.impl.commons/int-pattern, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :line 44, :column 1, :end-line 44, :end-column 17, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :line 44, :column 6, :end-line 44, :end-column 17}, :tag any}, read-comment {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :line 124, :column 7, :end-line 124, :end-column 19, :arglists (quote ([rdr & _])), :top-fn {:variadic true, :max-fixed-arity 1, :method-params [(rdr _)], :arglists ([rdr & _]), :arglists-meta (nil)}}, :name cljs.tools.reader.impl.commons/read-comment, :variadic true, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :end-column 19, :top-fn {:variadic true, :max-fixed-arity 1, :method-params [(rdr _)], :arglists ([rdr & _]), :arglists-meta (nil)}, :method-params [(rdr _)], :protocol-impl nil, :arglists-meta (nil), :column 1, :line 124, :end-line 124, :max-fixed-arity 1, :fn-var true, :arglists ([rdr & _])}, match-ratio {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :line 67, :column 8, :end-line 67, :end-column 19, :private true, :arglists (quote ([s]))}, :private true, :name cljs.tools.reader.impl.commons/match-ratio, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :end-column 19, :method-params ([s]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 67, :end-line 67, :max-fixed-arity 1, :fn-var true, :arglists (quote ([s]))}, match-int {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :line 48, :column 8, :end-line 48, :end-column 17, :private true, :arglists (quote ([s]))}, :private true, :name cljs.tools.reader.impl.commons/match-int, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :end-column 17, :method-params ([s]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 48, :end-line 48, :max-fixed-arity 1, :fn-var true, :arglists (quote ([s]))}, parse-symbol {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :line 97, :column 7, :end-line 97, :end-column 19, :arglists (quote ([token])), :doc "Parses a string into a vector of the namespace and symbol"}, :name cljs.tools.reader.impl.commons/parse-symbol, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/commons.cljs", :end-column 19, :method-params ([token]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 97, :end-line 97, :max-fixed-arity 1, :fn-var true, :arglists (quote ([token])), :doc "Parses a string into a vector of the namespace and symbol"}, number-literal? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/clLine truncated
@@ -0,0 +1,191 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.tools.reader.impl.commons');
goog.require('cljs.core');
goog.require('cljs.tools.reader.impl.errors');
goog.require('cljs.tools.reader.reader_types');
goog.require('cljs.tools.reader.impl.utils');
/**
* Checks whether the reader is at the start of a number literal
*/
cljs.tools.reader.impl.commons.number_literal_QMARK_ = (function cljs$tools$reader$impl$commons$number_literal_QMARK_(reader,initch){
return (cljs.tools.reader.impl.utils.numeric_QMARK_.call(null,initch)) || (((("+" === initch)) || (("-" === initch))) && (cljs.tools.reader.impl.utils.numeric_QMARK_.call(null,cljs.tools.reader.reader_types.peek_char.call(null,reader))));
});
/**
* Read until first character that doesn't match pred, returning
* char.
*/
cljs.tools.reader.impl.commons.read_past = (function cljs$tools$reader$impl$commons$read_past(pred,rdr){
var ch = cljs.tools.reader.reader_types.read_char.call(null,rdr);
while(true){
if(pred.call(null,ch)){
var G__44276 = cljs.tools.reader.reader_types.read_char.call(null,rdr);
ch = G__44276;
continue;
} else {
return ch;
}
break;
}
});
/**
* Advances the reader to the end of a line. Returns the reader
*/
cljs.tools.reader.impl.commons.skip_line = (function cljs$tools$reader$impl$commons$skip_line(reader){
while(true){
if(cljs.tools.reader.impl.utils.newline_QMARK_.call(null,cljs.tools.reader.reader_types.read_char.call(null,reader))){
} else {
continue;
}
break;
}
return reader;
});
cljs.tools.reader.impl.commons.int_pattern = /^([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?$/;
cljs.tools.reader.impl.commons.ratio_pattern = /([-+]?[0-9]+)\/([0-9]+)/;
cljs.tools.reader.impl.commons.float_pattern = /([-+]?[0-9]+(\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?/;
cljs.tools.reader.impl.commons.match_int = (function cljs$tools$reader$impl$commons$match_int(s){
var m = cljs.core.vec.call(null,cljs.core.re_find.call(null,cljs.tools.reader.impl.commons.int_pattern,s));
if(!((m.call(null,(2)) == null))){
return (0);
} else {
var negate_QMARK_ = ("-" === m.call(null,(1)));
var a = ((!((m.call(null,(3)) == null)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [m.call(null,(3)),(10)], null):((!((m.call(null,(4)) == null)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [m.call(null,(4)),(16)], null):((!((m.call(null,(5)) == null)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [m.call(null,(5)),(8)], null):((!((m.call(null,(7)) == null)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [m.call(null,(7)),parseInt(m.call(null,(6)))], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,null], null)
))));
var n = a.call(null,(0));
if((n == null)){
return null;
} else {
var bn = parseInt(n,a.call(null,(1)));
var bn__$1 = ((negate_QMARK_)?((-1) * bn):bn);
if(cljs.core.truth_(isNaN(bn__$1))){
return null;
} else {
return bn__$1;
}
}
}
});
cljs.tools.reader.impl.commons.match_ratio = (function cljs$tools$reader$impl$commons$match_ratio(s){
var m = cljs.core.vec.call(null,cljs.core.re_find.call(null,cljs.tools.reader.impl.commons.ratio_pattern,s));
var numerator = m.call(null,(1));
var denominator = m.call(null,(2));
var numerator__$1 = (cljs.core.truth_(cljs.core.re_find.call(null,/^\+/,numerator))?cljs.core.subs.call(null,numerator,(1)):numerator);
return (parseInt(numerator__$1) / parseInt(denominator));
});
cljs.tools.reader.impl.commons.match_float = (function cljs$tools$reader$impl$commons$match_float(s){
var m = cljs.core.vec.call(null,cljs.core.re_find.call(null,cljs.tools.reader.impl.commons.float_pattern,s));
if(!((m.call(null,(4)) == null))){
return parseFloat(m.call(null,(1)));
} else {
return parseFloat(s);
}
});
cljs.tools.reader.impl.commons.matches_QMARK_ = (function cljs$tools$reader$impl$commons$matches_QMARK_(pattern,s){
var vec__44277 = cljs.core.re_find.call(null,pattern,s);
var match = cljs.core.nth.call(null,vec__44277,(0),null);
return (match === s);
});
cljs.tools.reader.impl.commons.match_number = (function cljs$tools$reader$impl$commons$match_number(s){
if(cljs.tools.reader.impl.commons.matches_QMARK_.call(null,cljs.tools.reader.impl.commons.int_pattern,s)){
return cljs.tools.reader.impl.commons.match_int.call(null,s);
} else {
if(cljs.tools.reader.impl.commons.matches_QMARK_.call(null,cljs.tools.reader.impl.commons.float_pattern,s)){
return cljs.tools.reader.impl.commons.match_float.call(null,s);
} else {
if(cljs.tools.reader.impl.commons.matches_QMARK_.call(null,cljs.tools.reader.impl.commons.ratio_pattern,s)){
return cljs.tools.reader.impl.commons.match_ratio.call(null,s);
} else {
return null;
}
}
}
});
/**
* Parses a string into a vector of the namespace and symbol
*/
cljs.tools.reader.impl.commons.parse_symbol = (function cljs$tools$reader$impl$commons$parse_symbol(token){
if((("" === token)) || (/:$/.test(token) === true) || (/^::/.test(token) === true)){
return null;
} else {
var ns_idx = token.indexOf("/");
var ns = (((ns_idx > (0)))?cljs.core.subs.call(null,token,(0),ns_idx):null);
if(!((ns == null))){
var ns_idx__$1 = (ns_idx + (1));
if((ns_idx__$1 === cljs.core.count.call(null,token))){
return null;
} else {
var sym = cljs.core.subs.call(null,token,ns_idx__$1);
if((!(cljs.tools.reader.impl.utils.numeric_QMARK_.call(null,cljs.core.nth.call(null,sym,(0))))) && (!(("" === sym))) && (/:$/.test(ns) === false) && (((sym === "/")) || (((-1) === sym.indexOf("/"))))){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [ns,sym], null);
} else {
return null;
}
}
} else {
if(((token === "/")) || (((-1) === token.indexOf("/")))){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,token], null);
} else {
return null;
}
}
}
});
cljs.tools.reader.impl.commons.read_comment = (function cljs$tools$reader$impl$commons$read_comment(var_args){
var args__36784__auto__ = [];
var len__36777__auto___44282 = arguments.length;
var i__36778__auto___44283 = (0);
while(true){
if((i__36778__auto___44283 < len__36777__auto___44282)){
args__36784__auto__.push((arguments[i__36778__auto___44283]));
var G__44284 = (i__36778__auto___44283 + (1));
i__36778__auto___44283 = G__44284;
continue;
} else {
}
break;
}
var argseq__36785__auto__ = ((((1) < args__36784__auto__.length))?(new cljs.core.IndexedSeq(args__36784__auto__.slice((1)),(0),null)):null);
return cljs.tools.reader.impl.commons.read_comment.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__36785__auto__);
});
cljs.tools.reader.impl.commons.read_comment.cljs$core$IFn$_invoke$arity$variadic = (function (rdr,_){
return cljs.tools.reader.impl.commons.skip_line.call(null,rdr);
});
cljs.tools.reader.impl.commons.read_comment.cljs$lang$maxFixedArity = (1);
cljs.tools.reader.impl.commons.read_comment.cljs$lang$applyTo = (function (seq44280){
var G__44281 = cljs.core.first.call(null,seq44280);
var seq44280__$1 = cljs.core.next.call(null,seq44280);
return cljs.tools.reader.impl.commons.read_comment.cljs$core$IFn$_invoke$arity$variadic(G__44281,seq44280__$1);
});
cljs.tools.reader.impl.commons.throwing_reader = (function cljs$tools$reader$impl$commons$throwing_reader(msg){
return (function() {
var G__44285__delegate = function (rdr,_){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,msg);
};
var G__44285 = function (rdr,var_args){
var _ = null;
if (arguments.length > 1) {
var G__44286__i = 0, G__44286__a = new Array(arguments.length - 1);
while (G__44286__i < G__44286__a.length) {G__44286__a[G__44286__i] = arguments[G__44286__i + 1]; ++G__44286__i;}
_ = new cljs.core.IndexedSeq(G__44286__a,0,null);
}
return G__44285__delegate.call(this,rdr,_);};
G__44285.cljs$lang$maxFixedArity = 1;
G__44285.cljs$lang$applyTo = (function (arglist__44287){
var rdr = cljs.core.first(arglist__44287);
var _ = cljs.core.rest(arglist__44287);
return G__44285__delegate(rdr,_);
});
G__44285.cljs$core$IFn$_invoke$arity$variadic = G__44285__delegate;
return G__44285;
})()
;
});
//# sourceMappingURL=commons.js.map?rel=1517021946510
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/tools\/reader\/impl\/commons.js","sources":["commons.cljs?rel=1517021946511"],"lineCount":191,"mappings":";AAQA;;;;;AAWA;;;uDAAA,vDAAeA,sHAEAC,OAAOC;AAFtB,AAGE,QAAI,AAACC,sDAASD,aACV,CAAK,CAAI,CAAA,QAAeA,aAAQ,CAAA,QAAgBA,cAC3C,AAACC,sDAAS,AAACC,mDAAUH;;AAEhC;;;;2CAAA,3CAAMI,8FAGHC,KAAiBC;AAHpB,AAIE,IAAOC,KAAG,AAACC,mDAAUF;;AAArB,AACE,GAAI,AAAUD,eAAKE;AACjB,eAAO,AAACC,mDAAUF;;;;AAClBC;;;;;AAEN;;;2CAAA,3CAAME,8FAEST;AAFf,AAGE;AAAA,AACE,GAAU,AAACU,sDAAS,AAACF,mDAAUR;AAA\/B;AAAA,AACE;;;;;AACJA;;AAEF,6CAAA,7CAAKW;AACL,+CAAA,\/CAAKC;AACL,+CAAA,\/CAAKC;AAEL,2CAAA,3CAAOC,8FACJC;AADH,AAEE,IAAMC,IAAE,AAACC,wBAAI,AAACC,4BAAQP,2CAAYI;AAAlC,AACE,GAAA,EAAQ,qBAAA,pBAAM,YAAA,ZAACC;AAAf;;AAEE,IAAeG,gBAAQ,CAAA,QAAgB,YAAA,ZAACH;IAClCI,IAAE,iCAAA,oGAAA,aAAA,iCAAA,oGAAA,aAAA,iCAAA,oGAAA,YAAA,iCAAA,uIAAA,AAAA,mFAAA,KAAA,nrBACC,EAAK,qBAAA,pBAAM,YAAA,ZAACJ,+GAAQ,YAAA,ZAACA,gCACrB,EAAK,qBAAA,pBAAM,YAAA,ZAACA,+GAAQ,YAAA,ZAACA,gCACrB,EAAK,qBAAA,pBAAM,YAAA,ZAACA,+GAAQ,YAAA,ZAACA,+BACrB,EAAK,qBAAA,pBAAM,YAAA,ZAACA,+GAAQ,YAAA,ZAACA,iBA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,yBAAAH;AAAA,AAAA,OAAAD,iFAAAE,SAAAD;;;AAAA,AAIA,iDAAA,jDAAMK,0GACHC;AADH,AAEE;mCAAKlD,IAAMgD;AAAX,AACE,OAACG,qDAAanD,IAAIkD;;yBADflD;IAAMgD;;;;EAAAA;;oCAANhD,IAAMgD;;;IAANhD;IAAMgD;0BAANhD,IAAMgD","names":["cljs.tools.reader.impl.commons\/number-literal?","reader","initch","cljs.tools.reader.impl.utils\/numeric?","cljs.tools.reader.reader-types\/peek-char","cljs.tools.reader.impl.commons\/read-past","pred","rdr","ch","cljs.tools.reader.reader-types\/read-char","cljs.tools.reader.impl.commons\/skip-line","cljs.tools.reader.impl.utils\/newline?","cljs.tools.reader.impl.commons\/int-pattern","cljs.tools.reader.impl.commons\/ratio-pattern","cljs.tools.reader.impl.commons\/float-pattern","cljs.tools.reader.impl.commons\/match-int","s","m","cljs.core\/vec","cljs.core\/re-find","negate?","a","js\/parseInt","n","bn","js\/isNaN","cljs.tools.reader.impl.commons\/match-ratio","numerator","denominator","cljs.core\/subs","cljs.tools.reader.impl.commons\/match-float","js\/parseFloat","cljs.tools.reader.impl.commons\/matches?","pattern","vec__44277","cljs.core\/nth","match","cljs.tools.reader.impl.commons\/match-number","cljs.tools.reader.impl.commons\/parse-symbol","token","ns-idx","ns","cljs.core\/count","sym","var_args","args__36784__auto__","len__36777__auto__","i__36778__auto__","argseq__36785__auto__","cljs.core\/IndexedSeq","cljs.tools.reader.impl.commons\/read-comment","seq44280","G__44281","cljs.core\/first","cljs.core\/next","_","cljs.tools.reader.impl.commons\/throwing-reader","msg","cljs.tools.reader.impl.errors\/reader-error"]}
@@ -0,0 +1,253 @@
;; Copyright (c) Russ Olsen, Nicola Mometto, Rich Hickey & contributors.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.tools.reader.impl.errors
(:require [cljs.tools.reader.reader-types :as types]
[clojure.string :as s]
[cljs.tools.reader.impl.inspect :as i]))
(defn- ex-details
[rdr ex-type]
(let [details {:type :reader-exception
:ex-kind ex-type}]
(if (types/indexing-reader? rdr)
(assoc
details
:file (types/get-file-name rdr)
:line (types/get-line-number rdr)
:col (types/get-column-number rdr))
details)))
(defn- throw-ex
"Throw an ex-info error."
[rdr ex-type & msg]
(let [details (ex-details rdr ex-type)
file (:file details)
line (:line details)
col (:col details)
msg1 (if file (str file " "))
msg2 (if line (str "[line " line ", col " col "]"))
msg3 (if (or msg1 msg2) " ")
full-msg (apply str msg1 msg2 msg3 msg)]
(throw (ex-info full-msg details))))
(defn reader-error
"Throws an ExceptionInfo with the given message.
If rdr is an IndexingReader, additional information about column and line number is provided"
[rdr & msgs]
(throw-ex rdr :reader-error (apply str msgs)))
(defn illegal-arg-error
"Throws an ExceptionInfo with the given message.
If rdr is an IndexingReader, additional information about column and line number is provided"
[rdr & msgs]
(throw-ex rdr :illegal-argument (apply str msgs)))
(defn eof-error
"Throws an ExceptionInfo with the given message.
If rdr is an IndexingReader, additional information about column and line number is provided"
[rdr & msgs]
(throw-ex rdr :eof (apply str msgs)))
(defn throw-eof-delimited
([rdr kind column line] (throw-eof-delimited rdr kind line column nil))
([rdr kind line column n]
(eof-error
rdr
"Unexpected EOF while reading "
(if n
(str "item " n " of "))
(name kind)
(if line
(str ", starting at line " line " and column " column))
".")))
(defn throw-odd-map [rdr line col elements]
(reader-error
rdr
"The map literal starting with "
(i/inspect (first elements))
(if line (str " on line " line " column " col))
" contains "
(count elements)
" form(s). Map literals must contain an even number of forms."))
(defn throw-invalid-number [rdr token]
(reader-error
rdr
"Invalid number: "
token
"."))
(defn throw-invalid-unicode-literal [rdr token]
(throw
(illegal-arg-error
rdr
"Invalid unicode literal: \\"
token
".")))
(defn throw-invalid-unicode-escape [rdr ch]
(reader-error
rdr
"Invalid unicode escape: \\u"
ch
"."))
(defn throw-invalid [rdr kind token]
(reader-error rdr "Invalid " (name kind) ": " token "."))
(defn throw-eof-at-start [rdr kind]
(eof-error rdr "Unexpected EOF while reading start of " (name kind) "."))
(defn throw-bad-char [rdr kind ch]
(reader-error rdr "Invalid character: " ch " found while reading " (name kind) "."))
(defn throw-eof-at-dispatch [rdr]
(eof-error rdr "Unexpected EOF while reading dispatch character."))
(defn throw-bad-dispatch [rdr ch]
(reader-error rdr "No dispatch macro for " ch "."))
(defn throw-unmatch-delimiter [rdr ch]
(reader-error rdr "Unmatched delimiter " ch "."))
(defn throw-eof-reading [rdr kind & start]
(let [init (case kind :regex "#\"" :string \")]
(eof-error rdr "Unexpected EOF reading " (name kind) " starting " (apply str init start) ".")))
(defn throw-no-dispatch [rdr ch]
(throw-bad-dispatch rdr ch))
(defn throw-invalid-unicode-char[rdr token]
(reader-error
rdr
"Invalid unicode character \\"
token
"."))
(defn throw-invalid-unicode-digit-in-token[rdr ch token]
(illegal-arg-error
rdr
"Invalid digit "
ch
" in unicode character \\"
token
"."))
(defn throw-invalid-unicode-digit[rdr ch]
(illegal-arg-error
rdr
"Invalid digit "
ch
" in unicode character."))
(defn throw-invalid-unicode-len[rdr actual expected]
(illegal-arg-error
rdr
"Invalid unicode literal. Unicode literals should be "
expected
"characters long. "
"value suppled is "
actual
"characters long."))
(defn throw-invalid-character-literal[rdr token]
(reader-error rdr "Invalid character literal \\u" token "."))
(defn throw-invalid-octal-len[rdr token]
(reader-error
rdr
"Invalid octal escape sequence in a character literal:"
token
". Octal escape sequences must be 3 or fewer digits."))
(defn throw-bad-octal-number [rdr]
(reader-error rdr "Octal escape sequence must be in range [0, 377]."))
(defn throw-unsupported-character[rdr token]
(reader-error
rdr
"Unsupported character: "
token
"."))
(defn throw-eof-in-character [rdr]
(eof-error
rdr
"Unexpected EOF while reading character."))
(defn throw-bad-escape-char [rdr ch]
(reader-error rdr "Unsupported escape character: \\" ch "."))
(defn throw-single-colon [rdr]
(reader-error rdr "A single colon is not a valid keyword."))
(defn throw-bad-metadata [rdr x]
(reader-error
rdr
"Metadata cannot be "
(i/inspect x)
". Metadata must be a Symbol, Keyword, String or Map."))
(defn throw-bad-metadata-target [rdr target]
(reader-error
rdr
"Metadata can not be applied to "
(i/inspect target)
". "
"Metadata can only be applied to IMetas."))
(defn throw-feature-not-keyword [rdr feature]
(reader-error
rdr
"Feature cannot be "
(i/inspect feature)
" Features must be keywords."))
(defn throw-ns-map-no-map [rdr ns-name]
(reader-error rdr "Namespaced map with namespace " ns-name " does not specify a map."))
(defn throw-bad-ns [rdr ns-name]
(reader-error rdr "Invalid value used as namespace in namespaced map: " ns-name "."))
(defn throw-bad-reader-tag [rdr tag]
(reader-error
rdr
"Invalid reader tag: "
(i/inspect tag)
". Reader tags must be symbols."))
(defn throw-unknown-reader-tag [rdr tag]
(reader-error
rdr
"No reader function for tag "
(i/inspect tag)
"."))
(defn- duplicate-keys-error [msg coll]
(letfn [(duplicates [seq]
(for [[id freq] (frequencies seq)
:when (> freq 1)]
id))]
(let [dups (duplicates coll)]
(apply str msg
(when (> (count dups) 1) "s")
": " (interpose ", " dups)))))
(defn throw-dup-keys [rdr kind ks]
(reader-error
rdr
(duplicate-keys-error
(str (s/capitalize (name kind)) " literal contains duplicate key")
ks)))
(defn throw-eof-error [rdr line]
(if line
(eof-error rdr "EOF while reading, starting at line " line ".")
(eof-error rdr "EOF while reading.")))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}}, :use-macros {}, :excludes #{}, :name cljs.tools.reader.impl.errors, :imports nil, :requires {types cljs.tools.reader.reader-types, cljs.tools.reader.reader-types cljs.tools.reader.reader-types, s clojure.string, clojure.string clojure.string, i cljs.tools.reader.impl.inspect, cljs.tools.reader.impl.inspect cljs.tools.reader.impl.inspect}, :cljs.spec/speced-vars [], :uses nil, :defs {throw-bad-dispatch {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :line 114, :column 7, :end-line 114, :end-column 25, :arglists (quote ([rdr ch]))}, :name cljs.tools.reader.impl.errors/throw-bad-dispatch, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :end-column 25, :method-params ([rdr ch]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 114, :end-line 114, :max-fixed-arity 2, :fn-var true, :arglists (quote ([rdr ch]))}, throw-invalid-unicode-escape {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :line 95, :column 7, :end-line 95, :end-column 35, :arglists (quote ([rdr ch]))}, :name cljs.tools.reader.impl.errors/throw-invalid-unicode-escape, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :end-column 35, :method-params ([rdr ch]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 95, :end-line 95, :max-fixed-arity 2, :fn-var true, :arglists (quote ([rdr ch]))}, throw-dup-keys {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :line 243, :column 7, :end-line 243, :end-column 21, :arglists (quote ([rdr kind ks]))}, :name cljs.tools.reader.impl.errors/throw-dup-keys, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :end-column 21, :method-params ([rdr kind ks]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 243, :end-line 243, :max-fixed-arity 3, :fn-var true, :arglists (quote ([rdr kind ks]))}, throw-bad-ns {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :line 216, :column 7, :end-line 216, :end-column 19, :arglists (quote ([rdr ns-name]))}, :name cljs.tools.reader.impl.errors/throw-bad-ns, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :end-column 19, :method-params ([rdr ns-name]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 216, :end-line 216, :max-fixed-arity 2, :fn-var true, :arglists (quote ([rdr ns-name]))}, duplicate-keys-error {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :line 233, :column 8, :end-line 233, :end-column 28, :private true, :arglists (quote ([msg coll]))}, :private true, :name cljs.tools.reader.impl.errors/duplicate-keys-error, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :end-column 28, :method-params ([msg coll]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 233, :end-line 233, :max-fixed-arity 2, :fn-var true, :arglists (quote ([msg coll]))}, throw-unknown-reader-tag {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :line 226, :column 7, :end-line 226, :end-column 31, :arglists (quote ([rdr tag]))}, :name cljs.tools.reader.impl.errors/throw-unknown-reader-tag, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :end-column 31, :method-params ([rdr tag]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 226, :end-line 226, :max-fixed-arity 2, :fn-var true, :arglists (quote ([rdr tag]))}, throw-eof-at-dispatch {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :line 111, :column 7, :end-line 111, :end-column 28, :arglists (quote ([rdr]))}, :name cljs.tools.reader.impl.errors/throw-eof-at-dispatch, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :end-column 28, :method-params ([rdr]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 111, :end-line 111, :max-fixed-arity 1, :fn-var true, :arglists (quote ([rdr]))}, throw-bad-metadata-target {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :line 198, :column 7, :end-line 198, :end-column 32, :arglists (quote ([rdr target]))}, :name cljs.tools.reader.impl.errors/throw-bad-metadata-target, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/errors.cljs", :end-column 32, :methoLine truncated
@@ -0,0 +1,413 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.tools.reader.impl.errors');
goog.require('cljs.core');
goog.require('cljs.tools.reader.reader_types');
goog.require('clojure.string');
goog.require('cljs.tools.reader.impl.inspect');
cljs.tools.reader.impl.errors.ex_details = (function cljs$tools$reader$impl$errors$ex_details(rdr,ex_type){
var details = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"reader-exception","reader-exception",-1938323098),new cljs.core.Keyword(null,"ex-kind","ex-kind",1581199296),ex_type], null);
if(cljs.core.truth_(cljs.tools.reader.reader_types.indexing_reader_QMARK_.call(null,rdr))){
return cljs.core.assoc.call(null,details,new cljs.core.Keyword(null,"file","file",-1269645878),cljs.tools.reader.reader_types.get_file_name.call(null,rdr),new cljs.core.Keyword(null,"line","line",212345235),cljs.tools.reader.reader_types.get_line_number.call(null,rdr),new cljs.core.Keyword(null,"col","col",-1959363084),cljs.tools.reader.reader_types.get_column_number.call(null,rdr));
} else {
return details;
}
});
/**
* Throw an ex-info error.
*/
cljs.tools.reader.impl.errors.throw_ex = (function cljs$tools$reader$impl$errors$throw_ex(var_args){
var args__36784__auto__ = [];
var len__36777__auto___44222 = arguments.length;
var i__36778__auto___44223 = (0);
while(true){
if((i__36778__auto___44223 < len__36777__auto___44222)){
args__36784__auto__.push((arguments[i__36778__auto___44223]));
var G__44224 = (i__36778__auto___44223 + (1));
i__36778__auto___44223 = G__44224;
continue;
} else {
}
break;
}
var argseq__36785__auto__ = ((((2) < args__36784__auto__.length))?(new cljs.core.IndexedSeq(args__36784__auto__.slice((2)),(0),null)):null);
return cljs.tools.reader.impl.errors.throw_ex.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__36785__auto__);
});
cljs.tools.reader.impl.errors.throw_ex.cljs$core$IFn$_invoke$arity$variadic = (function (rdr,ex_type,msg){
var details = cljs.tools.reader.impl.errors.ex_details.call(null,rdr,ex_type);
var file = new cljs.core.Keyword(null,"file","file",-1269645878).cljs$core$IFn$_invoke$arity$1(details);
var line = new cljs.core.Keyword(null,"line","line",212345235).cljs$core$IFn$_invoke$arity$1(details);
var col = new cljs.core.Keyword(null,"col","col",-1959363084).cljs$core$IFn$_invoke$arity$1(details);
var msg1 = (cljs.core.truth_(file)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(file)," "].join(''):null);
var msg2 = (cljs.core.truth_(line)?["[line ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(line),", col ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(col),"]"].join(''):null);
var msg3 = (cljs.core.truth_((function (){var or__35498__auto__ = msg1;
if(cljs.core.truth_(or__35498__auto__)){
return or__35498__auto__;
} else {
return msg2;
}
})())?" ":null);
var full_msg = cljs.core.apply.call(null,cljs.core.str,msg1,msg2,msg3,msg);
throw cljs.core.ex_info.call(null,full_msg,details);
});
cljs.tools.reader.impl.errors.throw_ex.cljs$lang$maxFixedArity = (2);
cljs.tools.reader.impl.errors.throw_ex.cljs$lang$applyTo = (function (seq44219){
var G__44220 = cljs.core.first.call(null,seq44219);
var seq44219__$1 = cljs.core.next.call(null,seq44219);
var G__44221 = cljs.core.first.call(null,seq44219__$1);
var seq44219__$2 = cljs.core.next.call(null,seq44219__$1);
return cljs.tools.reader.impl.errors.throw_ex.cljs$core$IFn$_invoke$arity$variadic(G__44220,G__44221,seq44219__$2);
});
/**
* Throws an ExceptionInfo with the given message.
* If rdr is an IndexingReader, additional information about column and line number is provided
*/
cljs.tools.reader.impl.errors.reader_error = (function cljs$tools$reader$impl$errors$reader_error(var_args){
var args__36784__auto__ = [];
var len__36777__auto___44227 = arguments.length;
var i__36778__auto___44228 = (0);
while(true){
if((i__36778__auto___44228 < len__36777__auto___44227)){
args__36784__auto__.push((arguments[i__36778__auto___44228]));
var G__44229 = (i__36778__auto___44228 + (1));
i__36778__auto___44228 = G__44229;
continue;
} else {
}
break;
}
var argseq__36785__auto__ = ((((1) < args__36784__auto__.length))?(new cljs.core.IndexedSeq(args__36784__auto__.slice((1)),(0),null)):null);
return cljs.tools.reader.impl.errors.reader_error.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__36785__auto__);
});
cljs.tools.reader.impl.errors.reader_error.cljs$core$IFn$_invoke$arity$variadic = (function (rdr,msgs){
return cljs.tools.reader.impl.errors.throw_ex.call(null,rdr,new cljs.core.Keyword(null,"reader-error","reader-error",1610253121),cljs.core.apply.call(null,cljs.core.str,msgs));
});
cljs.tools.reader.impl.errors.reader_error.cljs$lang$maxFixedArity = (1);
cljs.tools.reader.impl.errors.reader_error.cljs$lang$applyTo = (function (seq44225){
var G__44226 = cljs.core.first.call(null,seq44225);
var seq44225__$1 = cljs.core.next.call(null,seq44225);
return cljs.tools.reader.impl.errors.reader_error.cljs$core$IFn$_invoke$arity$variadic(G__44226,seq44225__$1);
});
/**
* Throws an ExceptionInfo with the given message.
* If rdr is an IndexingReader, additional information about column and line number is provided
*/
cljs.tools.reader.impl.errors.illegal_arg_error = (function cljs$tools$reader$impl$errors$illegal_arg_error(var_args){
var args__36784__auto__ = [];
var len__36777__auto___44232 = arguments.length;
var i__36778__auto___44233 = (0);
while(true){
if((i__36778__auto___44233 < len__36777__auto___44232)){
args__36784__auto__.push((arguments[i__36778__auto___44233]));
var G__44234 = (i__36778__auto___44233 + (1));
i__36778__auto___44233 = G__44234;
continue;
} else {
}
break;
}
var argseq__36785__auto__ = ((((1) < args__36784__auto__.length))?(new cljs.core.IndexedSeq(args__36784__auto__.slice((1)),(0),null)):null);
return cljs.tools.reader.impl.errors.illegal_arg_error.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__36785__auto__);
});
cljs.tools.reader.impl.errors.illegal_arg_error.cljs$core$IFn$_invoke$arity$variadic = (function (rdr,msgs){
return cljs.tools.reader.impl.errors.throw_ex.call(null,rdr,new cljs.core.Keyword(null,"illegal-argument","illegal-argument",-1845493170),cljs.core.apply.call(null,cljs.core.str,msgs));
});
cljs.tools.reader.impl.errors.illegal_arg_error.cljs$lang$maxFixedArity = (1);
cljs.tools.reader.impl.errors.illegal_arg_error.cljs$lang$applyTo = (function (seq44230){
var G__44231 = cljs.core.first.call(null,seq44230);
var seq44230__$1 = cljs.core.next.call(null,seq44230);
return cljs.tools.reader.impl.errors.illegal_arg_error.cljs$core$IFn$_invoke$arity$variadic(G__44231,seq44230__$1);
});
/**
* Throws an ExceptionInfo with the given message.
* If rdr is an IndexingReader, additional information about column and line number is provided
*/
cljs.tools.reader.impl.errors.eof_error = (function cljs$tools$reader$impl$errors$eof_error(var_args){
var args__36784__auto__ = [];
var len__36777__auto___44237 = arguments.length;
var i__36778__auto___44238 = (0);
while(true){
if((i__36778__auto___44238 < len__36777__auto___44237)){
args__36784__auto__.push((arguments[i__36778__auto___44238]));
var G__44239 = (i__36778__auto___44238 + (1));
i__36778__auto___44238 = G__44239;
continue;
} else {
}
break;
}
var argseq__36785__auto__ = ((((1) < args__36784__auto__.length))?(new cljs.core.IndexedSeq(args__36784__auto__.slice((1)),(0),null)):null);
return cljs.tools.reader.impl.errors.eof_error.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__36785__auto__);
});
cljs.tools.reader.impl.errors.eof_error.cljs$core$IFn$_invoke$arity$variadic = (function (rdr,msgs){
return cljs.tools.reader.impl.errors.throw_ex.call(null,rdr,new cljs.core.Keyword(null,"eof","eof",-489063237),cljs.core.apply.call(null,cljs.core.str,msgs));
});
cljs.tools.reader.impl.errors.eof_error.cljs$lang$maxFixedArity = (1);
cljs.tools.reader.impl.errors.eof_error.cljs$lang$applyTo = (function (seq44235){
var G__44236 = cljs.core.first.call(null,seq44235);
var seq44235__$1 = cljs.core.next.call(null,seq44235);
return cljs.tools.reader.impl.errors.eof_error.cljs$core$IFn$_invoke$arity$variadic(G__44236,seq44235__$1);
});
cljs.tools.reader.impl.errors.throw_eof_delimited = (function cljs$tools$reader$impl$errors$throw_eof_delimited(var_args){
var G__44241 = arguments.length;
switch (G__44241) {
case 4:
return cljs.tools.reader.impl.errors.throw_eof_delimited.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
case 5:
return cljs.tools.reader.impl.errors.throw_eof_delimited.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.impl.errors.throw_eof_delimited.cljs$core$IFn$_invoke$arity$4 = (function (rdr,kind,column,line){
return cljs.tools.reader.impl.errors.throw_eof_delimited.call(null,rdr,kind,line,column,null);
});
cljs.tools.reader.impl.errors.throw_eof_delimited.cljs$core$IFn$_invoke$arity$5 = (function (rdr,kind,line,column,n){
return cljs.tools.reader.impl.errors.eof_error.call(null,rdr,"Unexpected EOF while reading ",(cljs.core.truth_(n)?["item ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(n)," of "].join(''):null),cljs.core.name.call(null,kind),(cljs.core.truth_(line)?[", starting at line ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(line)," and column ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(column)].join(''):null),".");
});
cljs.tools.reader.impl.errors.throw_eof_delimited.cljs$lang$maxFixedArity = 5;
cljs.tools.reader.impl.errors.throw_odd_map = (function cljs$tools$reader$impl$errors$throw_odd_map(rdr,line,col,elements){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"The map literal starting with ",cljs.tools.reader.impl.inspect.inspect.call(null,cljs.core.first.call(null,elements)),(cljs.core.truth_(line)?[" on line ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(line)," column ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(col)].join(''):null)," contains ",cljs.core.count.call(null,elements)," form(s). Map literals must contain an even number of forms.");
});
cljs.tools.reader.impl.errors.throw_invalid_number = (function cljs$tools$reader$impl$errors$throw_invalid_number(rdr,token){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid number: ",token,".");
});
cljs.tools.reader.impl.errors.throw_invalid_unicode_literal = (function cljs$tools$reader$impl$errors$throw_invalid_unicode_literal(rdr,token){
throw cljs.tools.reader.impl.errors.illegal_arg_error.call(null,rdr,"Invalid unicode literal: \\",token,".");
});
cljs.tools.reader.impl.errors.throw_invalid_unicode_escape = (function cljs$tools$reader$impl$errors$throw_invalid_unicode_escape(rdr,ch){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid unicode escape: \\u",ch,".");
});
cljs.tools.reader.impl.errors.throw_invalid = (function cljs$tools$reader$impl$errors$throw_invalid(rdr,kind,token){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid ",cljs.core.name.call(null,kind),": ",token,".");
});
cljs.tools.reader.impl.errors.throw_eof_at_start = (function cljs$tools$reader$impl$errors$throw_eof_at_start(rdr,kind){
return cljs.tools.reader.impl.errors.eof_error.call(null,rdr,"Unexpected EOF while reading start of ",cljs.core.name.call(null,kind),".");
});
cljs.tools.reader.impl.errors.throw_bad_char = (function cljs$tools$reader$impl$errors$throw_bad_char(rdr,kind,ch){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid character: ",ch," found while reading ",cljs.core.name.call(null,kind),".");
});
cljs.tools.reader.impl.errors.throw_eof_at_dispatch = (function cljs$tools$reader$impl$errors$throw_eof_at_dispatch(rdr){
return cljs.tools.reader.impl.errors.eof_error.call(null,rdr,"Unexpected EOF while reading dispatch character.");
});
cljs.tools.reader.impl.errors.throw_bad_dispatch = (function cljs$tools$reader$impl$errors$throw_bad_dispatch(rdr,ch){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"No dispatch macro for ",ch,".");
});
cljs.tools.reader.impl.errors.throw_unmatch_delimiter = (function cljs$tools$reader$impl$errors$throw_unmatch_delimiter(rdr,ch){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Unmatched delimiter ",ch,".");
});
cljs.tools.reader.impl.errors.throw_eof_reading = (function cljs$tools$reader$impl$errors$throw_eof_reading(var_args){
var args__36784__auto__ = [];
var len__36777__auto___44247 = arguments.length;
var i__36778__auto___44248 = (0);
while(true){
if((i__36778__auto___44248 < len__36777__auto___44247)){
args__36784__auto__.push((arguments[i__36778__auto___44248]));
var G__44249 = (i__36778__auto___44248 + (1));
i__36778__auto___44248 = G__44249;
continue;
} else {
}
break;
}
var argseq__36785__auto__ = ((((2) < args__36784__auto__.length))?(new cljs.core.IndexedSeq(args__36784__auto__.slice((2)),(0),null)):null);
return cljs.tools.reader.impl.errors.throw_eof_reading.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__36785__auto__);
});
cljs.tools.reader.impl.errors.throw_eof_reading.cljs$core$IFn$_invoke$arity$variadic = (function (rdr,kind,start){
var init = (function (){var G__44246 = kind;
var G__44246__$1 = (((G__44246 instanceof cljs.core.Keyword))?G__44246.fqn:null);
switch (G__44246__$1) {
case "regex":
return "#\"";
break;
case "string":
return "\"";
break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__44246__$1)].join('')));
}
})();
return cljs.tools.reader.impl.errors.eof_error.call(null,rdr,"Unexpected EOF reading ",cljs.core.name.call(null,kind)," starting ",cljs.core.apply.call(null,cljs.core.str,init,start),".");
});
cljs.tools.reader.impl.errors.throw_eof_reading.cljs$lang$maxFixedArity = (2);
cljs.tools.reader.impl.errors.throw_eof_reading.cljs$lang$applyTo = (function (seq44243){
var G__44244 = cljs.core.first.call(null,seq44243);
var seq44243__$1 = cljs.core.next.call(null,seq44243);
var G__44245 = cljs.core.first.call(null,seq44243__$1);
var seq44243__$2 = cljs.core.next.call(null,seq44243__$1);
return cljs.tools.reader.impl.errors.throw_eof_reading.cljs$core$IFn$_invoke$arity$variadic(G__44244,G__44245,seq44243__$2);
});
cljs.tools.reader.impl.errors.throw_no_dispatch = (function cljs$tools$reader$impl$errors$throw_no_dispatch(rdr,ch){
return cljs.tools.reader.impl.errors.throw_bad_dispatch.call(null,rdr,ch);
});
cljs.tools.reader.impl.errors.throw_invalid_unicode_char = (function cljs$tools$reader$impl$errors$throw_invalid_unicode_char(rdr,token){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid unicode character \\",token,".");
});
cljs.tools.reader.impl.errors.throw_invalid_unicode_digit_in_token = (function cljs$tools$reader$impl$errors$throw_invalid_unicode_digit_in_token(rdr,ch,token){
return cljs.tools.reader.impl.errors.illegal_arg_error.call(null,rdr,"Invalid digit ",ch," in unicode character \\",token,".");
});
cljs.tools.reader.impl.errors.throw_invalid_unicode_digit = (function cljs$tools$reader$impl$errors$throw_invalid_unicode_digit(rdr,ch){
return cljs.tools.reader.impl.errors.illegal_arg_error.call(null,rdr,"Invalid digit ",ch," in unicode character.");
});
cljs.tools.reader.impl.errors.throw_invalid_unicode_len = (function cljs$tools$reader$impl$errors$throw_invalid_unicode_len(rdr,actual,expected){
return cljs.tools.reader.impl.errors.illegal_arg_error.call(null,rdr,"Invalid unicode literal. Unicode literals should be ",expected,"characters long. ","value suppled is ",actual,"characters long.");
});
cljs.tools.reader.impl.errors.throw_invalid_character_literal = (function cljs$tools$reader$impl$errors$throw_invalid_character_literal(rdr,token){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid character literal \\u",token,".");
});
cljs.tools.reader.impl.errors.throw_invalid_octal_len = (function cljs$tools$reader$impl$errors$throw_invalid_octal_len(rdr,token){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid octal escape sequence in a character literal:",token,". Octal escape sequences must be 3 or fewer digits.");
});
cljs.tools.reader.impl.errors.throw_bad_octal_number = (function cljs$tools$reader$impl$errors$throw_bad_octal_number(rdr){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Octal escape sequence must be in range [0, 377].");
});
cljs.tools.reader.impl.errors.throw_unsupported_character = (function cljs$tools$reader$impl$errors$throw_unsupported_character(rdr,token){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Unsupported character: ",token,".");
});
cljs.tools.reader.impl.errors.throw_eof_in_character = (function cljs$tools$reader$impl$errors$throw_eof_in_character(rdr){
return cljs.tools.reader.impl.errors.eof_error.call(null,rdr,"Unexpected EOF while reading character.");
});
cljs.tools.reader.impl.errors.throw_bad_escape_char = (function cljs$tools$reader$impl$errors$throw_bad_escape_char(rdr,ch){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Unsupported escape character: \\",ch,".");
});
cljs.tools.reader.impl.errors.throw_single_colon = (function cljs$tools$reader$impl$errors$throw_single_colon(rdr){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"A single colon is not a valid keyword.");
});
cljs.tools.reader.impl.errors.throw_bad_metadata = (function cljs$tools$reader$impl$errors$throw_bad_metadata(rdr,x){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Metadata cannot be ",cljs.tools.reader.impl.inspect.inspect.call(null,x),". Metadata must be a Symbol, Keyword, String or Map.");
});
cljs.tools.reader.impl.errors.throw_bad_metadata_target = (function cljs$tools$reader$impl$errors$throw_bad_metadata_target(rdr,target){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Metadata can not be applied to ",cljs.tools.reader.impl.inspect.inspect.call(null,target),". ","Metadata can only be applied to IMetas.");
});
cljs.tools.reader.impl.errors.throw_feature_not_keyword = (function cljs$tools$reader$impl$errors$throw_feature_not_keyword(rdr,feature){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Feature cannot be ",cljs.tools.reader.impl.inspect.inspect.call(null,feature)," Features must be keywords.");
});
cljs.tools.reader.impl.errors.throw_ns_map_no_map = (function cljs$tools$reader$impl$errors$throw_ns_map_no_map(rdr,ns_name){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Namespaced map with namespace ",ns_name," does not specify a map.");
});
cljs.tools.reader.impl.errors.throw_bad_ns = (function cljs$tools$reader$impl$errors$throw_bad_ns(rdr,ns_name){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid value used as namespace in namespaced map: ",ns_name,".");
});
cljs.tools.reader.impl.errors.throw_bad_reader_tag = (function cljs$tools$reader$impl$errors$throw_bad_reader_tag(rdr,tag){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"Invalid reader tag: ",cljs.tools.reader.impl.inspect.inspect.call(null,tag),". Reader tags must be symbols.");
});
cljs.tools.reader.impl.errors.throw_unknown_reader_tag = (function cljs$tools$reader$impl$errors$throw_unknown_reader_tag(rdr,tag){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,"No reader function for tag ",cljs.tools.reader.impl.inspect.inspect.call(null,tag),".");
});
cljs.tools.reader.impl.errors.duplicate_keys_error = (function cljs$tools$reader$impl$errors$duplicate_keys_error(msg,coll){
var duplicates = (function cljs$tools$reader$impl$errors$duplicate_keys_error_$_duplicates(seq){
var iter__36380__auto__ = (function cljs$tools$reader$impl$errors$duplicate_keys_error_$_duplicates_$_iter__44261(s__44262){
return (new cljs.core.LazySeq(null,(function (){
var s__44262__$1 = s__44262;
while(true){
var temp__5457__auto__ = cljs.core.seq.call(null,s__44262__$1);
if(temp__5457__auto__){
var s__44262__$2 = temp__5457__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__44262__$2)){
var c__36378__auto__ = cljs.core.chunk_first.call(null,s__44262__$2);
var size__36379__auto__ = cljs.core.count.call(null,c__36378__auto__);
var b__44264 = cljs.core.chunk_buffer.call(null,size__36379__auto__);
if((function (){var i__44263 = (0);
while(true){
if((i__44263 < size__36379__auto__)){
var vec__44265 = cljs.core._nth.call(null,c__36378__auto__,i__44263);
var id = cljs.core.nth.call(null,vec__44265,(0),null);
var freq = cljs.core.nth.call(null,vec__44265,(1),null);
if((freq > (1))){
cljs.core.chunk_append.call(null,b__44264,id);
var G__44271 = (i__44263 + (1));
i__44263 = G__44271;
continue;
} else {
var G__44272 = (i__44263 + (1));
i__44263 = G__44272;
continue;
}
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__44264),cljs$tools$reader$impl$errors$duplicate_keys_error_$_duplicates_$_iter__44261.call(null,cljs.core.chunk_rest.call(null,s__44262__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__44264),null);
}
} else {
var vec__44268 = cljs.core.first.call(null,s__44262__$2);
var id = cljs.core.nth.call(null,vec__44268,(0),null);
var freq = cljs.core.nth.call(null,vec__44268,(1),null);
if((freq > (1))){
return cljs.core.cons.call(null,id,cljs$tools$reader$impl$errors$duplicate_keys_error_$_duplicates_$_iter__44261.call(null,cljs.core.rest.call(null,s__44262__$2)));
} else {
var G__44273 = cljs.core.rest.call(null,s__44262__$2);
s__44262__$1 = G__44273;
continue;
}
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__36380__auto__.call(null,cljs.core.frequencies.call(null,seq));
});
var dups = duplicates.call(null,coll);
return cljs.core.apply.call(null,cljs.core.str,msg,(((cljs.core.count.call(null,dups) > (1)))?"s":null),": ",cljs.core.interpose.call(null,", ",dups));
});
cljs.tools.reader.impl.errors.throw_dup_keys = (function cljs$tools$reader$impl$errors$throw_dup_keys(rdr,kind,ks){
return cljs.tools.reader.impl.errors.reader_error.call(null,rdr,cljs.tools.reader.impl.errors.duplicate_keys_error.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(clojure.string.capitalize.call(null,cljs.core.name.call(null,kind)))," literal contains duplicate key"].join(''),ks));
});
cljs.tools.reader.impl.errors.throw_eof_error = (function cljs$tools$reader$impl$errors$throw_eof_error(rdr,line){
if(cljs.core.truth_(line)){
return cljs.tools.reader.impl.errors.eof_error.call(null,rdr,"EOF while reading, starting at line ",line,".");
} else {
return cljs.tools.reader.impl.errors.eof_error.call(null,rdr,"EOF while reading.");
}
});
//# sourceMappingURL=errors.js.map?rel=1517021946468
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/tools\/reader\/impl\/errors.js","sources":["errors.cljs?rel=1517021946470"],"lineCount":413,"mappings":";AAQA;;;;;AAKA,2CAAA,3CAAOA,8FACJC,IAAIC;AADP,AAEE,cAAA,2CAAA,qDAAA,8EAAA,xLAAMC,mPACkBD;AADxB,AAEE,oBAAI,AAACE,gEAAuBH;AAC1B,yCAAA,kHAAA,kHAAA,tQAACI,0BACAF,8DACM,AAACG,uDAAoBL,yDACrB,AAACM,yDAAsBN,yDACxB,AAACO,2DAAwBP;;AAC\/BE;;;AAEN,AAAA;;;yCAAA,iDAAAM,1FAAOM;AAAP,AAAA,IAAAL,sBAAA;AAAA,AAAA,IAAAC,2BAAA,AAAA;AAAA,AAAA,IAAAC,yBAAA;;AAAA,AAAA,GAAA,CAAAA,yBAAAD;AAAA,AAAA,AAAAD,yBAAA,CAAA,UAAAE;;AAAA,eAAA,CAAAA,yBAAA;;;;AAAA;;;;AAAA,IAAAC,wBAAA,EAAA,CAAA,MAAA,AAAAH,6BAAA,AAAA,KAAAI,qBAAA,AAAAJ,0BAAA,KAAA,IAAA,OAAA;AAAA,AAAA,OAAAK,4EAAA,CAAA,UAAA,MAAA,CAAA,UAAA,MAAAF;;;AAAA,AAAA,AAAA,AAAAE,8EAAA,WAEGd,IAAIC,QAAUmB;AAFjB,AAGE,IAAMlB,UAAQ,AAACH,mDAAWC,IAAIC;IACxBoB,OAAK,AAAA,oFAAOnB;IACZoB,OAAK,AAAA,kFAAOpB;IACZqB,MAAI,AAAA,kFAAMrB;IACVsB,OAAK,yFAAA,vEAAIH,MAAK,mDAAA,NAAKA;IACnBI,OAAK,4JAAA,1IAAIH,MAAK,CAAA,2DAAA,0DAAA,hEAAcA,2DAAcC;IAC1CG,O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AsD;;AAGJ,6DAAA,7DAAME,kIAA8BxD,IAAIyD;AAAxC,AACE,gEAAA,iCAAA,1FAACzB,qDACAhC,kCAEAyD;;AAGH,8CAAA,9CAAMC,oGAAe1D,IAAI6C,KAAKS;AAA9B,AACE,gEAAA,0CAAA,WAAA,9GAACtB,qDAAahC,eAAe,AAACgD,yBAAKH,WAAWS;;AAEhD,mDAAA,nDAAMK,8GAAoB3D,IAAI6C;AAA9B,AACE,6DAAA,wEAAA,9HAACN,kDAAUvC,6CAA6C,AAACgD,yBAAKH;;AAEhE,+CAAA,\/CAAMe,sGAAgB5D,IAAI6C,KAAKY;AAA\/B,AACE,gEAAA,yBAAA,uDAAA,zIAACzB,qDAAahC,0BAA0ByD,2BAA2B,AAACT,yBAAKH;;AAE3E,sDAAA,tDAAMgB,oHAAuB7D;AAA7B,AACE,6DAAA,tDAACuC,kDAAUvC;;AAEb,mDAAA,nDAAM8D,8GAAoB9D,IAAIyD;AAA9B,AACE,gEAAA,4BAAA,rFAACzB,qDAAahC,6BAA6ByD;;AAE7C,wDAAA,xDAAMM,wHAAyB\/D,IAAIyD;AAAnC,AACE,gEAAA,0BAAA,nFAACzB,qDAAahC,2BAA2ByD;;AAE3C,AAAA,kDAAA,0DAAAjD,5GAAMwD;AAAN,AAAA,IAAAvD,sBAAA;AAAA,AAAA,IAAAC,2BAAA,AAAA;AAAA,AAAA,IAAAC,yBAAA;;AAAA,AAAA,GAAA,CAAAA,yBAAAD;AAAA,AAAA,AAAAD,yBAAA,CAAA,UAAAE;;AAAA,eAAA,CAAAA,yBAAA;;;;AAAA;;;;AALine truncated
@@ -0,0 +1,90 @@
;; Copyright (c) Russ Olsen, Nicola Mometto, Rich Hickey & contributors.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.tools.reader.impl.inspect)
(declare inspect*)
(defn- inspect*-col [truncate col start end]
(let [n (count col)
l (if truncate 0 (min 10 n))
elements (map (partial inspect* true) (take l col))
content (apply str (interpose " " elements))
suffix (if (< l n) "...")]
(str start content suffix end)))
(defn- dispatch-inspect
[_ x]
(cond
(nil? x) :nil
(string? x) :string
(keyword? x) :strable
(number? x) :strable
(symbol? x) :strable
(vector? x) :vector
(list? x) :list
(map? x) :map
(set? x) :set
(= x true) :strable
(= x false) :strable
:default (type x)))
(defmulti inspect* dispatch-inspect)
(defmethod inspect* :string [truncate ^String x]
(let [n (if truncate 5 20)
suffix (if (> (.-length x) n) "...\"" "\"")]
(str
\"
(.substring ^String x 0 (min n (.-length x)))
suffix)))
(defmethod inspect* :strable [truncate x] (str x))
(defmethod inspect* cljs.coreIndexedSeq [truncate x]
"<indexed seq>")
(defmethod inspect* cljs.core/PersistentArrayMapSeq [truncate x]
"<map seq>")
(defmethod inspect* cljs.core/NodeSeq [truncate x]
"<map seq>")
(defmethod inspect* cljs.core/Cons [truncate x] "<cons>")
(defmethod inspect* cljs.core/LazySeq [truncate x] "<lazy seq>")
(defmethod inspect* :nil [_ _] "nil")
(defmethod inspect* :list [truncate col]
(inspect*-col truncate col \( \)))
(defmethod inspect* :map [truncate m]
(let [len (count m)
n-shown (if truncate 0 len)
contents (apply concat (take n-shown m))
suffix (if (> len n-shown) "...}" \})]
(inspect*-col truncate contents \{ suffix)))
(defmethod inspect* :set [truncate col]
(inspect*-col truncate col "#{" \}))
(defmethod inspect* :vector [truncate col]
(inspect*-col truncate col \[ \]))
(defmethod inspect* :default [truncate x]
(pr-str (type x)))
(defn inspect
"Return a string description of the value supplied.
May be the a string version of the value itself (e.g. \"true\")
or it may be a description (e.g. \"an instance of Foo\").
If truncate is true then return a very terse version of
the inspection."
([x] (inspect* false x))
([truncate x] (inspect* truncate x)))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}}, :use-macros {}, :excludes #{}, :name cljs.tools.reader.impl.inspect, :imports nil, :requires nil, :cljs.spec/speced-vars [], :uses nil, :defs {inspect* {:name cljs.tools.reader.impl.inspect/inspect*, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/inspect.cljs", :line 37, :column 1, :end-line 37, :end-column 19, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/inspect.cljs", :line 37, :column 11, :end-line 37, :end-column 19}, :tag cljs.core/MultiFn}, inspect*-col {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/inspect.cljs", :line 13, :column 8, :end-line 13, :end-column 20, :private true, :arglists (quote ([truncate col start end]))}, :private true, :name cljs.tools.reader.impl.inspect/inspect*-col, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/inspect.cljs", :end-column 20, :method-params ([truncate col start end]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 13, :end-line 13, :max-fixed-arity 4, :fn-var true, :arglists (quote ([truncate col start end]))}, dispatch-inspect {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/inspect.cljs", :line 21, :column 8, :end-line 21, :end-column 24, :private true, :arglists (quote ([_ x]))}, :private true, :name cljs.tools.reader.impl.inspect/dispatch-inspect, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/inspect.cljs", :end-column 24, :method-params ([_ x]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 21, :end-line 21, :max-fixed-arity 2, :fn-var true, :arglists (quote ([_ x]))}, inspect {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/inspect.cljs", :line 83, :column 7, :end-line 83, :end-column 14, :arglists (quote ([x] [truncate x])), :doc "Return a string description of the value supplied.\n May be the a string version of the value itself (e.g. \"true\")\n or it may be a description (e.g. \"an instance of Foo\").\n If truncate is true then return a very terse version of\n the inspection.", :top-fn {:variadic false, :max-fixed-arity 2, :method-params ([x] [truncate x]), :arglists ([x] [truncate x]), :arglists-meta (nil nil)}}, :name cljs.tools.reader.impl.inspect/inspect, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/inspect.cljs", :end-column 14, :top-fn {:variadic false, :max-fixed-arity 2, :method-params ([x] [truncate x]), :arglists ([x] [truncate x]), :arglists-meta (nil nil)}, :method-params ([x] [truncate x]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 83, :end-line 83, :max-fixed-arity 2, :fn-var true, :arglists ([x] [truncate x]), :doc "Return a string description of the value supplied.\n May be the a string version of the value itself (e.g. \"true\")\n or it may be a description (e.g. \"an instance of Foo\").\n If truncate is true then return a very terse version of\n the inspection."}}, :cljs.spec/registry-ref [], :require-macros nil, :cljs.analyzer/constants {:seen #{:default :string :vector :strable :list :nil :set :hierarchy :map}, :order [:nil :string :strable :vector :list :map :set :default :hierarchy]}, :doc nil}
@@ -0,0 +1,156 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.tools.reader.impl.inspect');
goog.require('cljs.core');
cljs.tools.reader.impl.inspect.inspect_STAR__col = (function cljs$tools$reader$impl$inspect$inspect_STAR__col(truncate,col,start,end){
var n = cljs.core.count.call(null,col);
var l = (cljs.core.truth_(truncate)?(0):(function (){var x__35857__auto__ = (10);
var y__35858__auto__ = n;
return ((x__35857__auto__ < y__35858__auto__) ? x__35857__auto__ : y__35858__auto__);
})());
var elements = cljs.core.map.call(null,cljs.core.partial.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,true),cljs.core.take.call(null,l,col));
var content = cljs.core.apply.call(null,cljs.core.str,cljs.core.interpose.call(null," ",elements));
var suffix = (((l < n))?"...":null);
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(start),cljs.core.str.cljs$core$IFn$_invoke$arity$1(content),cljs.core.str.cljs$core$IFn$_invoke$arity$1(suffix),cljs.core.str.cljs$core$IFn$_invoke$arity$1(end)].join('');
});
cljs.tools.reader.impl.inspect.dispatch_inspect = (function cljs$tools$reader$impl$inspect$dispatch_inspect(_,x){
if((x == null)){
return new cljs.core.Keyword(null,"nil","nil",99600501);
} else {
if(typeof x === 'string'){
return new cljs.core.Keyword(null,"string","string",-1989541586);
} else {
if((x instanceof cljs.core.Keyword)){
return new cljs.core.Keyword(null,"strable","strable",1877668047);
} else {
if(typeof x === 'number'){
return new cljs.core.Keyword(null,"strable","strable",1877668047);
} else {
if((x instanceof cljs.core.Symbol)){
return new cljs.core.Keyword(null,"strable","strable",1877668047);
} else {
if(cljs.core.vector_QMARK_.call(null,x)){
return new cljs.core.Keyword(null,"vector","vector",1902966158);
} else {
if(cljs.core.list_QMARK_.call(null,x)){
return new cljs.core.Keyword(null,"list","list",765357683);
} else {
if(cljs.core.map_QMARK_.call(null,x)){
return new cljs.core.Keyword(null,"map","map",1371690461);
} else {
if(cljs.core.set_QMARK_.call(null,x)){
return new cljs.core.Keyword(null,"set","set",304602554);
} else {
if(cljs.core._EQ_.call(null,x,true)){
return new cljs.core.Keyword(null,"strable","strable",1877668047);
} else {
if(cljs.core._EQ_.call(null,x,false)){
return new cljs.core.Keyword(null,"strable","strable",1877668047);
} else {
return cljs.core.type.call(null,x);
}
}
}
}
}
}
}
}
}
}
}
});
if(typeof cljs.tools.reader.impl.inspect.inspect_STAR_ !== 'undefined'){
} else {
cljs.tools.reader.impl.inspect.inspect_STAR_ = (function (){var method_table__36553__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
var prefer_table__36554__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
var method_cache__36555__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
var cached_hierarchy__36556__auto__ = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
var hierarchy__36557__auto__ = cljs.core.get.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"hierarchy","hierarchy",-1053470341),cljs.core.get_global_hierarchy.call(null));
return (new cljs.core.MultiFn(cljs.core.symbol.call(null,"cljs.tools.reader.impl.inspect","inspect*"),cljs.tools.reader.impl.inspect.dispatch_inspect,new cljs.core.Keyword(null,"default","default",-1987822328),hierarchy__36557__auto__,method_table__36553__auto__,prefer_table__36554__auto__,method_cache__36555__auto__,cached_hierarchy__36556__auto__));
})();
}
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,new cljs.core.Keyword(null,"string","string",-1989541586),(function (truncate,x){
var n = (cljs.core.truth_(truncate)?(5):(20));
var suffix = (((x.length > n))?"...\"":"\"");
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1("\""),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x.substring((0),(function (){var x__35857__auto__ = n;
var y__35858__auto__ = x.length;
return ((x__35857__auto__ < y__35858__auto__) ? x__35857__auto__ : y__35858__auto__);
})())),cljs.core.str.cljs$core$IFn$_invoke$arity$1(suffix)].join('');
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,new cljs.core.Keyword(null,"strable","strable",1877668047),(function (truncate,x){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(x)].join('');
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,cljs.coreIndexedSeq,(function (truncate,x){
return "<indexed seq>";
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,cljs.core.PersistentArrayMapSeq,(function (truncate,x){
return "<map seq>";
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,cljs.core.NodeSeq,(function (truncate,x){
return "<map seq>";
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,cljs.core.Cons,(function (truncate,x){
return "<cons>";
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,cljs.core.LazySeq,(function (truncate,x){
return "<lazy seq>";
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,new cljs.core.Keyword(null,"nil","nil",99600501),(function (_,___$1){
return "nil";
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,new cljs.core.Keyword(null,"list","list",765357683),(function (truncate,col){
return cljs.tools.reader.impl.inspect.inspect_STAR__col.call(null,truncate,col,"(",")");
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,new cljs.core.Keyword(null,"map","map",1371690461),(function (truncate,m){
var len = cljs.core.count.call(null,m);
var n_shown = (cljs.core.truth_(truncate)?(0):len);
var contents = cljs.core.apply.call(null,cljs.core.concat,cljs.core.take.call(null,n_shown,m));
var suffix = (((len > n_shown))?"...}":"}");
return cljs.tools.reader.impl.inspect.inspect_STAR__col.call(null,truncate,contents,"{",suffix);
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,new cljs.core.Keyword(null,"set","set",304602554),(function (truncate,col){
return cljs.tools.reader.impl.inspect.inspect_STAR__col.call(null,truncate,col,"#{","}");
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,new cljs.core.Keyword(null,"vector","vector",1902966158),(function (truncate,col){
return cljs.tools.reader.impl.inspect.inspect_STAR__col.call(null,truncate,col,"[","]");
}));
cljs.core._add_method.call(null,cljs.tools.reader.impl.inspect.inspect_STAR_,new cljs.core.Keyword(null,"default","default",-1987822328),(function (truncate,x){
return cljs.core.pr_str.call(null,cljs.core.type.call(null,x));
}));
/**
* Return a string description of the value supplied.
* May be the a string version of the value itself (e.g. "true")
* or it may be a description (e.g. "an instance of Foo").
* If truncate is true then return a very terse version of
* the inspection.
*/
cljs.tools.reader.impl.inspect.inspect = (function cljs$tools$reader$impl$inspect$inspect(var_args){
var G__44215 = arguments.length;
switch (G__44215) {
case 1:
return cljs.tools.reader.impl.inspect.inspect.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.tools.reader.impl.inspect.inspect.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.impl.inspect.inspect.cljs$core$IFn$_invoke$arity$1 = (function (x){
return cljs.tools.reader.impl.inspect.inspect_STAR_.call(null,false,x);
});
cljs.tools.reader.impl.inspect.inspect.cljs$core$IFn$_invoke$arity$2 = (function (truncate,x){
return cljs.tools.reader.impl.inspect.inspect_STAR_.call(null,truncate,x);
});
cljs.tools.reader.impl.inspect.inspect.cljs$lang$maxFixedArity = 2;
//# sourceMappingURL=inspect.js.map?rel=1517021946396
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/tools\/reader\/impl\/inspect.js","sources":["inspect.cljs?rel=1517021946397"],"lineCount":156,"mappings":";AAQA;;AAEA,AAAA,AAEA,mDAAA,nDAAOA,8GAAcC,SAASC,IAAIC,MAAMC;AAAxC,AACE,IAAMC,IAAE,AAACC,0BAAMJ;IACTK,IAAE,4BAAA,VAAIN,cAAW,iBAAAO,mBAAA;IAAAC,mBAAQJ;AAAR,AAAA,SAAAG,mBAAAC,oBAAAD,mBAAAC;;IACjBC,WAAS,AAACC,wBAAI,yEAAA,zEAACC,4BAAQC,mDAAe,AAACC,yBAAKP,EAAEL;IAC9Ca,UAAQ,AAACC,0BAAMC,cAAI,8BAAA,9BAACC,kCAAcR;IAClCS,SAAO,WAAA,MAAA,fAAI,CAAGZ,IAAEF;AAJtB,AAKE,oDAAKF,mDAAMY,qDAAQI,oDAAOf;;AAE9B,kDAAA,lDAAOgB,4GACJC,EAAEC;AADL,AAEE,GACC,MAAA,LAAMA;AADP;;AAAA,GAEC,OAASA;AAFV;;AAAA,GAGC,cAAAC,bAAUD;AAHX;;AAAA,GAIC,OAASA;AAJV;;AAAA,GAKC,cAAAE,bAASF;AALV;;AAAA,GAMC,AAAC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EAAMiC,kFAOFtD,SAASqB;AAPb,AAOgB,OAACT,uDAASZ,SAASqB;;;AAPnC,AAAA,iEAAA,jEAAMiC;;AAAN","names":["cljs.tools.reader.impl.inspect\/inspect*-col","truncate","col","start","end","n","cljs.core\/count","l","x__35857__auto__","y__35858__auto__","elements","cljs.core\/map","cljs.core\/partial","cljs.tools.reader.impl.inspect\/inspect*","cljs.core\/take","content","cljs.core\/apply","cljs.core\/str","cljs.core\/interpose","suffix","cljs.tools.reader.impl.inspect\/dispatch-inspect","_","x","cljs.core\/Keyword","cljs.core\/Symbol","cljs.core\/vector?","cljs.core\/list?","cljs.core\/map?","cljs.core\/set?","cljs.core\/=","cljs.core\/type","method-table__36553__auto__","cljs.core\/atom","prefer-table__36554__auto__","method-cache__36555__auto__","cached-hierarchy__36556__auto__","hierarchy__36557__auto__","cljs.core\/get","cljs.core\/get-global-hierarchy","cljs.core\/MultiFn","cljs.core\/symbol","cljs.core\/-add-method","cljs\/coreIndexedSeq","cljs.core\/PersistentArrayMapSeq","cljs.core\/NodeSeq","cljs.core\/Cons","cljs.core\/LazySeq","m","len","n-shown","contents","cljs.core\/concat","cljs.core\/pr-str","var_args","G__44215","cljs.tools.reader.impl.inspect\/inspect","js\/Error"]}
@@ -0,0 +1,97 @@
;; Copyright (c) Nicola Mometto, Rich Hickey & contributors.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns cljs.tools.reader.impl.utils
(:refer-clojure :exclude [char])
(:require
[clojure.string :as string]
[goog.string :as gstring]))
(defn char [x]
(when-not (nil? x)
(cljs.core/char x)))
(defn ^boolean ex-info? [ex]
(instance? cljs.core.ExceptionInfo ex))
(defrecord ReaderConditional [splicing? form])
(defn ^boolean reader-conditional?
"Return true if the value is the data representation of a reader conditional"
[value]
(instance? ReaderConditional value))
(defn reader-conditional
"Construct a data representation of a reader conditional.
If true, splicing? indicates read-cond-splicing."
[form splicing?]
(ReaderConditional. splicing? form))
(extend-protocol IPrintWithWriter
ReaderConditional
(-pr-writer [coll writer opts]
(-write writer (str "#?" (when (:splicing? coll) "@")))
(pr-writer (:form coll) writer opts)))
(def ws-rx #"[\s]")
(defn ^boolean whitespace?
"Checks whether a given character is whitespace"
[ch]
(when-not (nil? ch)
(if (identical? ch \,)
true
(.test ws-rx ch))))
(defn ^boolean numeric?
"Checks whether a given character is numeric"
[ch]
(when-not (nil? ch)
(gstring/isNumeric ch)))
(defn ^boolean newline?
"Checks whether the character is a newline"
[c]
(or (identical? \newline c)
(identical? "\n" c)
(nil? c)))
(defn desugar-meta
"Resolves syntactical sugar in metadata" ;; could be combined with some other desugar?
[f]
(cond
(keyword? f) {f true}
(symbol? f) {:tag f}
(string? f) {:tag f}
:else f))
(def last-id (atom 0))
(defn next-id
[]
(swap! last-id inc))
(defn namespace-keys [ns keys]
(for [key keys]
(if (or (symbol? key)
(keyword? key))
(let [[key-ns key-name] ((juxt namespace name) key)
->key (if (symbol? key) symbol keyword)]
(cond
(nil? key-ns)
(->key ns key-name)
(= "_" key-ns)
(->key key-name)
:else
key))
key)))
(defn second' [[a b]]
(when-not a b))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :use-macros {}, :excludes #{char}, :name cljs.tools.reader.impl.utils, :imports nil, :requires {string clojure.string, clojure.string clojure.string, gstring goog.string, goog.string goog.string}, :cljs.spec/speced-vars [], :uses nil, :defs {reader-conditional {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :line 29, :column 7, :end-line 29, :end-column 25, :arglists (quote ([form splicing?])), :doc "Construct a data representation of a reader conditional.\n If true, splicing? indicates read-cond-splicing."}, :name cljs.tools.reader.impl.utils/reader-conditional, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :end-column 25, :method-params ([form splicing?]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 29, :end-line 29, :max-fixed-arity 2, :fn-var true, :arglists (quote ([form splicing?])), :doc "Construct a data representation of a reader conditional.\n If true, splicing? indicates read-cond-splicing."}, whitespace? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :line 43, :column 16, :end-line 43, :end-column 27, :tag boolean, :arglists (quote ([ch])), :doc "Checks whether a given character is whitespace"}, :name cljs.tools.reader.impl.utils/whitespace?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :end-column 27, :method-params ([ch]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 43, :ret-tag boolean, :end-line 43, :max-fixed-arity 1, :tag boolean, :fn-var true, :arglists (quote ([ch])), :doc "Checks whether a given character is whitespace"}, last-id {:name cljs.tools.reader.impl.utils/last-id, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :line 73, :column 1, :end-line 73, :end-column 13, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :line 73, :column 6, :end-line 73, :end-column 13}, :tag any}, char {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :line 15, :column 7, :end-line 15, :end-column 11, :arglists (quote ([x]))}, :name cljs.tools.reader.impl.utils/char, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :end-column 11, :method-params ([x]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 15, :end-line 15, :max-fixed-arity 1, :fn-var true, :arglists (quote ([x]))}, numeric? {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :line 51, :column 16, :end-line 51, :end-column 24, :tag boolean, :arglists (quote ([ch])), :doc "Checks whether a given character is numeric"}, :name cljs.tools.reader.impl.utils/numeric?, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :end-column 24, :method-params ([ch]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 51, :ret-tag boolean, :end-line 51, :max-fixed-arity 1, :tag boolean, :fn-var true, :arglists (quote ([ch])), :doc "Checks whether a given character is numeric"}, ReaderConditional {:num-fields 2, :protocols #{cljs.core/IRecord cljs.core/IEquiv cljs.core/IHash cljs.core/ICollection cljs.core/ICounted cljs.core/ISeqable cljs.core/IMeta cljs.core/ICloneable cljs.core/IPrintWithWriter cljs.core/IIterable cljs.core/IWithMeta cljs.core/IAssociative cljs.core/IMap cljs.core/ILookup}, :name cljs.tools.reader.impl.utils/ReaderConditional, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :end-column 29, :type true, :column 12, :internal-ctor true, :line 22, :record true, :end-line 22, :skip-protocol-flag #{cljs.core/IRecord cljs.core/IEquiv cljs.core/IHash cljs.core/ICollection cljs.core/ICounted cljs.core/ISeqable cljs.core/IMeta cljs.core/ICloneable cljs.core/IPrintWithWriter cljs.core/IIterable cljs.core/IWithMeta cljs.core/IAssociative cljs.core/IMap cljs.core/ILookup}}, second' {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :line 96, :column 7, :end-line 96, :end-column 14, :arglists (quote ([[a b]]))}, :name cljs.tools.reader.impl.utils/second', :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :end-column 14, :method-params ([p__44193]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 96, :end-line 96, :max-fixed-arity 1, :fn-var true, :arglists (quote ([[a b]]))}, desugar-meta {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/impl/utils.cljs", :line 64, :column 7, :end-line 64, :end-column 19, :arglists (quote ([f])),Line truncated
+356
View File
@@ -0,0 +1,356 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.tools.reader.impl.utils');
goog.require('cljs.core');
goog.require('clojure.string');
goog.require('goog.string');
cljs.tools.reader.impl.utils.char$ = (function cljs$tools$reader$impl$utils$char(x){
if((x == null)){
return null;
} else {
return cljs.core.char$.call(null,x);
}
});
cljs.tools.reader.impl.utils.ex_info_QMARK_ = (function cljs$tools$reader$impl$utils$ex_info_QMARK_(ex){
return (ex instanceof cljs.core.ExceptionInfo);
});
/**
* @constructor
* @implements {cljs.core.IRecord}
* @implements {cljs.core.IEquiv}
* @implements {cljs.core.IHash}
* @implements {cljs.core.ICollection}
* @implements {cljs.core.ICounted}
* @implements {cljs.core.ISeqable}
* @implements {cljs.core.IMeta}
* @implements {cljs.core.ICloneable}
* @implements {cljs.core.IPrintWithWriter}
* @implements {cljs.core.IIterable}
* @implements {cljs.core.IWithMeta}
* @implements {cljs.core.IAssociative}
* @implements {cljs.core.IMap}
* @implements {cljs.core.ILookup}
*/
cljs.tools.reader.impl.utils.ReaderConditional = (function (splicing_QMARK_,form,__meta,__extmap,__hash){
this.splicing_QMARK_ = splicing_QMARK_;
this.form = form;
this.__meta = __meta;
this.__extmap = __extmap;
this.__hash = __hash;
this.cljs$lang$protocol_mask$partition0$ = 2229667594;
this.cljs$lang$protocol_mask$partition1$ = 139264;
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__36186__auto__,k__36187__auto__){
var self__ = this;
var this__36186__auto____$1 = this;
return this__36186__auto____$1.cljs$core$ILookup$_lookup$arity$3(null,k__36187__auto__,null);
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__36188__auto__,k44173,else__36189__auto__){
var self__ = this;
var this__36188__auto____$1 = this;
var G__44177 = k44173;
var G__44177__$1 = (((G__44177 instanceof cljs.core.Keyword))?G__44177.fqn:null);
switch (G__44177__$1) {
case "splicing?":
return self__.splicing_QMARK_;
break;
case "form":
return self__.form;
break;
default:
return cljs.core.get.call(null,self__.__extmap,k44173,else__36189__auto__);
}
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__36200__auto__,writer__36201__auto__,opts__36202__auto__){
var self__ = this;
var this__36200__auto____$1 = this;
var pr_pair__36203__auto__ = ((function (this__36200__auto____$1){
return (function (keyval__36204__auto__){
return cljs.core.pr_sequential_writer.call(null,writer__36201__auto__,cljs.core.pr_writer,""," ","",opts__36202__auto__,keyval__36204__auto__);
});})(this__36200__auto____$1))
;
return cljs.core.pr_sequential_writer.call(null,writer__36201__auto__,pr_pair__36203__auto__,"#cljs.tools.reader.impl.utils.ReaderConditional{",", ","}",opts__36202__auto__,cljs.core.concat.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"splicing?","splicing?",-428596366),self__.splicing_QMARK_],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"form","form",-1624062471),self__.form],null))], null),self__.__extmap));
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__44172){
var self__ = this;
var G__44172__$1 = this;
return (new cljs.core.RecordIter((0),G__44172__$1,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"splicing?","splicing?",-428596366),new cljs.core.Keyword(null,"form","form",-1624062471)], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator.call(null,self__.__extmap):cljs.core.nil_iter.call(null))));
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__36184__auto__){
var self__ = this;
var this__36184__auto____$1 = this;
return self__.__meta;
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__36181__auto__){
var self__ = this;
var this__36181__auto____$1 = this;
return (new cljs.tools.reader.impl.utils.ReaderConditional(self__.splicing_QMARK_,self__.form,self__.__meta,self__.__extmap,self__.__hash));
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__36190__auto__){
var self__ = this;
var this__36190__auto____$1 = this;
return (2 + cljs.core.count.call(null,self__.__extmap));
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__36182__auto__){
var self__ = this;
var this__36182__auto____$1 = this;
var h__35954__auto__ = self__.__hash;
if(!((h__35954__auto__ == null))){
return h__35954__auto__;
} else {
var h__35954__auto____$1 = ((function (h__35954__auto__,this__36182__auto____$1){
return (function (coll__36183__auto__){
return (-209062840 ^ cljs.core.hash_unordered_coll.call(null,coll__36183__auto__));
});})(h__35954__auto__,this__36182__auto____$1))
.call(null,this__36182__auto____$1);
self__.__hash = h__35954__auto____$1;
return h__35954__auto____$1;
}
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this44174,other44175){
var self__ = this;
var this44174__$1 = this;
return (!((other44175 == null))) && ((this44174__$1.constructor === other44175.constructor)) && (cljs.core._EQ_.call(null,this44174__$1.splicing_QMARK_,other44175.splicing_QMARK_)) && (cljs.core._EQ_.call(null,this44174__$1.form,other44175.form)) && (cljs.core._EQ_.call(null,this44174__$1.__extmap,other44175.__extmap));
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__36195__auto__,k__36196__auto__){
var self__ = this;
var this__36195__auto____$1 = this;
if(cljs.core.contains_QMARK_.call(null,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"splicing?","splicing?",-428596366),null,new cljs.core.Keyword(null,"form","form",-1624062471),null], null), null),k__36196__auto__)){
return cljs.core.dissoc.call(null,cljs.core._with_meta.call(null,cljs.core.into.call(null,cljs.core.PersistentArrayMap.EMPTY,this__36195__auto____$1),self__.__meta),k__36196__auto__);
} else {
return (new cljs.tools.reader.impl.utils.ReaderConditional(self__.splicing_QMARK_,self__.form,self__.__meta,cljs.core.not_empty.call(null,cljs.core.dissoc.call(null,self__.__extmap,k__36196__auto__)),null));
}
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__36193__auto__,k__36194__auto__,G__44172){
var self__ = this;
var this__36193__auto____$1 = this;
var pred__44178 = cljs.core.keyword_identical_QMARK_;
var expr__44179 = k__36194__auto__;
if(cljs.core.truth_(pred__44178.call(null,new cljs.core.Keyword(null,"splicing?","splicing?",-428596366),expr__44179))){
return (new cljs.tools.reader.impl.utils.ReaderConditional(G__44172,self__.form,self__.__meta,self__.__extmap,null));
} else {
if(cljs.core.truth_(pred__44178.call(null,new cljs.core.Keyword(null,"form","form",-1624062471),expr__44179))){
return (new cljs.tools.reader.impl.utils.ReaderConditional(self__.splicing_QMARK_,G__44172,self__.__meta,self__.__extmap,null));
} else {
return (new cljs.tools.reader.impl.utils.ReaderConditional(self__.splicing_QMARK_,self__.form,self__.__meta,cljs.core.assoc.call(null,self__.__extmap,k__36194__auto__,G__44172),null));
}
}
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__36198__auto__){
var self__ = this;
var this__36198__auto____$1 = this;
return cljs.core.seq.call(null,cljs.core.concat.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"splicing?","splicing?",-428596366),self__.splicing_QMARK_],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"form","form",-1624062471),self__.form],null))], null),self__.__extmap));
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__36185__auto__,G__44172){
var self__ = this;
var this__36185__auto____$1 = this;
return (new cljs.tools.reader.impl.utils.ReaderConditional(self__.splicing_QMARK_,self__.form,G__44172,self__.__extmap,self__.__hash));
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__36191__auto__,entry__36192__auto__){
var self__ = this;
var this__36191__auto____$1 = this;
if(cljs.core.vector_QMARK_.call(null,entry__36192__auto__)){
return this__36191__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.call(null,entry__36192__auto__,(0)),cljs.core._nth.call(null,entry__36192__auto__,(1)));
} else {
return cljs.core.reduce.call(null,cljs.core._conj,this__36191__auto____$1,entry__36192__auto__);
}
});
cljs.tools.reader.impl.utils.ReaderConditional.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"splicing?","splicing?",1211935161,null),new cljs.core.Symbol(null,"form","form",16469056,null)], null);
});
cljs.tools.reader.impl.utils.ReaderConditional.cljs$lang$type = true;
cljs.tools.reader.impl.utils.ReaderConditional.cljs$lang$ctorPrSeq = (function (this__36224__auto__){
return cljs.core._conj.call(null,cljs.core.List.EMPTY,"cljs.tools.reader.impl.utils/ReaderConditional");
});
cljs.tools.reader.impl.utils.ReaderConditional.cljs$lang$ctorPrWriter = (function (this__36224__auto__,writer__36225__auto__){
return cljs.core._write.call(null,writer__36225__auto__,"cljs.tools.reader.impl.utils/ReaderConditional");
});
cljs.tools.reader.impl.utils.__GT_ReaderConditional = (function cljs$tools$reader$impl$utils$__GT_ReaderConditional(splicing_QMARK_,form){
return (new cljs.tools.reader.impl.utils.ReaderConditional(splicing_QMARK_,form,null,null,null));
});
cljs.tools.reader.impl.utils.map__GT_ReaderConditional = (function cljs$tools$reader$impl$utils$map__GT_ReaderConditional(G__44176){
return (new cljs.tools.reader.impl.utils.ReaderConditional(new cljs.core.Keyword(null,"splicing?","splicing?",-428596366).cljs$core$IFn$_invoke$arity$1(G__44176),new cljs.core.Keyword(null,"form","form",-1624062471).cljs$core$IFn$_invoke$arity$1(G__44176),null,cljs.core.not_empty.call(null,cljs.core.dissoc.call(null,G__44176,new cljs.core.Keyword(null,"splicing?","splicing?",-428596366),new cljs.core.Keyword(null,"form","form",-1624062471))),null));
});
/**
* Return true if the value is the data representation of a reader conditional
*/
cljs.tools.reader.impl.utils.reader_conditional_QMARK_ = (function cljs$tools$reader$impl$utils$reader_conditional_QMARK_(value){
return (value instanceof cljs.tools.reader.impl.utils.ReaderConditional);
});
/**
* Construct a data representation of a reader conditional.
* If true, splicing? indicates read-cond-splicing.
*/
cljs.tools.reader.impl.utils.reader_conditional = (function cljs$tools$reader$impl$utils$reader_conditional(form,splicing_QMARK_){
return (new cljs.tools.reader.impl.utils.ReaderConditional(splicing_QMARK_,form,null,null,null));
});
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.impl.utils.ReaderConditional.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){
var coll__$1 = this;
cljs.core._write.call(null,writer,["#?",cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(new cljs.core.Keyword(null,"splicing?","splicing?",-428596366).cljs$core$IFn$_invoke$arity$1(coll__$1))?"@":null))].join(''));
return cljs.core.pr_writer.call(null,new cljs.core.Keyword(null,"form","form",-1624062471).cljs$core$IFn$_invoke$arity$1(coll__$1),writer,opts);
});
cljs.tools.reader.impl.utils.ws_rx = /[\s]/;
/**
* Checks whether a given character is whitespace
*/
cljs.tools.reader.impl.utils.whitespace_QMARK_ = (function cljs$tools$reader$impl$utils$whitespace_QMARK_(ch){
if((ch == null)){
return null;
} else {
if((ch === ",")){
return true;
} else {
return cljs.tools.reader.impl.utils.ws_rx.test(ch);
}
}
});
/**
* Checks whether a given character is numeric
*/
cljs.tools.reader.impl.utils.numeric_QMARK_ = (function cljs$tools$reader$impl$utils$numeric_QMARK_(ch){
if((ch == null)){
return null;
} else {
return goog.string.isNumeric(ch);
}
});
/**
* Checks whether the character is a newline
*/
cljs.tools.reader.impl.utils.newline_QMARK_ = (function cljs$tools$reader$impl$utils$newline_QMARK_(c){
return (("\n" === c)) || (("\n" === c)) || ((c == null));
});
/**
* Resolves syntactical sugar in metadata
*/
cljs.tools.reader.impl.utils.desugar_meta = (function cljs$tools$reader$impl$utils$desugar_meta(f){
if((f instanceof cljs.core.Keyword)){
return cljs.core.PersistentArrayMap.createAsIfByAssoc([f,true]);
} else {
if((f instanceof cljs.core.Symbol)){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"tag","tag",-1290361223),f], null);
} else {
if(typeof f === 'string'){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"tag","tag",-1290361223),f], null);
} else {
return f;
}
}
}
});
cljs.tools.reader.impl.utils.last_id = cljs.core.atom.call(null,(0));
cljs.tools.reader.impl.utils.next_id = (function cljs$tools$reader$impl$utils$next_id(){
return cljs.core.swap_BANG_.call(null,cljs.tools.reader.impl.utils.last_id,cljs.core.inc);
});
cljs.tools.reader.impl.utils.namespace_keys = (function cljs$tools$reader$impl$utils$namespace_keys(ns,keys){
var iter__36380__auto__ = (function cljs$tools$reader$impl$utils$namespace_keys_$_iter__44182(s__44183){
return (new cljs.core.LazySeq(null,(function (){
var s__44183__$1 = s__44183;
while(true){
var temp__5457__auto__ = cljs.core.seq.call(null,s__44183__$1);
if(temp__5457__auto__){
var s__44183__$2 = temp__5457__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__44183__$2)){
var c__36378__auto__ = cljs.core.chunk_first.call(null,s__44183__$2);
var size__36379__auto__ = cljs.core.count.call(null,c__36378__auto__);
var b__44185 = cljs.core.chunk_buffer.call(null,size__36379__auto__);
if((function (){var i__44184 = (0);
while(true){
if((i__44184 < size__36379__auto__)){
var key = cljs.core._nth.call(null,c__36378__auto__,i__44184);
cljs.core.chunk_append.call(null,b__44185,((((key instanceof cljs.core.Symbol)) || ((key instanceof cljs.core.Keyword)))?(function (){var vec__44186 = cljs.core.juxt.call(null,cljs.core.namespace,cljs.core.name).call(null,key);
var key_ns = cljs.core.nth.call(null,vec__44186,(0),null);
var key_name = cljs.core.nth.call(null,vec__44186,(1),null);
var __GT_key = (((key instanceof cljs.core.Symbol))?cljs.core.symbol:cljs.core.keyword);
if((key_ns == null)){
return __GT_key.call(null,ns,key_name);
} else {
if(cljs.core._EQ_.call(null,"_",key_ns)){
return __GT_key.call(null,key_name);
} else {
return key;
}
}
})():key));
var G__44192 = (i__44184 + (1));
i__44184 = G__44192;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__44185),cljs$tools$reader$impl$utils$namespace_keys_$_iter__44182.call(null,cljs.core.chunk_rest.call(null,s__44183__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__44185),null);
}
} else {
var key = cljs.core.first.call(null,s__44183__$2);
return cljs.core.cons.call(null,((((key instanceof cljs.core.Symbol)) || ((key instanceof cljs.core.Keyword)))?(function (){var vec__44189 = cljs.core.juxt.call(null,cljs.core.namespace,cljs.core.name).call(null,key);
var key_ns = cljs.core.nth.call(null,vec__44189,(0),null);
var key_name = cljs.core.nth.call(null,vec__44189,(1),null);
var __GT_key = (((key instanceof cljs.core.Symbol))?cljs.core.symbol:cljs.core.keyword);
if((key_ns == null)){
return __GT_key.call(null,ns,key_name);
} else {
if(cljs.core._EQ_.call(null,"_",key_ns)){
return __GT_key.call(null,key_name);
} else {
return key;
}
}
})():key),cljs$tools$reader$impl$utils$namespace_keys_$_iter__44182.call(null,cljs.core.rest.call(null,s__44183__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__36380__auto__.call(null,keys);
});
cljs.tools.reader.impl.utils.second_SINGLEQUOTE_ = (function cljs$tools$reader$impl$utils$second_SINGLEQUOTE_(p__44193){
var vec__44194 = p__44193;
var a = cljs.core.nth.call(null,vec__44194,(0),null);
var b = cljs.core.nth.call(null,vec__44194,(1),null);
if(cljs.core.truth_(a)){
return null;
} else {
return b;
}
});
//# sourceMappingURL=utils.js.map?rel=1517021946268
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/tools\/reader\/impl\/utils.js","sources":["utils.cljs?rel=1517021946269"],"lineCount":356,"mappings":";AAQA;;;;AAMA,qCAAA,rCAAMA,iFAAMC;AAAZ,AACE,GAAU,MAAA,LAAMA;AAAhB;;AAAA,AACE,OAACC,0BAAeD;;;AAEpB,8CAAA,9CAAeE,oGAAUC;AAAzB,AACE,sBAAWC,dAAwBD;;AAErC,AAAA,AAAA,AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,AAAA,AAAA,AAAA,6FAAA,WAAAE,oBAAAC,5HAAW0D;;AAAX,AAAA,IAAA3D,0BAAA;AAAA,AAAA,OAAAA,+DAAAC,iBAAA;;;AAAA,AAAA,AAAA,6FAAA,WAAAC,oBAAAC,OAAAC,nIAAWuD;;AAAX,AAAA,IAAAzD,0BAAA;AAAA,AAAA,IAAAG,WAAAF;IAAAE,eAAA,EAAA,CAAAA,oBAAAC,oBAAA,AAAAD,aAAA;AAAA,AAAA,QAAAA;KAAA;AAAAE;;;KAAA;AAAAC;;;;AAAA,OAAAC,wBAAAC,gBAAAP,OAAAC;;;;;AAAA,AAAA,AAAA,yGAAA,WAAAO,oBAAAC,sBAAAC,9JAAW8C;;AAAX,AAAA,IAAAhD,0BAAA;AAAA,AAAA,IAAAG,yBAAA;kBAAAC;AAAA,AAAA,OAAAC,yCAAAJ,sBAAAK,oBAAA,GAAA,IAAA,GAAAJ,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AwB,AAAC,AAACK,yBAAKLine truncated
@@ -0,0 +1,283 @@
;; Copyright (c) Nicola Mometto, Rich Hickey & contributors.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns ^{:doc "Protocols and default Reader types implementation"
:author "Bronsa"}
cljs.tools.reader.reader-types
(:refer-clojure :exclude [char read-line])
(:require [cljs.tools.reader.impl.utils :refer [char whitespace? newline?]]
[goog.string])
(:import goog.string.StringBuffer))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; reader protocols
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defprotocol Reader
(read-char [reader]
"Returns the next char from the Reader, nil if the end of stream has been reached")
(peek-char [reader]
"Returns the next char from the Reader without removing it from the reader stream"))
(defprotocol IPushbackReader
(unread [reader ch]
"Pushes back a single character on to the stream"))
(defprotocol IndexingReader
(get-line-number [reader]
"Returns the line number of the next character to be read from the stream")
(get-column-number [reader]
"Returns the column number of the next character to be read from the stream")
(get-file-name [reader]
"Returns the file name the reader is reading from, or nil"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; reader deftypes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(deftype StringReader
[s s-len ^:mutable s-pos]
Reader
(read-char [reader]
(when (> s-len s-pos)
(let [r (.charAt s s-pos)]
(set! s-pos (inc s-pos))
r)))
(peek-char [reader]
(when (> s-len s-pos)
(.charAt s s-pos))))
(deftype NodeReadableReader [readable ^:mutable buf]
Reader
(read-char [reader]
(if buf
(let [c (aget buf 0)]
(set! buf nil)
(char c))
(let [c (str (.read readable 1))]
(when c
(char c)))))
(peek-char [reader]
(when-not buf
(set! buf (str (.read readable 1))))
(when buf
(char (aget buf 0)))))
(deftype PushbackReader
[^not-native rdr buf buf-len ^:mutable buf-pos]
Reader
(read-char [reader]
(let [c (if (< buf-pos buf-len)
(aget buf buf-pos)
(read-char rdr))]
(when (< buf-pos buf-len)
(set! buf-pos (inc buf-pos)))
(char c)))
(peek-char [reader]
(let [c (if (< buf-pos buf-len)
(aget buf buf-pos)
(peek-char rdr))]
(char c)))
IPushbackReader
(unread [reader ch]
(when ch
(if (zero? buf-pos) (throw (js/Error. "Pushback buffer is full")))
(set! buf-pos (dec buf-pos))
(aset buf buf-pos ch))))
(defn- normalize-newline [^not-native rdr ch]
(if (identical? \return ch)
(let [c (peek-char rdr)]
(when (or (identical? \formfeed c)
(identical? \newline c))
(read-char rdr))
\newline)
ch))
(deftype IndexingPushbackReader
[^not-native rdr ^:mutable line ^:mutable column
^:mutable line-start? ^:mutable prev
^:mutable prev-column file-name]
Reader
(read-char [reader]
(when-let [ch (read-char rdr)]
(let [ch (normalize-newline rdr ch)]
(set! prev line-start?)
(set! line-start? (newline? ch))
(when line-start?
(set! prev-column column)
(set! column 0)
(set! line (inc line)))
(set! column (inc column))
ch)))
(peek-char [reader]
(peek-char rdr))
IPushbackReader
(unread [reader ch]
(if line-start?
(do (set! line (dec line))
(set! column prev-column))
(set! column (dec column)))
(set! line-start? prev)
(unread rdr ch))
IndexingReader
(get-line-number [reader] (int line))
(get-column-number [reader] (int column))
(get-file-name [reader] file-name))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Source Logging support
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn merge-meta
"Returns an object of the same type and value as `obj`, with its
metadata merged over `m`."
[obj m]
(let [orig-meta (meta obj)]
(with-meta obj (merge m (dissoc orig-meta :source)))))
(defn- peek-source-log
"Returns a string containing the contents of the top most source
logging frame."
[frames]
(subs (str (:buffer frames)) (first (:offset frames))))
(defn- log-source-char
"Logs `char` to all currently active source logging frames."
[frames char]
(when-let [buffer (:buffer frames)]
(.append buffer char)))
(defn- drop-last-logged-char
"Removes the last logged character from all currently active source
logging frames. Called when pushing a character back."
[frames]
(when-let [buffer (:buffer frames)]
(.set buffer (subs (str buffer) 0 (dec (.getLength buffer))))))
(deftype SourceLoggingPushbackReader
[^not-native rdr ^:mutable line ^:mutable column
^:mutable line-start? ^:mutable prev
^:mutable prev-column file-name frames]
Reader
(read-char [reader]
(when-let [ch (read-char rdr)]
(let [ch (normalize-newline rdr ch)]
(set! prev line-start?)
(set! line-start? (newline? ch))
(when line-start?
(set! prev-column column)
(set! column 0)
(set! line (inc line)))
(set! column (inc column))
(log-source-char @frames ch)
ch)))
(peek-char [reader]
(peek-char rdr))
IPushbackReader
(unread [reader ch]
(if line-start?
(do (set! line (dec line))
(set! column prev-column))
(set! column (dec column)))
(set! line-start? prev)
(when ch
(drop-last-logged-char @frames))
(unread rdr ch))
IndexingReader
(get-line-number [reader] (int line))
(get-column-number [reader] (int column))
(get-file-name [reader] file-name))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Public API
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; fast check for provided implementations
(defn indexing-reader?
"Returns true if the reader satisfies IndexingReader"
[rdr]
(implements? IndexingReader rdr))
(defn string-reader
"Creates a StringReader from a given string"
([s]
(StringReader. s (count s) 0)))
(defn string-push-back-reader
"Creates a PushbackReader from a given string"
([s]
(string-push-back-reader s 1))
([s buf-len]
(PushbackReader. (string-reader s) (object-array buf-len) buf-len buf-len)))
(defn node-readable-push-back-reader [readable]
(PushbackReader. (NodeReadableReader. readable nil) (object-array 1) 1 1))
(defn indexing-push-back-reader
"Creates an IndexingPushbackReader from a given string or PushbackReader"
([s-or-rdr]
(indexing-push-back-reader s-or-rdr 1))
([s-or-rdr buf-len]
(indexing-push-back-reader s-or-rdr buf-len nil))
([s-or-rdr buf-len file-name]
(IndexingPushbackReader.
(if (string? s-or-rdr) (string-push-back-reader s-or-rdr buf-len) s-or-rdr) 1 1 true nil 0 file-name)))
(defn source-logging-push-back-reader
"Creates a SourceLoggingPushbackReader from a given string or PushbackReader"
([s-or-rdr]
(source-logging-push-back-reader s-or-rdr 1))
([s-or-rdr buf-len]
(source-logging-push-back-reader s-or-rdr buf-len nil))
([s-or-rdr buf-len file-name]
(SourceLoggingPushbackReader.
(if (string? s-or-rdr) (string-push-back-reader s-or-rdr buf-len) s-or-rdr)
1
1
true
nil
0
file-name
(atom {:buffer (StringBuffer.) :offset '(0)}))))
(defn read-line
"Reads a line from the reader or from *in* if no reader is specified"
([^not-native rdr]
(loop [c (read-char rdr) s (StringBuffer.)]
(if (newline? c)
(str s)
(recur (read-char rdr) (.append s c))))))
(defn ^boolean source-logging-reader?
[rdr]
(instance? SourceLoggingPushbackReader rdr))
(defn ^boolean line-start?
"Returns true if rdr is an IndexingReader and the current char starts a new line"
[^not-native rdr]
(when (indexing-reader? rdr)
(== 1 (get-column-number rdr))))
(defn log-source*
[reader f]
(let [buffer (:buffer @(.-frames reader))]
(try
(swap! (.-frames reader) update-in [:offset] conj (.getLength buffer))
(let [ret (f)]
(if (implements? IMeta ret)
(merge-meta ret {:source (peek-source-log @ (.-frames reader))})
ret))
(finally
(swap! (.-frames reader) update-in [:offset] rest)))))
@@ -0,0 +1 @@
{:rename-macros {}, :renames {}, :externs {Error {}}, :use-macros {}, :excludes #{char read-line}, :name cljs.tools.reader.reader-types, :imports {StringBuffer goog.string.StringBuffer}, :requires {cljs.tools.reader.impl.utils cljs.tools.reader.impl.utils, goog.string goog.string, StringBuffer goog.string.StringBuffer}, :cljs.spec/speced-vars [], :uses {whitespace? cljs.tools.reader.impl.utils, char cljs.tools.reader.impl.utils, newline? cljs.tools.reader.impl.utils}, :defs {indexing-push-back-reader {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :line 227, :column 7, :end-line 227, :end-column 32, :arglists (quote ([s-or-rdr] [s-or-rdr buf-len] [s-or-rdr buf-len file-name])), :doc "Creates an IndexingPushbackReader from a given string or PushbackReader", :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([s-or-rdr] [s-or-rdr buf-len] [s-or-rdr buf-len file-name]), :arglists ([s-or-rdr] [s-or-rdr buf-len] [s-or-rdr buf-len file-name]), :arglists-meta (nil nil nil)}}, :name cljs.tools.reader.reader-types/indexing-push-back-reader, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :end-column 32, :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([s-or-rdr] [s-or-rdr buf-len] [s-or-rdr buf-len file-name]), :arglists ([s-or-rdr] [s-or-rdr buf-len] [s-or-rdr buf-len file-name]), :arglists-meta (nil nil nil)}, :method-params ([s-or-rdr] [s-or-rdr buf-len] [s-or-rdr buf-len file-name]), :protocol-impl nil, :arglists-meta (nil nil nil), :column 1, :line 227, :end-line 227, :max-fixed-arity 3, :fn-var true, :arglists ([s-or-rdr] [s-or-rdr buf-len] [s-or-rdr buf-len file-name]), :doc "Creates an IndexingPushbackReader from a given string or PushbackReader"}, log-source* {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :line 272, :column 7, :end-line 272, :end-column 18, :arglists (quote ([reader f]))}, :name cljs.tools.reader.reader-types/log-source*, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :end-column 18, :method-params ([reader f]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 272, :end-line 272, :max-fixed-arity 2, :fn-var true, :arglists (quote ([reader f]))}, merge-meta {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :line 139, :column 7, :end-line 139, :end-column 17, :arglists (quote ([obj m])), :doc "Returns an object of the same type and value as `obj`, with its\nmetadata merged over `m`."}, :name cljs.tools.reader.reader-types/merge-meta, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :end-column 17, :method-params ([obj m]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 139, :end-line 139, :max-fixed-arity 2, :fn-var true, :arglists (quote ([obj m])), :doc "Returns an object of the same type and value as `obj`, with its\nmetadata merged over `m`."}, PushbackReader {:num-fields 4, :protocols #{cljs.tools.reader.reader-types/Reader cljs.tools.reader.reader-types/IPushbackReader}, :name cljs.tools.reader.reader-types/PushbackReader, :file "target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :end-column 24, :type true, :column 10, :line 71, :record false, :end-line 71, :skip-protocol-flag nil}, ->StringReader {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :line 43, :column 10, :end-line 43, :end-column 22, :protocols #{cljs.tools.reader.reader-types/Reader}, :skip-protocol-flag nil, :factory :positional, :arglists (quote ([s s-len s-pos]))}, :protocols #{cljs.tools.reader.reader-types/Reader}, :name cljs.tools.reader.reader-types/->StringReader, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :end-column 22, :method-params ([s s-len s-pos]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :factory :positional, :line 43, :end-line 43, :max-fixed-arity 3, :fn-var true, :arglists (quote ([s s-len s-pos])), :skip-protocol-flag nil}, normalize-newline {:protocol-inline nil, :meta {:file "/home/didier/clojupyter/website/target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :line 93, :column 8, :end-line 93, :end-column 25, :private true, :arglists (quote ([rdr ch]))}, :private true, :name cljs.tools.reader.reader-types/normalize-newline, :variadic false, :file "target/cljsbuild/public/js/out/cljs/tools/reader/reader_types.cljs", :end-column 25, :method-params ([rdr ch]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 93, :end-line 93, :max-fixed-arity 2, :fn-var true, :arglists (quote ([rdr ch]))}, peek-source-log {:protocol-inline nil, :meta {:file "/home/didier/cLine truncated
@@ -0,0 +1,783 @@
// Compiled by ClojureScript 1.9.946 {}
goog.provide('cljs.tools.reader.reader_types');
goog.require('cljs.core');
goog.require('cljs.tools.reader.impl.utils');
goog.require('goog.string');
goog.require('goog.string.StringBuffer');
/**
* @interface
*/
cljs.tools.reader.reader_types.Reader = function(){};
/**
* Returns the next char from the Reader, nil if the end of stream has been reached
*/
cljs.tools.reader.reader_types.read_char = (function cljs$tools$reader$reader_types$read_char(reader){
if((!((reader == null))) && (!((reader.cljs$tools$reader$reader_types$Reader$read_char$arity$1 == null)))){
return reader.cljs$tools$reader$reader_types$Reader$read_char$arity$1(reader);
} else {
var x__36231__auto__ = (((reader == null))?null:reader);
var m__36232__auto__ = (cljs.tools.reader.reader_types.read_char[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,reader);
} else {
var m__36232__auto____$1 = (cljs.tools.reader.reader_types.read_char["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,reader);
} else {
throw cljs.core.missing_protocol.call(null,"Reader.read-char",reader);
}
}
}
});
/**
* Returns the next char from the Reader without removing it from the reader stream
*/
cljs.tools.reader.reader_types.peek_char = (function cljs$tools$reader$reader_types$peek_char(reader){
if((!((reader == null))) && (!((reader.cljs$tools$reader$reader_types$Reader$peek_char$arity$1 == null)))){
return reader.cljs$tools$reader$reader_types$Reader$peek_char$arity$1(reader);
} else {
var x__36231__auto__ = (((reader == null))?null:reader);
var m__36232__auto__ = (cljs.tools.reader.reader_types.peek_char[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,reader);
} else {
var m__36232__auto____$1 = (cljs.tools.reader.reader_types.peek_char["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,reader);
} else {
throw cljs.core.missing_protocol.call(null,"Reader.peek-char",reader);
}
}
}
});
/**
* @interface
*/
cljs.tools.reader.reader_types.IPushbackReader = function(){};
/**
* Pushes back a single character on to the stream
*/
cljs.tools.reader.reader_types.unread = (function cljs$tools$reader$reader_types$unread(reader,ch){
if((!((reader == null))) && (!((reader.cljs$tools$reader$reader_types$IPushbackReader$unread$arity$2 == null)))){
return reader.cljs$tools$reader$reader_types$IPushbackReader$unread$arity$2(reader,ch);
} else {
var x__36231__auto__ = (((reader == null))?null:reader);
var m__36232__auto__ = (cljs.tools.reader.reader_types.unread[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,reader,ch);
} else {
var m__36232__auto____$1 = (cljs.tools.reader.reader_types.unread["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,reader,ch);
} else {
throw cljs.core.missing_protocol.call(null,"IPushbackReader.unread",reader);
}
}
}
});
/**
* @interface
*/
cljs.tools.reader.reader_types.IndexingReader = function(){};
/**
* Returns the line number of the next character to be read from the stream
*/
cljs.tools.reader.reader_types.get_line_number = (function cljs$tools$reader$reader_types$get_line_number(reader){
if((!((reader == null))) && (!((reader.cljs$tools$reader$reader_types$IndexingReader$get_line_number$arity$1 == null)))){
return reader.cljs$tools$reader$reader_types$IndexingReader$get_line_number$arity$1(reader);
} else {
var x__36231__auto__ = (((reader == null))?null:reader);
var m__36232__auto__ = (cljs.tools.reader.reader_types.get_line_number[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,reader);
} else {
var m__36232__auto____$1 = (cljs.tools.reader.reader_types.get_line_number["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,reader);
} else {
throw cljs.core.missing_protocol.call(null,"IndexingReader.get-line-number",reader);
}
}
}
});
/**
* Returns the column number of the next character to be read from the stream
*/
cljs.tools.reader.reader_types.get_column_number = (function cljs$tools$reader$reader_types$get_column_number(reader){
if((!((reader == null))) && (!((reader.cljs$tools$reader$reader_types$IndexingReader$get_column_number$arity$1 == null)))){
return reader.cljs$tools$reader$reader_types$IndexingReader$get_column_number$arity$1(reader);
} else {
var x__36231__auto__ = (((reader == null))?null:reader);
var m__36232__auto__ = (cljs.tools.reader.reader_types.get_column_number[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,reader);
} else {
var m__36232__auto____$1 = (cljs.tools.reader.reader_types.get_column_number["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,reader);
} else {
throw cljs.core.missing_protocol.call(null,"IndexingReader.get-column-number",reader);
}
}
}
});
/**
* Returns the file name the reader is reading from, or nil
*/
cljs.tools.reader.reader_types.get_file_name = (function cljs$tools$reader$reader_types$get_file_name(reader){
if((!((reader == null))) && (!((reader.cljs$tools$reader$reader_types$IndexingReader$get_file_name$arity$1 == null)))){
return reader.cljs$tools$reader$reader_types$IndexingReader$get_file_name$arity$1(reader);
} else {
var x__36231__auto__ = (((reader == null))?null:reader);
var m__36232__auto__ = (cljs.tools.reader.reader_types.get_file_name[goog.typeOf(x__36231__auto__)]);
if(!((m__36232__auto__ == null))){
return m__36232__auto__.call(null,reader);
} else {
var m__36232__auto____$1 = (cljs.tools.reader.reader_types.get_file_name["_"]);
if(!((m__36232__auto____$1 == null))){
return m__36232__auto____$1.call(null,reader);
} else {
throw cljs.core.missing_protocol.call(null,"IndexingReader.get-file-name",reader);
}
}
}
});
/**
* @constructor
* @implements {cljs.tools.reader.reader_types.Reader}
*/
cljs.tools.reader.reader_types.StringReader = (function (s,s_len,s_pos){
this.s = s;
this.s_len = s_len;
this.s_pos = s_pos;
});
cljs.tools.reader.reader_types.StringReader.prototype.cljs$tools$reader$reader_types$Reader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.StringReader.prototype.cljs$tools$reader$reader_types$Reader$read_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
if((self__.s_len > self__.s_pos)){
var r = self__.s.charAt(self__.s_pos);
self__.s_pos = (self__.s_pos + (1));
return r;
} else {
return null;
}
});
cljs.tools.reader.reader_types.StringReader.prototype.cljs$tools$reader$reader_types$Reader$peek_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
if((self__.s_len > self__.s_pos)){
return self__.s.charAt(self__.s_pos);
} else {
return null;
}
});
cljs.tools.reader.reader_types.StringReader.getBasis = (function (){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"s","s",-948495851,null),new cljs.core.Symbol(null,"s-len","s-len",1869978331,null),cljs.core.with_meta(new cljs.core.Symbol(null,"s-pos","s-pos",-540562492,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null))], null);
});
cljs.tools.reader.reader_types.StringReader.cljs$lang$type = true;
cljs.tools.reader.reader_types.StringReader.cljs$lang$ctorStr = "cljs.tools.reader.reader-types/StringReader";
cljs.tools.reader.reader_types.StringReader.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.tools.reader.reader-types/StringReader");
});
cljs.tools.reader.reader_types.__GT_StringReader = (function cljs$tools$reader$reader_types$__GT_StringReader(s,s_len,s_pos){
return (new cljs.tools.reader.reader_types.StringReader(s,s_len,s_pos));
});
/**
* @constructor
* @implements {cljs.tools.reader.reader_types.Reader}
*/
cljs.tools.reader.reader_types.NodeReadableReader = (function (readable,buf){
this.readable = readable;
this.buf = buf;
});
cljs.tools.reader.reader_types.NodeReadableReader.prototype.cljs$tools$reader$reader_types$Reader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.NodeReadableReader.prototype.cljs$tools$reader$reader_types$Reader$read_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
if(cljs.core.truth_(self__.buf)){
var c = (self__.buf[(0)]);
self__.buf = null;
return cljs.tools.reader.impl.utils.char$.call(null,c);
} else {
var c = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.readable.read((1)))].join('');
if(cljs.core.truth_(c)){
return cljs.tools.reader.impl.utils.char$.call(null,c);
} else {
return null;
}
}
});
cljs.tools.reader.reader_types.NodeReadableReader.prototype.cljs$tools$reader$reader_types$Reader$peek_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
if(cljs.core.truth_(self__.buf)){
} else {
self__.buf = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.readable.read((1)))].join('');
}
if(cljs.core.truth_(self__.buf)){
return cljs.tools.reader.impl.utils.char$.call(null,(self__.buf[(0)]));
} else {
return null;
}
});
cljs.tools.reader.reader_types.NodeReadableReader.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"readable","readable",2113054478,null),cljs.core.with_meta(new cljs.core.Symbol(null,"buf","buf",1426618187,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null))], null);
});
cljs.tools.reader.reader_types.NodeReadableReader.cljs$lang$type = true;
cljs.tools.reader.reader_types.NodeReadableReader.cljs$lang$ctorStr = "cljs.tools.reader.reader-types/NodeReadableReader";
cljs.tools.reader.reader_types.NodeReadableReader.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.tools.reader.reader-types/NodeReadableReader");
});
cljs.tools.reader.reader_types.__GT_NodeReadableReader = (function cljs$tools$reader$reader_types$__GT_NodeReadableReader(readable,buf){
return (new cljs.tools.reader.reader_types.NodeReadableReader(readable,buf));
});
/**
* @constructor
* @implements {cljs.tools.reader.reader_types.Reader}
* @implements {cljs.tools.reader.reader_types.IPushbackReader}
*/
cljs.tools.reader.reader_types.PushbackReader = (function (rdr,buf,buf_len,buf_pos){
this.rdr = rdr;
this.buf = buf;
this.buf_len = buf_len;
this.buf_pos = buf_pos;
});
cljs.tools.reader.reader_types.PushbackReader.prototype.cljs$tools$reader$reader_types$Reader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.PushbackReader.prototype.cljs$tools$reader$reader_types$Reader$read_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
var c = (((self__.buf_pos < self__.buf_len))?(self__.buf[self__.buf_pos]):cljs.tools.reader.reader_types.read_char.call(null,self__.rdr));
if((self__.buf_pos < self__.buf_len)){
self__.buf_pos = (self__.buf_pos + (1));
} else {
}
return cljs.tools.reader.impl.utils.char$.call(null,c);
});
cljs.tools.reader.reader_types.PushbackReader.prototype.cljs$tools$reader$reader_types$Reader$peek_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
var c = (((self__.buf_pos < self__.buf_len))?(self__.buf[self__.buf_pos]):cljs.tools.reader.reader_types.peek_char.call(null,self__.rdr));
return cljs.tools.reader.impl.utils.char$.call(null,c);
});
cljs.tools.reader.reader_types.PushbackReader.prototype.cljs$tools$reader$reader_types$IPushbackReader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.PushbackReader.prototype.cljs$tools$reader$reader_types$IPushbackReader$unread$arity$2 = (function (reader,ch){
var self__ = this;
var reader__$1 = this;
if(cljs.core.truth_(ch)){
if((self__.buf_pos === (0))){
throw (new Error("Pushback buffer is full"));
} else {
}
self__.buf_pos = (self__.buf_pos - (1));
return (self__.buf[self__.buf_pos] = ch);
} else {
return null;
}
});
cljs.tools.reader.reader_types.PushbackReader.getBasis = (function (){
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null,"rdr","rdr",190007785,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"tag","tag",-1290361223),new cljs.core.Symbol(null,"not-native","not-native",-236392494,null)], null)),new cljs.core.Symbol(null,"buf","buf",1426618187,null),new cljs.core.Symbol(null,"buf-len","buf-len",404510846,null),cljs.core.with_meta(new cljs.core.Symbol(null,"buf-pos","buf-pos",-807229033,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null))], null);
});
cljs.tools.reader.reader_types.PushbackReader.cljs$lang$type = true;
cljs.tools.reader.reader_types.PushbackReader.cljs$lang$ctorStr = "cljs.tools.reader.reader-types/PushbackReader";
cljs.tools.reader.reader_types.PushbackReader.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.tools.reader.reader-types/PushbackReader");
});
cljs.tools.reader.reader_types.__GT_PushbackReader = (function cljs$tools$reader$reader_types$__GT_PushbackReader(rdr,buf,buf_len,buf_pos){
return (new cljs.tools.reader.reader_types.PushbackReader(rdr,buf,buf_len,buf_pos));
});
cljs.tools.reader.reader_types.normalize_newline = (function cljs$tools$reader$reader_types$normalize_newline(rdr,ch){
if(("\r" === ch)){
var c = cljs.tools.reader.reader_types.peek_char.call(null,rdr);
if((("\f" === c)) || (("\n" === c))){
cljs.tools.reader.reader_types.read_char.call(null,rdr);
} else {
}
return "\n";
} else {
return ch;
}
});
/**
* @constructor
* @implements {cljs.tools.reader.reader_types.IndexingReader}
* @implements {cljs.tools.reader.reader_types.Reader}
* @implements {cljs.tools.reader.reader_types.IPushbackReader}
*/
cljs.tools.reader.reader_types.IndexingPushbackReader = (function (rdr,line,column,line_start_QMARK_,prev,prev_column,file_name){
this.rdr = rdr;
this.line = line;
this.column = column;
this.line_start_QMARK_ = line_start_QMARK_;
this.prev = prev;
this.prev_column = prev_column;
this.file_name = file_name;
});
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$Reader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$Reader$read_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
var temp__5457__auto__ = cljs.tools.reader.reader_types.read_char.call(null,self__.rdr);
if(cljs.core.truth_(temp__5457__auto__)){
var ch = temp__5457__auto__;
var ch__$1 = cljs.tools.reader.reader_types.normalize_newline.call(null,self__.rdr,ch);
self__.prev = self__.line_start_QMARK_;
self__.line_start_QMARK_ = cljs.tools.reader.impl.utils.newline_QMARK_.call(null,ch__$1);
if(cljs.core.truth_(self__.line_start_QMARK_)){
self__.prev_column = self__.column;
self__.column = (0);
self__.line = (self__.line + (1));
} else {
}
self__.column = (self__.column + (1));
return ch__$1;
} else {
return null;
}
});
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$Reader$peek_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
return cljs.tools.reader.reader_types.peek_char.call(null,self__.rdr);
});
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$IPushbackReader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$IPushbackReader$unread$arity$2 = (function (reader,ch){
var self__ = this;
var reader__$1 = this;
if(cljs.core.truth_(self__.line_start_QMARK_)){
self__.line = (self__.line - (1));
self__.column = self__.prev_column;
} else {
self__.column = (self__.column - (1));
}
self__.line_start_QMARK_ = self__.prev;
return cljs.tools.reader.reader_types.unread.call(null,self__.rdr,ch);
});
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$IndexingReader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$IndexingReader$get_line_number$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
return (self__.line | (0));
});
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$IndexingReader$get_column_number$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
return (self__.column | (0));
});
cljs.tools.reader.reader_types.IndexingPushbackReader.prototype.cljs$tools$reader$reader_types$IndexingReader$get_file_name$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
return self__.file_name;
});
cljs.tools.reader.reader_types.IndexingPushbackReader.getBasis = (function (){
return new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null,"rdr","rdr",190007785,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"tag","tag",-1290361223),new cljs.core.Symbol(null,"not-native","not-native",-236392494,null)], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"line","line",1852876762,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"column","column",-576213674,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"line-start?","line-start?",1357012474,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"prev","prev",43462301,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"prev-column","prev-column",324083974,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),new cljs.core.Symbol(null,"file-name","file-name",-13685732,null)], null);
});
cljs.tools.reader.reader_types.IndexingPushbackReader.cljs$lang$type = true;
cljs.tools.reader.reader_types.IndexingPushbackReader.cljs$lang$ctorStr = "cljs.tools.reader.reader-types/IndexingPushbackReader";
cljs.tools.reader.reader_types.IndexingPushbackReader.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.tools.reader.reader-types/IndexingPushbackReader");
});
cljs.tools.reader.reader_types.__GT_IndexingPushbackReader = (function cljs$tools$reader$reader_types$__GT_IndexingPushbackReader(rdr,line,column,line_start_QMARK_,prev,prev_column,file_name){
return (new cljs.tools.reader.reader_types.IndexingPushbackReader(rdr,line,column,line_start_QMARK_,prev,prev_column,file_name));
});
/**
* Returns an object of the same type and value as `obj`, with its
* metadata merged over `m`.
*/
cljs.tools.reader.reader_types.merge_meta = (function cljs$tools$reader$reader_types$merge_meta(obj,m){
var orig_meta = cljs.core.meta.call(null,obj);
return cljs.core.with_meta.call(null,obj,cljs.core.merge.call(null,m,cljs.core.dissoc.call(null,orig_meta,new cljs.core.Keyword(null,"source","source",-433931539))));
});
/**
* Returns a string containing the contents of the top most source
* logging frame.
*/
cljs.tools.reader.reader_types.peek_source_log = (function cljs$tools$reader$reader_types$peek_source_log(frames){
return cljs.core.subs.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"buffer","buffer",617295198).cljs$core$IFn$_invoke$arity$1(frames))].join(''),cljs.core.first.call(null,new cljs.core.Keyword(null,"offset","offset",296498311).cljs$core$IFn$_invoke$arity$1(frames)));
});
/**
* Logs `char` to all currently active source logging frames.
*/
cljs.tools.reader.reader_types.log_source_char = (function cljs$tools$reader$reader_types$log_source_char(frames,char$){
var temp__5457__auto__ = new cljs.core.Keyword(null,"buffer","buffer",617295198).cljs$core$IFn$_invoke$arity$1(frames);
if(cljs.core.truth_(temp__5457__auto__)){
var buffer = temp__5457__auto__;
return buffer.append(char$);
} else {
return null;
}
});
/**
* Removes the last logged character from all currently active source
* logging frames. Called when pushing a character back.
*/
cljs.tools.reader.reader_types.drop_last_logged_char = (function cljs$tools$reader$reader_types$drop_last_logged_char(frames){
var temp__5457__auto__ = new cljs.core.Keyword(null,"buffer","buffer",617295198).cljs$core$IFn$_invoke$arity$1(frames);
if(cljs.core.truth_(temp__5457__auto__)){
var buffer = temp__5457__auto__;
return buffer.set(cljs.core.subs.call(null,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(buffer)].join(''),(0),(buffer.getLength() - (1))));
} else {
return null;
}
});
/**
* @constructor
* @implements {cljs.tools.reader.reader_types.IndexingReader}
* @implements {cljs.tools.reader.reader_types.Reader}
* @implements {cljs.tools.reader.reader_types.IPushbackReader}
*/
cljs.tools.reader.reader_types.SourceLoggingPushbackReader = (function (rdr,line,column,line_start_QMARK_,prev,prev_column,file_name,frames){
this.rdr = rdr;
this.line = line;
this.column = column;
this.line_start_QMARK_ = line_start_QMARK_;
this.prev = prev;
this.prev_column = prev_column;
this.file_name = file_name;
this.frames = frames;
});
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$Reader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$Reader$read_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
var temp__5457__auto__ = cljs.tools.reader.reader_types.read_char.call(null,self__.rdr);
if(cljs.core.truth_(temp__5457__auto__)){
var ch = temp__5457__auto__;
var ch__$1 = cljs.tools.reader.reader_types.normalize_newline.call(null,self__.rdr,ch);
self__.prev = self__.line_start_QMARK_;
self__.line_start_QMARK_ = cljs.tools.reader.impl.utils.newline_QMARK_.call(null,ch__$1);
if(cljs.core.truth_(self__.line_start_QMARK_)){
self__.prev_column = self__.column;
self__.column = (0);
self__.line = (self__.line + (1));
} else {
}
self__.column = (self__.column + (1));
cljs.tools.reader.reader_types.log_source_char.call(null,cljs.core.deref.call(null,self__.frames),ch__$1);
return ch__$1;
} else {
return null;
}
});
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$Reader$peek_char$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
return cljs.tools.reader.reader_types.peek_char.call(null,self__.rdr);
});
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$IPushbackReader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$IPushbackReader$unread$arity$2 = (function (reader,ch){
var self__ = this;
var reader__$1 = this;
if(cljs.core.truth_(self__.line_start_QMARK_)){
self__.line = (self__.line - (1));
self__.column = self__.prev_column;
} else {
self__.column = (self__.column - (1));
}
self__.line_start_QMARK_ = self__.prev;
if(cljs.core.truth_(ch)){
cljs.tools.reader.reader_types.drop_last_logged_char.call(null,cljs.core.deref.call(null,self__.frames));
} else {
}
return cljs.tools.reader.reader_types.unread.call(null,self__.rdr,ch);
});
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$IndexingReader$ = cljs.core.PROTOCOL_SENTINEL;
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$IndexingReader$get_line_number$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
return (self__.line | (0));
});
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$IndexingReader$get_column_number$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
return (self__.column | (0));
});
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.prototype.cljs$tools$reader$reader_types$IndexingReader$get_file_name$arity$1 = (function (reader){
var self__ = this;
var reader__$1 = this;
return self__.file_name;
});
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.getBasis = (function (){
return new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(new cljs.core.Symbol(null,"rdr","rdr",190007785,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"tag","tag",-1290361223),new cljs.core.Symbol(null,"not-native","not-native",-236392494,null)], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"line","line",1852876762,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"column","column",-576213674,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"line-start?","line-start?",1357012474,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"prev","prev",43462301,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"prev-column","prev-column",324083974,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),new cljs.core.Symbol(null,"file-name","file-name",-13685732,null),new cljs.core.Symbol(null,"frames","frames",-888748272,null)], null);
});
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.cljs$lang$type = true;
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.cljs$lang$ctorStr = "cljs.tools.reader.reader-types/SourceLoggingPushbackReader";
cljs.tools.reader.reader_types.SourceLoggingPushbackReader.cljs$lang$ctorPrWriter = (function (this__36169__auto__,writer__36170__auto__,opt__36171__auto__){
return cljs.core._write.call(null,writer__36170__auto__,"cljs.tools.reader.reader-types/SourceLoggingPushbackReader");
});
cljs.tools.reader.reader_types.__GT_SourceLoggingPushbackReader = (function cljs$tools$reader$reader_types$__GT_SourceLoggingPushbackReader(rdr,line,column,line_start_QMARK_,prev,prev_column,file_name,frames){
return (new cljs.tools.reader.reader_types.SourceLoggingPushbackReader(rdr,line,column,line_start_QMARK_,prev,prev_column,file_name,frames));
});
/**
* Returns true if the reader satisfies IndexingReader
*/
cljs.tools.reader.reader_types.indexing_reader_QMARK_ = (function cljs$tools$reader$reader_types$indexing_reader_QMARK_(rdr){
if(!((rdr == null))){
if((false) || ((cljs.core.PROTOCOL_SENTINEL === rdr.cljs$tools$reader$reader_types$IndexingReader$))){
return true;
} else {
return false;
}
} else {
return false;
}
});
/**
* Creates a StringReader from a given string
*/
cljs.tools.reader.reader_types.string_reader = (function cljs$tools$reader$reader_types$string_reader(s){
return (new cljs.tools.reader.reader_types.StringReader(s,cljs.core.count.call(null,s),(0)));
});
/**
* Creates a PushbackReader from a given string
*/
cljs.tools.reader.reader_types.string_push_back_reader = (function cljs$tools$reader$reader_types$string_push_back_reader(var_args){
var G__44201 = arguments.length;
switch (G__44201) {
case 1:
return cljs.tools.reader.reader_types.string_push_back_reader.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.tools.reader.reader_types.string_push_back_reader.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.reader_types.string_push_back_reader.cljs$core$IFn$_invoke$arity$1 = (function (s){
return cljs.tools.reader.reader_types.string_push_back_reader.call(null,s,(1));
});
cljs.tools.reader.reader_types.string_push_back_reader.cljs$core$IFn$_invoke$arity$2 = (function (s,buf_len){
return (new cljs.tools.reader.reader_types.PushbackReader(cljs.tools.reader.reader_types.string_reader.call(null,s),cljs.core.object_array.call(null,buf_len),buf_len,buf_len));
});
cljs.tools.reader.reader_types.string_push_back_reader.cljs$lang$maxFixedArity = 2;
cljs.tools.reader.reader_types.node_readable_push_back_reader = (function cljs$tools$reader$reader_types$node_readable_push_back_reader(readable){
return (new cljs.tools.reader.reader_types.PushbackReader((new cljs.tools.reader.reader_types.NodeReadableReader(readable,null)),cljs.core.object_array.call(null,(1)),(1),(1)));
});
/**
* Creates an IndexingPushbackReader from a given string or PushbackReader
*/
cljs.tools.reader.reader_types.indexing_push_back_reader = (function cljs$tools$reader$reader_types$indexing_push_back_reader(var_args){
var G__44204 = arguments.length;
switch (G__44204) {
case 1:
return cljs.tools.reader.reader_types.indexing_push_back_reader.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.tools.reader.reader_types.indexing_push_back_reader.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
case 3:
return cljs.tools.reader.reader_types.indexing_push_back_reader.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.reader_types.indexing_push_back_reader.cljs$core$IFn$_invoke$arity$1 = (function (s_or_rdr){
return cljs.tools.reader.reader_types.indexing_push_back_reader.call(null,s_or_rdr,(1));
});
cljs.tools.reader.reader_types.indexing_push_back_reader.cljs$core$IFn$_invoke$arity$2 = (function (s_or_rdr,buf_len){
return cljs.tools.reader.reader_types.indexing_push_back_reader.call(null,s_or_rdr,buf_len,null);
});
cljs.tools.reader.reader_types.indexing_push_back_reader.cljs$core$IFn$_invoke$arity$3 = (function (s_or_rdr,buf_len,file_name){
return (new cljs.tools.reader.reader_types.IndexingPushbackReader(((typeof s_or_rdr === 'string')?cljs.tools.reader.reader_types.string_push_back_reader.call(null,s_or_rdr,buf_len):s_or_rdr),(1),(1),true,null,(0),file_name));
});
cljs.tools.reader.reader_types.indexing_push_back_reader.cljs$lang$maxFixedArity = 3;
/**
* Creates a SourceLoggingPushbackReader from a given string or PushbackReader
*/
cljs.tools.reader.reader_types.source_logging_push_back_reader = (function cljs$tools$reader$reader_types$source_logging_push_back_reader(var_args){
var G__44207 = arguments.length;
switch (G__44207) {
case 1:
return cljs.tools.reader.reader_types.source_logging_push_back_reader.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return cljs.tools.reader.reader_types.source_logging_push_back_reader.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
case 3:
return cljs.tools.reader.reader_types.source_logging_push_back_reader.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
}
});
cljs.tools.reader.reader_types.source_logging_push_back_reader.cljs$core$IFn$_invoke$arity$1 = (function (s_or_rdr){
return cljs.tools.reader.reader_types.source_logging_push_back_reader.call(null,s_or_rdr,(1));
});
cljs.tools.reader.reader_types.source_logging_push_back_reader.cljs$core$IFn$_invoke$arity$2 = (function (s_or_rdr,buf_len){
return cljs.tools.reader.reader_types.source_logging_push_back_reader.call(null,s_or_rdr,buf_len,null);
});
cljs.tools.reader.reader_types.source_logging_push_back_reader.cljs$core$IFn$_invoke$arity$3 = (function (s_or_rdr,buf_len,file_name){
return (new cljs.tools.reader.reader_types.SourceLoggingPushbackReader(((typeof s_or_rdr === 'string')?cljs.tools.reader.reader_types.string_push_back_reader.call(null,s_or_rdr,buf_len):s_or_rdr),(1),(1),true,null,(0),file_name,cljs.core.atom.call(null,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"buffer","buffer",617295198),(new goog.string.StringBuffer()),new cljs.core.Keyword(null,"offset","offset",296498311),cljs.core.list((0))], null))));
});
cljs.tools.reader.reader_types.source_logging_push_back_reader.cljs$lang$maxFixedArity = 3;
/**
* Reads a line from the reader or from *in* if no reader is specified
*/
cljs.tools.reader.reader_types.read_line = (function cljs$tools$reader$reader_types$read_line(rdr){
var c = cljs.tools.reader.reader_types.read_char.call(null,rdr);
var s = (new goog.string.StringBuffer());
while(true){
if(cljs.tools.reader.impl.utils.newline_QMARK_.call(null,c)){
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(s)].join('');
} else {
var G__44209 = cljs.tools.reader.reader_types.read_char.call(null,rdr);
var G__44210 = s.append(c);
c = G__44209;
s = G__44210;
continue;
}
break;
}
});
cljs.tools.reader.reader_types.source_logging_reader_QMARK_ = (function cljs$tools$reader$reader_types$source_logging_reader_QMARK_(rdr){
return (rdr instanceof cljs.tools.reader.reader_types.SourceLoggingPushbackReader);
});
/**
* Returns true if rdr is an IndexingReader and the current char starts a new line
*/
cljs.tools.reader.reader_types.line_start_QMARK_ = (function cljs$tools$reader$reader_types$line_start_QMARK_(rdr){
if(cljs.core.truth_(cljs.tools.reader.reader_types.indexing_reader_QMARK_.call(null,rdr))){
return ((1) === cljs.tools.reader.reader_types.get_column_number.call(null,rdr));
} else {
return null;
}
});
cljs.tools.reader.reader_types.log_source_STAR_ = (function cljs$tools$reader$reader_types$log_source_STAR_(reader,f){
var buffer = new cljs.core.Keyword(null,"buffer","buffer",617295198).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,reader.frames));
try{cljs.core.swap_BANG_.call(null,reader.frames,cljs.core.update_in,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"offset","offset",296498311)], null),cljs.core.conj,buffer.getLength());
var ret = f.call(null);
if(((!((ret == null)))?((((ret.cljs$lang$protocol_mask$partition0$ & (131072))) || ((cljs.core.PROTOCOL_SENTINEL === ret.cljs$core$IMeta$)))?true:false):false)){
return cljs.tools.reader.reader_types.merge_meta.call(null,ret,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"source","source",-433931539),cljs.tools.reader.reader_types.peek_source_log.call(null,cljs.core.deref.call(null,reader.frames))], null));
} else {
return ret;
}
}finally {cljs.core.swap_BANG_.call(null,reader.frames,cljs.core.update_in,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"offset","offset",296498311)], null),cljs.core.rest);
}});
//# sourceMappingURL=reader_types.js.map?rel=1517021946359
@@ -0,0 +1 @@
{"version":3,"file":"\/home\/didier\/clojupyter\/website\/target\/cljsbuild\/public\/js\/out\/cljs\/tools\/reader\/reader_types.js","sources":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AdZ,AAAA,AAAA,0GAAAf,1GAASiB;;AAAT,AAAA,AAAA,wHAAA,xHAASA,mIAgBE9B,OAAOK;;AAhBlB,AAAA,iBAAA,bAgBWL;AAhBX,AAiBI,oBAAMK;AAAN,AACE,GAAI,oBAAA,nBAAO6B;AAAS,MAAO,KAAAC,MAAA;;AAA3B;;AACA,AAAMD,iBAAQ,kBAAA,jBAAKA;;AACnB,QAAMP,WAAIO,kBAAQ7B;;AAHpB;;;;AAjBJ,AAAA,yDAAA,zDAASyB;AAAT,AAAA,0FAAA,oBAAA,sDAAA,2CAAA,oDAAA,8EAAA,uDAAA,8DAAA,oBAAA,+DAAA,2CAAA,0DAAA;;;AAAA,AAAA,+DAAA,\/DAASA;;AAAT,AAAA,kEAAA,lEAASA;;AAAT,AAAA,uEAAA,WAAAhB,oBAAAC,sBAAAC,5HAASc;AAAT,AAAA,OAAAb,2BAAAF,sBAAA;;;AAAA,qDAAA,rDAASgB,kHACMC,IAAIL,IAAIM,QAAkBC;AADzC,AAAA,YAAAJ,8CACeE,IAAIL,IAAIM,QAAkBC;;;AADhCJ,AAsBT,mDAAA,nDAAOM,8GAA+BJ,IAAI3B;AAA1C,AACE,GAAI,CAAA,SAAoBA;AACtB,Line truncated
+75
View File
@@ -0,0 +1,75 @@
goog.addDependency("base.js", ['goog'], []);
goog.addDependency("../cljs/core.js", ['cljs.core'], ['goog.string', 'goog.Uri', 'goog.object', 'goog.math.Integer', 'goog.string.StringBuffer', 'goog.array', 'goog.math.Long']);
goog.addDependency("../process/env.js", ['process.env'], ['cljs.core']);
goog.addDependency("../website/util.js", ['website.util'], ['cljs.core']);
goog.addDependency("../devtools/version.js", ['devtools.version'], ['cljs.core']);
goog.addDependency("../clojure/string.js", ['clojure.string'], ['goog.string', 'cljs.core', 'goog.string.StringBuffer']);
goog.addDependency("../cljs/pprint.js", ['cljs.pprint'], ['goog.string', 'cljs.core', 'goog.string.StringBuffer', 'clojure.string']);
goog.addDependency("../devtools/context.js", ['devtools.context'], ['cljs.core']);
goog.addDependency("../clojure/set.js", ['clojure.set'], ['cljs.core']);
goog.addDependency("../clojure/data.js", ['clojure.data'], ['cljs.core', 'clojure.set']);
goog.addDependency("../devtools/defaults.js", ['devtools.defaults'], ['cljs.core']);
goog.addDependency("../devtools/prefs.js", ['devtools.prefs'], ['cljs.core', 'devtools.defaults']);
goog.addDependency("../devtools/util.js", ['devtools.util'], ['cljs.core', 'devtools.version', 'goog.userAgent', 'cljs.pprint', 'devtools.context', 'clojure.data', 'devtools.prefs']);
goog.addDependency("../website/logo.js", ['website.logo'], ['cljs.core']);
goog.addDependency("../website/notebook.js", ['website.notebook'], ['cljs.core']);
goog.addDependency("../website/home.js", ['website.home'], ['website.logo', 'cljs.core', 'website.notebook']);
goog.addDependency("../cljs/core/async/impl/protocols.js", ['cljs.core.async.impl.protocols'], ['cljs.core']);
goog.addDependency("../cljs/core/async/impl/ioc_helpers.js", ['cljs.core.async.impl.ioc_helpers'], ['cljs.core', 'cljs.core.async.impl.protocols']);
goog.addDependency("../cljs/tools/reader/impl/utils.js", ['cljs.tools.reader.impl.utils'], ['goog.string', 'cljs.core', 'clojure.string']);
goog.addDependency("../cljs/tools/reader/reader_types.js", ['cljs.tools.reader.reader_types'], ['goog.string', 'cljs.core', 'goog.string.StringBuffer', 'cljs.tools.reader.impl.utils']);
goog.addDependency("../cljs/tools/reader/impl/inspect.js", ['cljs.tools.reader.impl.inspect'], ['cljs.core']);
goog.addDependency("../cljs/tools/reader/impl/errors.js", ['cljs.tools.reader.impl.errors'], ['cljs.core', 'cljs.tools.reader.reader_types', 'cljs.tools.reader.impl.inspect', 'clojure.string']);
goog.addDependency("../cljs/core/async/impl/buffers.js", ['cljs.core.async.impl.buffers'], ['cljs.core', 'cljs.core.async.impl.protocols']);
goog.addDependency("../cljs/core/async/impl/dispatch.js", ['cljs.core.async.impl.dispatch'], ['cljs.core', 'cljs.core.async.impl.buffers', 'goog.async.nextTick']);
goog.addDependency("../cljs/core/async/impl/channels.js", ['cljs.core.async.impl.channels'], ['cljs.core.async.impl.dispatch', 'cljs.core', 'cljs.core.async.impl.buffers', 'cljs.core.async.impl.protocols']);
goog.addDependency("../accountant/core.js", ['accountant.core'], ['goog.history.Event', 'goog.Uri', 'cljs.core', 'goog.history.EventType', 'goog.history.Html5History', 'clojure.string', 'goog.events']);
goog.addDependency("../cljs/tools/reader/impl/commons.js", ['cljs.tools.reader.impl.commons'], ['cljs.tools.reader.impl.errors', 'cljs.core', 'cljs.tools.reader.reader_types', 'cljs.tools.reader.impl.utils']);
goog.addDependency("../cljs/tools/reader.js", ['cljs.tools.reader'], ['cljs.tools.reader.impl.commons', 'goog.string', 'cljs.tools.reader.impl.errors', 'cljs.core', 'cljs.tools.reader.reader_types', 'goog.string.StringBuffer', 'cljs.tools.reader.impl.utils', 'goog.array']);
goog.addDependency("../cljs/tools/reader/edn.js", ['cljs.tools.reader.edn'], ['cljs.tools.reader.impl.commons', 'cljs.tools.reader', 'goog.string', 'cljs.tools.reader.impl.errors', 'cljs.core', 'cljs.tools.reader.reader_types', 'goog.string.StringBuffer', 'cljs.tools.reader.impl.utils']);
goog.addDependency("../cljs/reader.js", ['cljs.reader'], ['cljs.tools.reader.edn', 'cljs.tools.reader', 'cljs.core', 'goog.object', 'goog.string.StringBuffer']);
goog.addDependency("../figwheel/client/utils.js", ['figwheel.client.utils'], ['goog.userAgent.product', 'goog.string', 'cljs.core', 'goog.object', 'goog.string.StringBuffer', 'cljs.pprint', 'goog.async.Deferred', 'clojure.string', 'cljs.reader']);
goog.addDependency("../figwheel/client/socket.js", ['figwheel.client.socket'], ['cljs.core', 'goog.object', 'figwheel.client.utils', 'cljs.reader']);
goog.addDependency("../reagent/debug.js", ['reagent.debug'], ['cljs.core']);
goog.addDependency("../cljs/spec/gen/alpha.js", ['cljs.spec.gen.alpha'], ['cljs.core']);
goog.addDependency("../cljs/core/async/impl/timers.js", ['cljs.core.async.impl.timers'], ['cljs.core.async.impl.channels', 'cljs.core.async.impl.dispatch', 'cljs.core', 'cljs.core.async.impl.protocols']);
goog.addDependency("../cljs/core/async.js", ['cljs.core.async'], ['cljs.core.async.impl.channels', 'cljs.core.async.impl.dispatch', 'cljs.core', 'cljs.core.async.impl.buffers', 'cljs.core.async.impl.protocols', 'cljs.core.async.impl.ioc_helpers', 'cljs.core.async.impl.timers']);
goog.addDependency("../figwheel/client/file_reloading.js", ['figwheel.client.file_reloading'], ['goog.string', 'goog.net.jsloader', 'goog.Uri', 'cljs.core', 'goog.object', 'cljs.core.async', 'clojure.set', 'goog.html.legacyconversions', 'figwheel.client.utils', 'goog.async.Deferred', 'clojure.string']);
goog.addDependency("../devtools/protocols.js", ['devtools.protocols'], ['cljs.core']);
goog.addDependency("../cljsjs/react/development/react.inc.js", ['cljsjs.react'], []);
goog.addDependency("../cljsjs/create-react-class/development/create-react-class.inc.js", ['cljsjs.create_react_class'], ['cljsjs.react']);
goog.addDependency("../reagent/interop.js", ['reagent.interop'], ['cljs.core']);
goog.addDependency("../reagent/impl/util.js", ['reagent.impl.util'], ['cljsjs.create_react_class', 'reagent.interop', 'cljs.core', 'cljsjs.react', 'reagent.debug', 'clojure.string']);
goog.addDependency("../reagent/impl/batching.js", ['reagent.impl.batching'], ['reagent.impl.util', 'reagent.interop', 'cljs.core', 'reagent.debug', 'clojure.string']);
goog.addDependency("../reagent/ratom.js", ['reagent.ratom'], ['reagent.impl.util', 'cljs.core', 'reagent.impl.batching', 'clojure.set', 'reagent.debug']);
goog.addDependency("../reagent/impl/component.js", ['reagent.impl.component'], ['reagent.impl.util', 'reagent.interop', 'reagent.ratom', 'cljs.core', 'reagent.impl.batching', 'reagent.debug']);
goog.addDependency("../clojure/walk.js", ['clojure.walk'], ['cljs.core']);
goog.addDependency("../reagent/impl/template.js", ['reagent.impl.template'], ['reagent.impl.util', 'reagent.interop', 'reagent.ratom', 'cljs.core', 'reagent.impl.batching', 'reagent.impl.component', 'reagent.debug', 'clojure.string', 'clojure.walk']);
goog.addDependency("../cljsjs/react-dom/development/react-dom.inc.js", ['cljsjs.react.dom'], ['cljsjs.react']);
goog.addDependency("../reagent/dom.js", ['reagent.dom'], ['reagent.impl.util', 'reagent.interop', 'reagent.ratom', 'cljs.core', 'reagent.impl.template', 'reagent.impl.batching', 'cljsjs.react.dom', 'reagent.debug']);
goog.addDependency("../reagent/core.js", ['reagent.core'], ['reagent.impl.util', 'reagent.interop', 'reagent.ratom', 'cljs.core', 'reagent.impl.template', 'reagent.impl.batching', 'reagent.impl.component', 'reagent.debug', 'reagent.dom']);
goog.addDependency("../secretary/core.js", ['secretary.core'], ['cljs.core', 'clojure.string', 'clojure.walk']);
goog.addDependency("../website/tobbar.js", ['website.tobbar'], ['website.logo', 'cljs.core']);
goog.addDependency("../website/core.js", ['website.core'], ['reagent.core', 'cljs.core', 'accountant.core', 'website.home', 'secretary.core', 'website.tobbar']);
goog.addDependency("../devtools/format.js", ['devtools.format'], ['cljs.core', 'devtools.context']);
goog.addDependency("../devtools/munging.js", ['devtools.munging'], ['cljs.core', 'goog.object', 'goog.string.StringBuffer', 'devtools.context', 'clojure.string']);
goog.addDependency("../devtools/formatters/helpers.js", ['devtools.formatters.helpers'], ['cljs.core', 'devtools.protocols', 'devtools.format', 'devtools.prefs', 'devtools.munging']);
goog.addDependency("../devtools/formatters/state.js", ['devtools.formatters.state'], ['cljs.core']);
goog.addDependency("../devtools/formatters/printing.js", ['devtools.formatters.printing'], ['devtools.formatters.helpers', 'devtools.formatters.state', 'cljs.core', 'devtools.protocols', 'devtools.format', 'devtools.prefs']);
goog.addDependency("../devtools/formatters/templating.js", ['devtools.formatters.templating'], ['devtools.formatters.helpers', 'devtools.formatters.state', 'devtools.util', 'cljs.core', 'devtools.protocols', 'clojure.string', 'clojure.walk']);
goog.addDependency("../devtools/formatters/markup.js", ['devtools.formatters.markup'], ['devtools.formatters.helpers', 'devtools.formatters.printing', 'devtools.formatters.templating', 'devtools.formatters.state', 'cljs.core', 'devtools.munging']);
goog.addDependency("../devtools/toolbox.js", ['devtools.toolbox'], ['devtools.formatters.markup', 'devtools.formatters.templating', 'cljs.core', 'devtools.protocols']);
goog.addDependency("../devtools/async.js", ['devtools.async'], ['cljs.core', 'goog.async.nextTick']);
goog.addDependency("../devtools/reporter.js", ['devtools.reporter'], ['devtools.util', 'cljs.core', 'devtools.context']);
goog.addDependency("../devtools/formatters/budgeting.js", ['devtools.formatters.budgeting'], ['devtools.formatters.helpers', 'devtools.formatters.markup', 'devtools.formatters.templating', 'devtools.formatters.state', 'cljs.core']);
goog.addDependency("../devtools/formatters/core.js", ['devtools.formatters.core'], ['devtools.formatters.helpers', 'devtools.formatters.markup', 'devtools.formatters.templating', 'devtools.formatters.state', 'cljs.core', 'devtools.reporter', 'devtools.protocols', 'devtools.formatters.budgeting', 'devtools.format', 'devtools.prefs']);
goog.addDependency("../devtools/formatters.js", ['devtools.formatters'], ['devtools.formatters.core', 'devtools.util', 'cljs.core', 'goog.labs.userAgent.browser', 'devtools.context', 'devtools.prefs']);
goog.addDependency("../cljs/stacktrace.js", ['cljs.stacktrace'], ['goog.string', 'cljs.core', 'clojure.string']);
goog.addDependency("../devtools/hints.js", ['devtools.hints'], ['cljs.stacktrace', 'cljs.core', 'devtools.context', 'devtools.prefs']);
goog.addDependency("../devtools/core.js", ['devtools.core'], ['devtools.toolbox', 'devtools.util', 'cljs.core', 'devtools.async', 'devtools.formatters', 'devtools.hints', 'devtools.context', 'devtools.defaults', 'devtools.prefs']);
goog.addDependency("../website/dev.js", ['website.dev'], ['website.core', 'cljs.core', 'devtools.core']);
goog.addDependency("../figwheel/client/heads_up.js", ['figwheel.client.heads_up'], ['goog.dom', 'goog.string', 'cljs.core', 'goog.dom.dataset', 'goog.object', 'cljs.core.async', 'cljs.pprint', 'figwheel.client.utils', 'figwheel.client.socket', 'clojure.string']);
goog.addDependency("../cljs/spec/alpha.js", ['cljs.spec.alpha'], ['cljs.core', 'goog.object', 'clojure.string', 'clojure.walk', 'cljs.spec.gen.alpha']);
goog.addDependency("../cljs/repl.js", ['cljs.repl'], ['cljs.core', 'cljs.spec.alpha']);
goog.addDependency("../figwheel/client.js", ['figwheel.client'], ['goog.userAgent.product', 'goog.Uri', 'cljs.core', 'goog.object', 'cljs.core.async', 'figwheel.client.file_reloading', 'figwheel.client.utils', 'cljs.repl', 'figwheel.client.heads_up', 'figwheel.client.socket', 'clojure.string', 'cljs.reader']);
goog.addDependency("../figwheel/connect/build_app.js", ['figwheel.connect.build_app'], ['website.core', 'cljs.core', 'website.dev', 'figwheel.client', 'figwheel.client.utils']);
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Loaded 100 of 373 files, more files were not shown because too many files have changed in this diff. Show more