>>===== MODE =====>>
citation
<<===== MODE =====<<

Reported by abdeali khurrum to Juris-M Freshers:

"I updated my version of Juris-M - the problem still persists.  To
replicate the problem, add any item that has an apostrophe in the
title (like https://en.wikipedia.org/wiki/Junior's) and use "Style
Preview" from the Preferences pane to preview the citation. If you
change the language to "العربية" (second item on the list), Firefox
(44) will hang and crash. Again, Farsi (فارسي) works fine - even
though it has the same script as Arabic."

The cause was an unnecessary while(){} statement that never cleared
if straight quotes were set as inner quotes, and the string contained
an apostrophe.

Fixed by commit https://github.com/Juris-M/citeproc-js/commit/98489396ab7b16876780bdd25f2a684679420cde

2018-05-05: Replaced Arabic result string (for "Accessed"?) to reflect CSL locale update. Previously contained invalid(ated?) Unicode chars.

>>===== RESULT =====>>
>>[0] "Junior’s", <i>Wikipedia, the Free Encyclopedia</i>, 26 ديسمبر، 2015, https://en.wikipedia.org/w/index.php?title=Junior%27s&#38;oldid=696914641.
<<===== RESULT =====<<


>>===== CITATIONS =====>>
[
    [
        {
            "citationID": "CITATION-1", 
            "citationItems": [
                {
                    "id": "ITEM-1"
                }
            ], 
            "properties": {
                "noteIndex": 1
            }
        }, 
        [], 
        []
    ]
]
<<===== CITATIONS =====<<


>>===== CSL =====>>
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.1mlz1" demote-non-dropping-particle="never" page-range-format="chicago" name-as-sort-order="first" default-locale="ar">
  <info>
    <title>JM Chicago Manual of Style 16th edition (full note)</title>
    <id>http://juris-m.github.io/jm-styles/jm-chicago-fullnote-bibliography</id>
    <link href="http://juris-m.github.io/styles/jm-chicago-fullnote-bibliography" rel="self"/>
    <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
    <author>
      <name>Julian Onions</name>
      <email>julian.onions@gmail.com</email>
    </author>
    <contributor>
      <name>Simon Kornblith</name>
      <email>simon@simonster.com</email>
    </contributor>
    <contributor>
      <name>Elena Razlogova</name>
      <email>elena.razlogova@gmail.com</email>
    </contributor>
    <contributor>
      <name>Frank Bennett</name>
      <email>biercenator@gmail.com</email>
    </contributor>
    <contributor>
      <name>Andrew Dunning</name>
      <email>andrew.dunning@utoronto.ca</email>
    </contributor>
    <category citation-format="note"/>
    <category field="generic-base"/>
    <summary>Chicago format with full notes and bibliography</summary>
    <updated>2015-06-19T22:51:43.905955</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
  </info>
  <locale>
    <style-options name-as-sort-order="ko zh ja hu my km vi" name-never-short="my ko zh ja hu km vi"/>
  </locale>
  <locale xml:lang="ar">
    <terms>
      <term name="open-quote">"</term>
      <term name="close-quote">"</term>
      <term name="open-inner-quote">'</term>
      <term name="close-inner-quote">'</term>
    </terms>
  </locale>
  <locale xml:lang="en">
    <terms>
      <term name="and" form="symbol">&amp;</term>
      <term name="editor" form="verb-short">ed.</term>
      <term name="translator" form="verb-short">trans.</term>
      <term name="editortranslator" form="verb-short">
        <single>ed. and trans.</single>
        <multiple>ed. and trans.</multiple>
      </term>
      <term name="editortranslator" form="verb">
        <single>Edited and translated by</single>
        <multiple>Edited and translated by</multiple>
      </term>
      <term name="translator" form="short">trans.</term>
      <term name="article">
        <single>article</single>
        <multiple>articles</multiple>
      </term>
      <term name="article" form="short">
        <single>art.</single>
        <multiple>arts.</multiple>
      </term>
    </terms>
  </locale>
  <macro name="editor-translator">
    <group delimiter=", ">
      <group delimiter=" ">
        <choose>
          <if variable="container-author reviewed-author" match="any">
            <group>
              <names variable="container-author reviewed-author">
                <label form="verb-short" text-case="lowercase" suffix=" "/>
                <name and="text" delimiter=", "/>
                <institution/>
              </names>
            </group>
          </if>
        </choose>
      </group>
      <names variable="editor translator" delimiter=", ">
        <label form="verb-short" text-case="lowercase" suffix=" "/>
        <name and="text" delimiter=", "/>
        <institution/>
      </names>
    </group>
  </macro>
  <macro name="secondary-contributors-note">
    <choose>
      <if type="chapter paper-conference" match="none">
        <text macro="editor-translator"/>
      </if>
    </choose>
  </macro>
  <macro name="container-contributors-note">
    <choose>
      <if type="chapter paper-conference" match="any">
        <text macro="editor-translator"/>
      </if>
    </choose>
  </macro>
  <macro name="secondary-contributors">
    <choose>
      <if type="chapter paper-conference" match="none">
        <names variable="editor translator" delimiter=". ">
          <label form="verb" text-case="capitalize-first" suffix=" "/>
          <name and="text" delimiter=", "/>
          <institution/>
        </names>
      </if>
    </choose>
  </macro>
  <macro name="container-contributors">
    <choose>
      <if type="chapter paper-conference" match="any">
        <group delimiter=", ">
          <choose>
            <if variable="author">
              <choose>
                <if variable="container-author" match="any">
                  <names variable="container-author">
                    <label form="verb-short" text-case="lowercase" suffix=" "/>
                    <name and="text" delimiter=", "/>
                    <institution/>
                  </names>
                </if>
              </choose>
              <!--This includes page numers after the container author, e.g. for Introductions -->
              <choose>
                <if variable="container-author author" match="all">
                  <group delimiter=". ">
                    <number variable="page"/>
                    <names variable="editor translator" delimiter=", ">
                      <label form="verb" suffix=" "/>
                      <name and="text" delimiter=", "/>
                      <institution/>
                    </names>
                  </group>
                </if>
                <else>
                  <names variable="editor translator" delimiter=", ">
                    <label form="verb" text-case="lowercase" suffix=" "/>
                    <name and="text" delimiter=", "/>
                    <institution/>
                  </names>
                </else>
              </choose>
            </if>
          </choose>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="recipient-note">
    <names variable="recipient" delimiter=", ">
      <label form="verb" text-case="lowercase" suffix=" "/>
      <name and="text" delimiter=", "/>
      <institution/>
    </names>
  </macro>
  <macro name="contributors-note">
    <group delimiter=" ">
      <names variable="author">
        <name and="text" sort-separator=", " delimiter=", "/>
        <institution institution-parts="short">
          <institution-part name="short" strip-periods="true"/>
        </institution>
        <label form="short" prefix=", "/>
        <substitute>
          <names variable="editor"/>
          <names variable="translator"/>
        </substitute>
      </names>
      <text macro="recipient-note"/>
    </group>
  </macro>
  <macro name="editor">
    <names variable="editor">
      <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
      <institution/>
      <label form="short" prefix=", "/>
    </names>
  </macro>
  <macro name="translator">
    <names variable="translator">
      <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
      <institution/>
      <label form="verb-short" prefix=", "/>
    </names>
  </macro>
  <macro name="recipient">
    <group delimiter=" ">
      <choose>
        <if type="personal_communication">
          <choose>
            <if variable="genre">
              <text variable="genre" text-case="capitalize-first"/>
            </if>
            <else>
              <text term="letter" text-case="capitalize-first"/>
            </else>
          </choose>
        </if>
      </choose>
      <text macro="recipient-note"/>
    </group>
  </macro>
  <macro name="contributors">
    <group delimiter=". ">
      <names variable="author">
        <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
        <institution institution-parts="short-long">
          <institution-part name="short" prefix="(" suffix=")" strip-periods="true"/>
        </institution>
        <substitute>
          <text macro="editor"/>
          <text macro="translator"/>
          <names variable="authority">
            <name/>
            <institution institution-parts="short-long">
              <institution-part name="short" prefix="(" suffix=")" strip-periods="true"/>
            </institution>
          </names>
        </substitute>
      </names>
      <text macro="recipient"/>
    </group>
  </macro>
  <macro name="recipient-short">
    <names variable="recipient">
      <label form="verb" text-case="lowercase" suffix=" "/>
      <name form="short" and="text" delimiter=", "/>
      <institution/>
    </names>
  </macro>
  <macro name="contributors-short">
    <group delimiter=" ">
      <names variable="author">
        <name form="short" and="text" delimiter=", "/>
        <institution institution-parts="short">
          <institution-part name="short" strip-periods="true"/>
        </institution>
        <substitute>
          <names variable="editor"/>
          <names variable="translator"/>
        </substitute>
      </names>
      <text macro="recipient-short"/>
    </group>
  </macro>
  <macro name="interviewer-note">
    <group delimiter=" in ">
      <names variable="interviewer" delimiter=", ">
        <label form="verb" text-case="lowercase" suffix=" "/>
        <name and="text" delimiter=", "/>
        <institution/>
      </names>
      <choose>
        <if match="none" type="speech book chapter">
          <text variable="event-place"/>
        </if>
      </choose>
    </group>
  </macro>
  <macro name="interviewer">
    <group delimiter=" in ">
      <choose>
        <if variable="medium">
          <names variable="interviewer" delimiter=", ">
            <label form="verb" suffix=" "/>
            <name and="text" delimiter=", "/>
            <institution/>
          </names>
        </if>
        <else>
          <names variable="interviewer" delimiter=", ">
            <label form="verb" text-case="capitalize-first" suffix=" "/>
            <name and="text" delimiter=", "/>
            <institution/>
          </names>
        </else>
      </choose>
      <choose>
        <if match="none" type="speech book chapter">
          <text variable="event-place"/>
        </if>
      </choose>
    </group>
  </macro>
  <macro name="title-note">
    <choose>
      <if variable="title" match="none">
        <text variable="genre"/>
      </if>
      <else-if type="bill book graphic motion_picture song" match="any">
        <text variable="title" text-case="title" font-style="italic"/>
        <group delimiter=" " prefix=", ">
          <text term="version"/>
          <text variable="version"/>
        </group>
      </else-if>
      <else-if type="interview" match="any">
        <text variable="title"/>
      </else-if>
      <else-if variable="reviewed-author">
        <text variable="title" font-style="italic" prefix="review of "/>
      </else-if>
      <else-if type="treaty">
        <text variable="title"/>
      </else-if>
      <else>
        <text variable="title" text-case="title" quotes="true"/>
      </else>
    </choose>
  </macro>
  <macro name="title">
    <choose>
      <if variable="title" match="none">
        <choose>
          <if type="personal_communication" match="none">
            <text variable="genre" text-case="capitalize-first"/>
          </if>
        </choose>
      </if>
      <else-if type="bill book graphic motion_picture song" match="any">
        <group delimiter=" ">
          <text variable="title" text-case="title" font-style="italic"/>
          <group prefix="(" suffix=")" delimiter=" ">
            <text term="version"/>
            <text variable="version"/>
          </group>
        </group>
      </else-if>
      <else-if variable="reviewed-author">
        <group delimiter=", ">
          <text variable="title" font-style="italic" prefix="Review of "/>
          <names variable="reviewed-author">
            <label form="verb-short" text-case="lowercase" suffix=" "/>
            <name and="text" delimiter=", "/>
            <institution/>
          </names>
        </group>
      </else-if>
      <else-if type="treaty">
        <text variable="title"/>
      </else-if>
      <else-if type="interview" match="any">
        <text variable="title"/>
      </else-if>
      <else>
        <text variable="title" text-case="title" quotes="true"/>
      </else>
    </choose>
  </macro>
  <macro name="title-short">
    <choose>
      <if variable="title" match="none">
        <choose>
          <if type="interview">
            <text term="interview"/>
          </if>
          <else-if type="manuscript speech" match="any">
            <text variable="genre" form="short"/>
          </else-if>
          <else-if type="personal_communication">
            <text macro="issued"/>
          </else-if>
        </choose>
      </if>
      <else-if type="bill book graphic motion_picture song" match="any">
        <text variable="title" text-case="title" form="short" font-style="italic"/>
      </else-if>
      <else-if type="interview" match="any">
        <text variable="title"/>
      </else-if>
      <else>
        <text variable="title" text-case="title" form="short" quotes="true"/>
      </else>
    </choose>
  </macro>
  <macro name="date-disambiguate">
    <choose>
      <if disambiguate="true">
        <text macro="issued"/>
      </if>
    </choose>
  </macro>
  <macro name="description-note">
    <group delimiter=", ">
      <group delimiter=" ">
        <text variable="medium"/>
        <text macro="interviewer-note"/>
      </group>
      <choose>
        <if variable="title" match="none"/>
        <else-if type="manuscript thesis speech" match="any"/>
        <else-if match="any" type="treaty">
          <date variable="available-date" form="text" date-parts="year-month-day"/>
          <text variable="collection-title"/>
          <text variable="genre"/>
        </else-if>
        <else>
          <group delimiter=" ">
            <text variable="genre"/>
            <group delimiter=" ">
              <choose>
                <if match="all" is-numeric="number" number="number">
                  <text value="no."/>
                </if>
                <else-if is-numeric="number">
                  <label variable="number"/>
                </else-if>
              </choose>
              <number variable="number"/>
            </group>
          </group>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="description">
    <group delimiter=", ">
      <group delimiter=". ">
        <group delimiter=" ">
          <text variable="medium" text-case="capitalize-first"/>
          <text macro="interviewer"/>
        </group>
      </group>
      <choose>
        <if variable="title" match="none"/>
        <else-if type="thesis speech" match="any"/>
        <else-if match="any" type="treaty">
          <date variable="available-date" form="text" date-parts="year-month-day"/>
          <text variable="collection-title"/>
          <text variable="genre"/>
        </else-if>
        <else>
          <group delimiter=" ">
            <text variable="genre" text-case="capitalize-first"/>
            <group delimiter=" ">
              <choose>
                <if match="all" is-numeric="number" number="number">
                  <text value="no."/>
                </if>
                <else-if is-numeric="number">
                  <label variable="number"/>
                </else-if>
              </choose>
              <number variable="number"/>
            </group>
          </group>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="container-title-note">
    <choose>
      <if match="none" type="treaty">
        <group delimiter=" ">
          <choose>
            <if type="chapter paper-conference" match="any">
              <text term="in"/>
            </if>
          </choose>
          <text variable="container-title" text-case="title" font-style="italic"/>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="container-title">
    <choose>
      <if match="none" type="treaty">
        <group delimiter=" ">
          <choose>
            <if type="chapter paper-conference" match="any">
          <text term="in" text-case="capitalize-first"/>
            </if>
          </choose>
          <text variable="container-title" text-case="title" font-style="italic"/>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="collection-title">
    <choose>
      <if match="none" type="article-journal treaty">
        <choose>
          <if match="none" is-numeric="collection-number">
            <group delimiter=", ">
              <text variable="collection-title" text-case="title"/>
              <number variable="collection-number"/>
            </group>
          </if>
          <else>
            <group delimiter=" ">
              <text variable="collection-title" text-case="title"/>
              <number variable="collection-number"/>
            </group>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="collection-title-journal">
    <choose>
      <if type="article-journal">
        <group delimiter=" ">
          <text variable="collection-title"/>
          <number variable="collection-number"/>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="edition-note">
    <choose>
      <if type="bill book chapter graphic motion_picture paper-conference report song" match="any">
        <choose>
          <if is-numeric="edition">
            <group delimiter=" ">
              <number variable="edition" form="ordinal"/>
              <text term="edition" form="short"/>
            </group>
          </if>
          <else>
            <number variable="edition"/>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="edition">
    <choose>
      <if type="bill book chapter graphic motion_picture paper-conference report song" match="any">
        <choose>
          <if is-numeric="edition">
            <group delimiter=" ">
              <number variable="edition" form="ordinal"/>
              <text term="edition" form="short"/>
            </group>
          </if>
          <else>
            <number variable="edition" text-case="capitalize-first" suffix="."/>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-note-join-with-space">
    <choose>
      <if type="article-journal" variable="volume" match="all">
        <choose>
          <if match="none" variable="collection-title">
            <text macro="locators-note"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-note-join-with-comma">
    <choose>
      <if type="article-journal" match="none">
        <text macro="locators-note"/>
      </if>
      <else-if type="article-journal">
        <choose>
          <if variable="volume" match="none">
            <text macro="locators-note"/>
          </if>
          <else-if match="any" variable="collection-title">
            <text macro="locators-note"/>
          </else-if>
        </choose>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-note">
    <choose>
      <if type="article-journal">
        <group delimiter=", ">
          <text macro="collection-title-journal"/>
          <number variable="volume"/>
          <group delimiter=" ">
            <text term="issue" form="short"/>
            <number variable="issue"/>
          </group>
        </group>
      </if>
      <else-if type="bill book chapter graphic motion_picture paper-conference report song" match="any">
        <group delimiter=", ">
          <text macro="edition-note"/>
          <group delimiter=" ">
            <text term="volume" form="short"/>
            <number variable="volume" form="numeric"/>
          </group>
          <choose>
            <if variable="locator" match="none">
              <group delimiter=" ">
                <number variable="number-of-volumes" form="numeric"/>
                <text term="volume" form="short" plural="true"/>
              </group>
            </if>
          </choose>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-join-with-space">
    <choose>
      <if type="article-journal" variable="volume" match="all">
        <choose>
          <if match="none" variable="collection-title">
            <text macro="locators"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-join-with-comma">
    <choose>
      <if type="chapter paper-conference" match="any">
        <text macro="locators"/>
      </if>
      <else-if type="article-journal">
        <choose>
          <if variable="volume" match="none">
            <text macro="locators"/>
          </if>
          <else-if match="any" variable="collection-title">
            <text macro="locators"/>
          </else-if>
        </choose>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-join-with-period">
    <choose>
      <if type="article-journal chapter paper-conference" match="none">
        <text macro="locators"/>
      </if>
    </choose>
  </macro>
  <macro name="locators">
    <choose>
      <if type="article-journal">
        <group delimiter=", ">
          <text macro="collection-title-journal"/>
          <number variable="volume"/>
          <group delimiter=" ">
            <text term="issue" form="short"/>
            <number variable="issue"/>
          </group>
        </group>
      </if>
      <else-if type="bill book graphic motion_picture report song" match="any">
        <group delimiter=". ">
          <text macro="edition"/>
          <group delimiter=" ">
            <text term="volume" form="short" text-case="capitalize-first"/>
            <number variable="volume" form="numeric"/>
          </group>
          <group delimiter=" ">
            <number variable="number-of-volumes" form="numeric"/>
            <text term="volume" form="short" plural="true"/>
          </group>
        </group>
      </else-if>
      <else-if type="chapter paper-conference" match="any">
        <group delimiter=". ">
          <text macro="edition"/>
          <choose>
            <if variable="page" match="none">
              <group delimiter=" ">
                <text term="volume" form="short" text-case="capitalize-first"/>
                <number variable="volume" form="numeric"/>
              </group>
            </if>
          </choose>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-newspaper">
    <choose>
      <if type="article-newspaper">
        <group delimiter=", ">
          <group delimiter=" ">
            <number variable="edition"/>
            <text term="edition"/>
          </group>
          <group delimiter=" ">
            <text term="section" form="short"/>
            <text variable="section"/>
          </group>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="event-note">
    <choose>
      <if match="none" variable="publisher">
        <group delimiter=", held ">
          <text variable="event"/>
          <date variable="event-date" form="text" date-parts="year-month-day"/>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="event">
    <choose>
      <if variable="title">
        <group delimiter=" ">
          <text term="presented at"/>
          <text variable="event"/>
        </group>
      </if>
      <else>
        <group delimiter=" ">
          <text term="presented at" text-case="capitalize-first"/>
          <text variable="event"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="originally-published">
    <group delimiter=", ">
      <group delimiter=": ">
        <text variable="original-publisher-place"/>
        <text variable="original-publisher"/>
      </group>
      <date variable="original-date" form="text" date-parts="year"/>
    </group>
  </macro>
  <macro name="reprint-note">
    <!--needs localization-->
    <choose>
      <if variable="original-date issued" match="all">
        <choose>
          <!--for whatever reason in notes, when we have both original and new publishers, reprint doesn't appear-->
          <if variable="original-publisher original-publisher-place" match="none">
            <text value="repr."/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="reprint">
    <!--needs localization-->
    <choose>
      <if variable="original-date issued" match="all">
        <text value="reprint" text-case="capitalize-first"/>
      </if>
    </choose>
  </macro>
  <macro name="publisher">
    <choose>
      <if type="thesis">
        <text variable="publisher"/>
      </if>
      <else-if type="speech">
        <text variable="event-place"/>
      </else-if>
      <else>
        <group delimiter=": ">
          <text variable="publisher-place"/>
          <text variable="publisher"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="issued">
    <choose>
      <if variable="issued">
        <choose>
          <if type="graphic report" match="any">
            <date variable="issued" form="text"/>
          </if>
          <else-if type="bill book chapter graphic motion_picture paper-conference report song thesis" match="any">
            <date variable="issued" form="text" date-parts="year"/>
          </else-if>
          <else>
            <date variable="issued" form="text"/>
          </else>
        </choose>
      </if>
      <else-if variable="status">
        <text variable="status"/>
      </else-if>
      <else-if variable="accessed URL" match="all"/>
      <else-if>
        <conditions match="all">
          <condition match="all" type="paper-conference"/>
          <condition match="none" variable="publisher"/>
        </conditions>
      </else-if>
      <else>
        <text term="no date" form="short"/>
      </else>
    </choose>
  </macro>
  <macro name="point-locators-subsequent">
    <choose>
      <if variable="locator">
        <choose>
          <if locator="page" match="none">
            <group delimiter=" ">
              <choose>
                <if type="bill book graphic motion_picture report song" match="any">
                  <choose>
                    <if variable="volume">
                      <group delimiter=", ">
                        <group delimiter=" ">
                          <text term="volume" form="short"/>
                          <number variable="volume" form="numeric"/>
                        </group>
                        <label variable="locator" form="short"/>
                      </group>
                    </if>
                    <else>
                      <label variable="locator" form="short"/>
                    </else>
                  </choose>
                </if>
                <else>
                  <label variable="locator" form="short"/>
                </else>
              </choose>
              <text variable="locator"/>
            </group>
          </if>
          <else-if type="bill book graphic motion_picture report song" match="any">
            <group delimiter=":">
              <number variable="volume" form="numeric"/>
              <text variable="locator"/>
            </group>
          </else-if>
          <else>
            <text variable="locator"/>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="point-locators-join-with-colon">
    <choose>
      <if type="article-journal">
        <choose>
          <if variable="locator page" match="any">
            <choose>
              <if variable="volume issue" match="any">
                <text macro="point-locators"/>
              </if>
            </choose>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="point-locators-join-with-comma">
    <choose>
      <if type="article-journal" match="none">
        <text macro="point-locators"/>
      </if>
      <else-if variable="volume issue" match="none">
        <text macro="point-locators"/>
      </else-if>
    </choose>
  </macro>
  <macro name="point-locators">
    <choose>
      <if variable="locator" match="none">
        <choose>
          <if type="article-journal chapter paper-conference" match="any">
            <number variable="page"/>
          </if>
        </choose>
      </if>
      <else-if type="article-journal">
        <group delimiter=" ">
          <choose>
            <if locator="page" match="none">
              <label variable="locator" form="short"/>
            </if>
          </choose>
          <text variable="locator"/>
        </group>
      </else-if>
      <else>
        <group delimiter=" ">
          <choose>
            <if locator="page" match="none">
              <label variable="locator" form="short"/>
            </if>
          </choose>
          <text variable="locator"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="locators-chapter">
    <choose>
      <if type="chapter paper-conference" match="any">
        <choose>
          <if variable="author container-author" match="all"/>
          <else>
            <choose>
              <if variable="page">
                <number variable="volume" suffix=":"/>
                <number variable="page"/>
              </if>
            </choose>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-journal-join-with-colon">
    <choose>
      <if type="article-journal">
        <choose>
          <if variable="volume issue" match="any">
            <number variable="page"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-journal-join-with-comma">
    <choose>
      <if type="article-journal">
        <choose>
          <if variable="volume issue" match="none">
            <number variable="page"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="archive-note">
    <choose>
      <if type="thesis">
        <group delimiter=" ">
          <text variable="archive"/>
          <text variable="archive_location" prefix="(" suffix=")"/>
        </group>
      </if>
      <else-if>
        <conditions match="all">
          <condition match="none" type="article-magazine interview"/>
          <condition match="all" variable="archive"/>
        </conditions>
        <group delimiter=", ">
          <text variable="archive_location"/>
          <text variable="archive"/>
          <text variable="archive-place"/>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="archive">
    <choose>
      <if type="thesis">
        <group delimiter=" ">
          <text variable="archive"/>
          <text variable="archive_location" prefix="(" suffix=")"/>
        </group>
      </if>
      <else-if>
        <conditions match="all">
          <condition match="none" type="article-magazine interview"/>
          <condition match="all" variable="archive"/>
        </conditions>
        <group delimiter=". ">
          <text variable="archive_location" text-case="capitalize-first"/>
          <text variable="archive"/>
          <text variable="archive-place"/>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="issue-note-join-with-space">
    <choose>
      <if type="article-journal manuscript thesis treaty" variable="publisher-place publisher" match="any">
        <!--Chicago doesn't use publisher/place for Newspapers and we want the date delimited by a comma-->
        <choose>
          <if type="article-newspaper" match="none">
            <choose>
              <if type="article-journal" match="none">
                <text macro="issue-note"/>
              </if>
              <else-if variable="issue volume" match="any">
                <text macro="issue-note"/>
              </else-if>
            </choose>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="issue-note-join-with-comma">
    <choose>
      <if type="article-journal manuscript thesis treaty" variable="publisher-place publisher" match="none">
        <text macro="issue-note"/>
      </if>
      <else-if type="article-newspaper">
        <text macro="issue-note"/>
      </else-if>
      <else-if type="article-journal">
        <choose>
          <if variable="volume issue" match="none">
            <text macro="issue-note"/>
          </if>
        </choose>
      </else-if>
    </choose>
  </macro>
  <macro name="issue-note">
    <choose>
      <if type="article-journal">
        <choose>
          <if variable="volume issue" match="any">
            <text macro="issued" prefix="(" suffix=")"/>
          </if>
          <else>
            <text macro="issued"/>
          </else>
        </choose>
      </if>
      <else-if type="article-newspaper">
        <text macro="issued"/>
      </else-if>
      <else-if type="report" variable="publisher-place event-place publisher genre" match="any">
        <group prefix="(" suffix=")" delimiter=", ">
          <choose>
            <if variable="title" match="none"/>
            <else-if type="manuscript thesis speech" match="any">
              <text variable="genre"/>
            </else-if>
          </choose>
          <text macro="event-note"/>
          <group delimiter="; ">
            <text macro="originally-published"/>
            <group delimiter=", ">
              <text macro="reprint-note"/>
              <choose>
                <if match="none" variable="publisher">
                  <names variable="authority">
                    <name/>
                    <institution institution-parts="short">
                      <institution-part name="short" strip-periods="true"/>
                    </institution>
                  </names>
                </if>
                <else>
                  <text macro="publisher"/>
                </else>
              </choose>
            </group>
          </group>
          <text macro="issued"/>
        </group>
      </else-if>
      <else>
        <text macro="issued"/>
      </else>
    </choose>
  </macro>
  <macro name="issue-join-with-space">
    <choose>
      <if type="article-journal" match="any">
        <choose>
          <if variable="issue volume" match="any">
            <text macro="issue"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="issue-join-with-period">
    <choose>
      <if type="article-journal" match="none">
        <choose>
          <if type="speech" variable="publisher publisher-place" match="any">
            <text macro="issue"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="issue-join-with-comma">
    <choose>
      <if type="article-journal" match="none">
        <choose>
          <if type="speech" variable="publisher publisher-place" match="none">
            <text macro="issue"/>
          </if>
        </choose>
      </if>
      <else-if variable="volume issue" match="none">
        <text macro="issue"/>
      </else-if>
    </choose>
  </macro>
  <macro name="issue">
    <choose>
      <if type="article-journal">
        <choose>
          <if variable="issue volume" match="any">
            <text macro="issued" prefix="(" suffix=")"/>
          </if>
          <else>
            <text macro="issued"/>
          </else>
        </choose>
      </if>
      <else-if type="paper-conference">
        <choose>
          <if match="none" variable="publisher">
            <group delimiter=". ">
              <group delimiter=", held ">
                <text variable="event"/>
                <date variable="event-date" form="text" date-parts="year-month-day"/>
              </group>
              <group delimiter=", ">
                <names variable="authority">
                  <name/>
                  <institution/>
                </names>
                <date variable="issued" form="text" date-parts="year"/>
              </group>
            </group>
          </if>
        </choose>
      </else-if>
      <else-if type="speech">
        <group delimiter=", ">
          <group delimiter=" ">
            <choose>
              <if variable="title" match="none"/>
              <else>
                <text variable="genre" text-case="capitalize-first"/>
              </else>
            </choose>
            <text macro="event"/>
          </group>
          <text variable="event-place"/>
          <text macro="issued"/>
        </group>
      </else-if>
      <!--Chicago doesn't use publisher/place for Newspapers -->
      <else-if type="article-newspaper">
        <text macro="issued"/>
      </else-if>
      <else-if type="report" variable="publisher-place publisher" match="any">
        <group delimiter=", ">
          <choose>
            <if type="thesis">
              <text variable="genre" text-case="capitalize-first"/>
            </if>
          </choose>
          <group delimiter=". ">
            <text macro="originally-published"/>
            <group delimiter=", ">
              <text macro="reprint"/>
              <choose>
                <if match="none" variable="publisher">
                  <names variable="authority">
                    <name/>
                    <institution institution-parts="short">
                      <institution-part name="short" strip-periods="true"/>
                    </institution>
                  </names>
                </if>
                <else>
                  <text macro="publisher"/>
                </else>
              </choose>
            </group>
          </group>
          <text macro="issued"/>
        </group>
      </else-if>
      <else>
        <text macro="issued"/>
      </else>
    </choose>
  </macro>
  <macro name="access-note">
    <group delimiter=", ">
      <choose>
        <if type="graphic report" match="any">
          <text macro="archive-note"/>
        </if>
        <else-if type="article-journal bill book chapter motion_picture paper-conference" match="none">
          <text macro="archive-note"/>
        </else-if>
      </choose>
      <choose>
        <if variable="issued" match="none">
          <group delimiter=" ">
            <text term="accessed"/>
            <date variable="accessed" form="text"/>
          </group>
        </if>
      </choose>
      <!-- choose>
        <if variable="DOI">
          <text variable="DOI" prefix="doi:"/>
        </if>
        <else -->
          <text variable="URL"/>
        <!-- /else>
      </choose -->
    </group>
  </macro>
  <macro name="access">
    <group delimiter=". ">
      <choose>
        <if type="graphic report" match="any">
          <text macro="archive"/>
        </if>
        <else-if type="article-journal bill book chapter motion_picture paper-conference" match="none">
          <text macro="archive"/>
        </else-if>
      </choose>
      <choose>
        <if variable="issued" match="none">
          <group delimiter=" ">
            <text term="accessed" text-case="capitalize-first"/>
            <date variable="accessed" form="text"/>
          </group>
        </if>
      </choose>
      <!-- choose>
        <if variable="DOI">
          <text variable="DOI" prefix="doi:"/>
        </if>
        <else -->
          <text variable="URL"/>
        <!-- /else>
      </choose -->
    </group>
  </macro>

  <macro name="at-locator-label">
    <text value="at"/>
  </macro>

  <macro name="juris-title">
    <text value="[HINT: Install the Myles plugin, available at https://juris-m.github.io/downloads]"/>
  </macro>
  <macro name="juris-main">
    <text value=""/>
  </macro>
  <macro name="juris-tail">
    <text value=""/>
  </macro>
  <macro name="juris-title-short">
    <text value=""/>
  </macro>
  <macro name="juris-main-short">
    <text value=""/>
  </macro>
  <macro name="juris-tail-short">
    <text value=""/>
  </macro>
  <macro name="juris-locator">
    <text value=""/>
  </macro>

  <macro name="jurism">
    <choose>
      <if position="ibid-with-locator">
        <group delimiter=" ">
          <text term="ibid"/>
          <group delimiter=" " require="empty-label">
            <text value="at"/>
            <text macro="juris-locator" label-form="symbol"/>
          </group>
          <group reject="empty-label">
            <text macro="juris-locator" label-form="symbol"/>
          </group>
        </group>
      </if>
      <else-if position="ibid">
        <text term="ibid"/>
      </else-if>
      <else-if>
        <!-- short form -->
        <conditions match="any">
          <condition match="all" position="near-note"/>
          <condition match="all" type="report" variable="title" position="far-note"/>
          <condition match="all" type="report" variable="committee" position="far-note"/>
          <condition match="all" type="hearing" variable="committee" position="far-note"/>
          <condition match="all" type="legal_case" variable="document-name" position="far-note"/>
        </conditions>
        <group delimiter=", ">
          <choose>
            <if>
              <conditions match="all">
                <condition type="legal_case"/>
                <condition match="none" variable="document-name"/>
              </conditions>
              <text macro="juris-title-short" font-style="italic"/>
            </if>
            <else-if type="hearing">
              <text macro="juris-title-short" font-style="italic"/>
            </else-if>
            <else-if match="all" type="report">
              <text macro="juris-title-short" text-case="title"/>
            </else-if>
            <else>
              <text macro="juris-title-short"/>
            </else>
          </choose>
          <choose>
            <if>
              <conditions match="any">
                <condition match="all" type="hearing" variable="committee"/>
                <condition match="all" type="report" variable="title"/>
                <condition match="all" type="report" variable="committee"/>
                <condition match="all" type="legal_case" variable="document-name"/>
              </conditions>
              <group delimiter=", ">
                <group delimiter=" ">
                  <text value="supra" font-style="italic"/>
                  <text term="note"/>
                  <text variable="first-reference-note-number"/>
                </group>
                <group delimiter=" " require="empty-label">
                  <text value="at"/>
                  <text macro="juris-locator" label-form="symbol"/>
                </group>
                <group reject="empty-label">
                  <text macro="juris-locator" label-form="symbol"/>
                </group>
              </group>
            </if>
            <else>
              <group delimiter=" ">
                <group delimiter=", ">
                  <choose>
                    <if>
                      <conditions match="all">
                        <condition type="hearing"/>
                        <condition match="none" variable="committee"/>
                      </conditions>
                      <text macro="juris-main-short" text-case="title"/>
                    </if>
                    <else-if>
                      <conditions match="all">
                        <condition type="report"/>
                        <condition match="none" variable="committee title"/>
                      </conditions>
                      <text macro="juris-main-short" text-case="title"/>
                    </else-if>
                    <else>
                      <text macro="juris-main-short"/>
                    </else>
                  </choose>
                  <group require="comma-safe">
                    <text macro="juris-locator" label-form="symbol"/>
                  </group>
                </group>
                <group delimiter=" " require="empty-label">
                  <text value="at"/>
                  <text macro="juris-locator" label-form="symbol"/>
                </group>
                <group delimiter=" " reject="comma-safe">
                  <text macro="juris-locator" label-form="symbol"/>
                </group>
                <text macro="juris-tail-short"/>
              </group>
            </else>
          </choose>
        </group>
      </else-if>
      <else>
        <!-- full form -->
        <group delimiter=" ">
          <group delimiter=", ">
            <choose>
              <if type="hearing">
                <text macro="juris-title" font-style="italic"/>
              </if>
              <else-if type="report">
                <text macro="juris-title" text-case="title"/>
              </else-if>
              <else>
                <text macro="juris-title"/>
              </else>
            </choose>
            <group delimiter=" ">
              <group delimiter=", ">
                <choose>
                  <if>
                    <conditions match="all">
                      <condition match="all" type="report"/>
                      <condition match="none" variable="title committee"/>
                    </conditions>
                    <text macro="juris-main" text-case="title"/>
                  </if>
                  <else-if>
                    <conditions match="all">
                      <condition match="all" type="hearing"/>
                      <condition match="none" variable="committee"/>
                    </conditions>
                    <text macro="juris-main" text-case="title"/>
                  </else-if>
                  <else>
                    <text macro="juris-main"/>
                  </else>
                </choose>
                <choose>
                  <if match="all" variable="locator number" type="report">
                    <group delimiter=" " require="empty-label">
                      <text value="at"/>
                      <text macro="juris-locator" label-form="symbol"/>
                    </group>
                    <group reject="empty-label">
                      <text macro="juris-locator" label-form="symbol"/>
                    </group>
                  </if>
                  <else>
                    <group delimiter=" " require="comma-safe">
                      <text macro="juris-locator" label-form="symbol"/>
                    </group>
                  </else>
                </choose>
              </group>
            </group>
          </group>
          <group delimiter=" " reject="comma-safe">
            <text macro="juris-locator" label-form="symbol"/>
          </group>
          <text macro="juris-tail"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="category">
    <choose>
      <if type="legislation">
        <text value="01"/>
      </if>
      <else-if type="regulation">
        <text value="02"/>
      </else-if>
      <else-if type="legal_case">
        <text value="03"/>
      </else-if>
      <else-if type="bill">
        <text value="04"/>
      </else-if>
      <else-if match="all" type="report hearing" variable="jurisdiction">
        <text value="05"/>
      </else-if>
      <else-if match="any" type="report hearing">
        <text value="06"/>
      </else-if>
      <else-if match="any" type="book chapter thesis">
        <text value="07"/>
      </else-if>
      <else-if type="article-journal">
        <text value="08"/>
      </else-if>
      <else-if type="article-magazine article-newspaper">
        <text value="09"/>
      </else-if>
      <else>
        <text value="10"/>
      </else>
    </choose>
  </macro>
  <macro name="author-flag">
    <choose>
      <if>
        <conditions match="all">
          <condition match="any" variable="author editor translator"/>
          <condition match="none" type="legal_case"/>
        </conditions>
        <text value="1"/>
      </if>
      <else-if match="all" variable="title" type="legal_case regulation legislation bill">
        <text value="2"/>
      </else-if>
      <else-if>
        <conditions match="all">
          <condition match="all" type="legal_case regulation legislation bill"/>
          <condition match="none" variable="title"/>
        </conditions>
        <text value="3"/>
      </else-if>
      <else>
        <text value="4"/>
      </else>
    </choose>
  </macro>
  <macro name="authority-sort">
    <choose>
      <if match="any" type="regulation legislation hearing"/>
      <else-if match="all" type="legal_case" variable="title"/>
      <else-if match="all" type="report" variable="jurisdiction title"/>
      <else>
        <names variable="authority">
          <name/>
          <institution institution-parts="short"/>
        </names>
      </else>
    </choose>
  </macro>
  <macro name="contributors-sort">
    <choose>
      <if type="legal_case" match="none">
        <names variable="author">
          <name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
          <institution/>
          <substitute>
            <names variable="editor"/>
            <names variable="translator"/>
            <text macro="authority-sort"/>
            <text macro="title"/>
          </substitute>
        </names>
      </if>
    </choose>
  </macro>
  <citation et-al-min="4" et-al-use-first="1" disambiguate-add-names="true">
    <layout suffix="." delimiter="; ">
      <choose>
        <if>
          <conditions match="all">
            <condition match="any" type="legal_case legislation bill hearing report regulation"/>
            <condition match="all" variable="jurisdiction"/>
          </conditions>
          <text macro="jurism"/>
        </if>
        <else-if position="ibid-with-locator">
          <group delimiter=", ">
            <text term="ibid"/>
            <text macro="point-locators-subsequent"/>
          </group>
        </else-if>
        <else-if position="ibid">
          <text term="ibid"/>
        </else-if>
        <else-if position="subsequent">
          <group delimiter=", ">
            <text macro="contributors-short"/>
            <group delimiter=" ">
              <group delimiter=", ">
                <text macro="title-short"/>
                <!--if title & author are the same: -->
                <text macro="date-disambiguate"/>
              </group>
            </group>
            <text macro="point-locators-subsequent"/>
          </group>
        </else-if>
        <else>
          <group delimiter=", ">
            <group delimiter=": ">
              <group delimiter=", ">
                <group delimiter=" ">
                  <group delimiter=", ">
                    <group delimiter=" ">
                      <group delimiter=", ">
                        <group delimiter=", ">
                          <text macro="contributors-note"/>
                          <text macro="title-note"/>
                        </group>
                        <text macro="description-note"/>
                        <text macro="secondary-contributors-note"/>
                        <text macro="container-title-note"/>
                        <text macro="container-contributors-note"/>
                      </group>
                      <text macro="locators-note-join-with-space"/>
                    </group>
                    <text macro="locators-note-join-with-comma"/>
                    <text macro="collection-title"/>
                    <text macro="issue-note-join-with-comma"/>
                  </group>
                  <text macro="issue-note-join-with-space"/>
                </group>
                <text macro="locators-newspaper"/>
                <text macro="point-locators-join-with-comma"/>
              </group>
              <text macro="point-locators-join-with-colon"/>
            </group>
            <text macro="access-note"/>
          </group>
        </else>
      </choose>
    </layout>
  </citation>
  <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
    <sort>
      <key macro="category"/>
      <key macro="author-flag"/>
      <key macro="contributors-sort"/>
      <key variable="title"/>
      <key variable="genre"/>
      <key variable="issued"/>
    </sort>
    <layout suffix=".">
      <group delimiter=" ">
        <choose>
          <if>
            <conditions match="all">
              <condition match="any" type="legal_case legislation bill hearing report regulation"/>
              <condition match="all" variable="jurisdiction"/>
            </conditions>
            <text macro="jurism"/>
          </if>
          <else>
            <group delimiter=". ">
              <group delimiter=": ">
                <group delimiter=", ">
                  <group delimiter=" ">
                    <group delimiter=". ">
                      <group delimiter=" ">
                        <group delimiter=", ">
                          <group delimiter=". ">
                            <group delimiter=". ">
                              <text macro="contributors"/>
                              <text macro="title"/>
                            </group>
                            <text macro="description"/>
                            <text macro="secondary-contributors"/>
                            <group delimiter=", ">
                              <text macro="container-title"/>
                              <text macro="container-contributors"/>
                            </group>
                            <text macro="locators-join-with-period"/>
                          </group>
                          <text macro="locators-join-with-comma"/>
                          <text macro="locators-chapter"/>
                        </group>
                        <text macro="locators-join-with-space"/>
                      </group>
                      <text macro="collection-title"/>
                      <text macro="issue-join-with-period"/>
                    </group>
                    <text macro="issue-join-with-space"/>
                  </group>
                  <text macro="issue-join-with-comma"/>
                  <text macro="locators-journal-join-with-comma"/>
                  <text macro="locators-newspaper"/>
                </group>
                <text macro="locators-journal-join-with-colon"/>
              </group>
              <text macro="access"/>
            </group>
          </else>
        </choose>
        <choose>
          <if match="all" variable="language-name language-name-original">
            <group delimiter=" " prefix="[" suffix="]">
              <text variable="language-name" form="short"/>
              <text value="translation"/>
              <choose>
                <if match="all" variable="jurisdiction">
                  <names variable="translator" prefix="by ">
                    <name/>
                    <institution/>
                  </names>
                </if>
              </choose>
              <text value="from"/>
              <text variable="language-name-original" suffix=" original" form="short"/>
            </group>
          </if>
        </choose>
      </group>
    </layout>
  </bibliography>
</style>
<<===== CSL =====<<


>>===== INPUT =====>>
[
	{
		"type": "entry-encyclopedia",
		"multi": {
			"main": {},
			"_keys": {}
		},
		"id": "ITEM-1",
		"title": "Junior's",
		"container-title": "Wikipedia, the free encyclopedia",
		"source": "Wikipedia",
		"abstract": "Junior's is a restaurant at 386 Flatbush Avenue Extension at the corner of DeKalb Avenue in Downtown Brooklyn, New York City. The restaurant also has a location inside Grand Central Terminal in Midtown Manhattan, one in the Times Square area, and one in the lobby of the MGM Grand Hotel in the Foxwoods Resort in Ledyard, Connecticut. The restaurant was founded by Harry Rosen in 1950. According to the restaurant, it was named Junior's after Rosen's two sons, Walter and Marvin.",
		"URL": "https://en.wikipedia.org/w/index.php?title=Junior%27s&oldid=696914641",
		"note": "Page Version ID: 696914641",
		"language": "en",
		"issued": {
			"raw": "2015-12-26T22:30:36Z"
		},
		"accessed": {
			"raw": "2016-03-20T13:11:57Z"
		}
	}
]
<<===== INPUT =====<<
