@citestyle/styles 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -60
- package/ama.js +1139 -0
- package/apa.js +3707 -0
- package/chicago-author-date.js +6125 -0
- package/harvard.js +1235 -0
- package/ieee.js +1316 -0
- package/mla.js +2349 -0
- package/nature.js +1035 -0
- package/package.json +30 -5
- package/science.js +1070 -0
- package/types.d.ts +5 -1
- package/vancouver.js +993 -0
package/harvard.js
ADDED
|
@@ -0,0 +1,1235 @@
|
|
|
1
|
+
// Generated by @citestyle/compiler — do not edit
|
|
2
|
+
// Source: Cite Them Right 12th edition (author-date/Harvard)
|
|
3
|
+
import { formatNames, formatDate, escapeHtml, stripFormatting, toHtml, titleCase, sentenceCase, capitalize, applyTextCase, stripNocaseSpans, ordinal, roman, pageRange } from '@citestyle/core'
|
|
4
|
+
|
|
5
|
+
export const meta = {
|
|
6
|
+
"id": "harvard-cite-them-right",
|
|
7
|
+
"title": "Cite Them Right 12th edition (author-date/Harvard)",
|
|
8
|
+
"class": "in-text",
|
|
9
|
+
"version": "1.0",
|
|
10
|
+
"compiledWith": "@citestyle/compiler@0.1.0",
|
|
11
|
+
"disambiguateAddYearSuffix": true,
|
|
12
|
+
"disambiguateAddNames": true,
|
|
13
|
+
"disambiguateAddGivenname": true,
|
|
14
|
+
"givennameDisambiguationRule": "by-cite",
|
|
15
|
+
"collapse": "year",
|
|
16
|
+
"citationLayoutDelimiter": "; ",
|
|
17
|
+
"citationLayoutPrefix": "(",
|
|
18
|
+
"citationLayoutSuffix": ")"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const T = {
|
|
22
|
+
"accessed": "accessed",
|
|
23
|
+
"advance-online-publication": "advance online publication",
|
|
24
|
+
"album": "album",
|
|
25
|
+
"and": "and",
|
|
26
|
+
"and others": "and others",
|
|
27
|
+
"anonymous": "anonymous",
|
|
28
|
+
"at": "at",
|
|
29
|
+
"audio-recording": "audio recording",
|
|
30
|
+
"available at": "available at",
|
|
31
|
+
"by": "by",
|
|
32
|
+
"circa": "circa",
|
|
33
|
+
"cited": "cited",
|
|
34
|
+
"et-al": "et al.",
|
|
35
|
+
"film": "film",
|
|
36
|
+
"forthcoming": "forthcoming",
|
|
37
|
+
"from": "from",
|
|
38
|
+
"henceforth": "henceforth",
|
|
39
|
+
"ibid": "ibid.",
|
|
40
|
+
"in": "in",
|
|
41
|
+
"in press": "in press",
|
|
42
|
+
"internet": "internet",
|
|
43
|
+
"letter": "letter",
|
|
44
|
+
"loc-cit": "loc. cit.",
|
|
45
|
+
"no date": "no date",
|
|
46
|
+
"no-place": "no place",
|
|
47
|
+
"no-publisher": "no publisher",
|
|
48
|
+
"on": "on",
|
|
49
|
+
"online": "online",
|
|
50
|
+
"op-cit": "op. cit.",
|
|
51
|
+
"original-work-published": "original work published",
|
|
52
|
+
"personal-communication": "personal communication",
|
|
53
|
+
"podcast": "podcast",
|
|
54
|
+
"podcast-episode": "podcast episode",
|
|
55
|
+
"preprint": "preprint",
|
|
56
|
+
"presented at": "presented at the",
|
|
57
|
+
"radio-broadcast": "radio broadcast",
|
|
58
|
+
"radio-series": "radio series",
|
|
59
|
+
"radio-series-episode": "radio series episode",
|
|
60
|
+
"reference": {
|
|
61
|
+
"single": "reference",
|
|
62
|
+
"multiple": "references"
|
|
63
|
+
},
|
|
64
|
+
"retrieved": "retrieved",
|
|
65
|
+
"review-of": "review of",
|
|
66
|
+
"scale": "scale",
|
|
67
|
+
"special-issue": "special issue",
|
|
68
|
+
"special-section": "special section",
|
|
69
|
+
"television-broadcast": "television broadcast",
|
|
70
|
+
"television-series": "television series",
|
|
71
|
+
"television-series-episode": "television series episode",
|
|
72
|
+
"video": "video",
|
|
73
|
+
"working-paper": "working paper",
|
|
74
|
+
"advance-online-publication:short": "adv. online pub.",
|
|
75
|
+
"anonymous:short": "anon.",
|
|
76
|
+
"audio-recording:short": "au. rec.",
|
|
77
|
+
"available at:short": "avail. at",
|
|
78
|
+
"circa:short": "c.",
|
|
79
|
+
"cited:short": "cit.",
|
|
80
|
+
"film:short": "flm.",
|
|
81
|
+
"from:short": "fr.",
|
|
82
|
+
"letter:short": "let.",
|
|
83
|
+
"no date:short": "n.d.",
|
|
84
|
+
"no-place:short": "n.p.",
|
|
85
|
+
"no-publisher:short": "n.p.",
|
|
86
|
+
"original-work-published:short": "orig. pub.",
|
|
87
|
+
"personal-communication:short": "pers. comm.",
|
|
88
|
+
"podcast-episode:short": "podcast ep.",
|
|
89
|
+
"radio-broadcast:short": "radio bdcst.",
|
|
90
|
+
"radio-series:short": "radio ser.",
|
|
91
|
+
"radio-series-episode:short": "radio ser. ep.",
|
|
92
|
+
"reference:short": {
|
|
93
|
+
"single": "ref.",
|
|
94
|
+
"multiple": "refs."
|
|
95
|
+
},
|
|
96
|
+
"retrieved:short": "rtvd.",
|
|
97
|
+
"review-of:short": "rev. of",
|
|
98
|
+
"scale:short": "sc.",
|
|
99
|
+
"special-issue:short": "spec. iss.",
|
|
100
|
+
"special-section:short": "spec. sec.",
|
|
101
|
+
"television-broadcast:short": "TV bdcst.",
|
|
102
|
+
"television-series:short": "TV ser.",
|
|
103
|
+
"television-series-episode:short": "TV ser. ep.",
|
|
104
|
+
"video:short": "vid.",
|
|
105
|
+
"working-paper:short": "wkg. paper",
|
|
106
|
+
"and:symbol": "&",
|
|
107
|
+
"at:symbol": "@",
|
|
108
|
+
"article": "preprint",
|
|
109
|
+
"article-journal": "journal article",
|
|
110
|
+
"article-magazine": "magazine article",
|
|
111
|
+
"article-newspaper": "newspaper article",
|
|
112
|
+
"bill": "bill",
|
|
113
|
+
"broadcast": "broadcast",
|
|
114
|
+
"classic": "classical work",
|
|
115
|
+
"collection": "archival collection",
|
|
116
|
+
"dataset": "dataset",
|
|
117
|
+
"document": "document",
|
|
118
|
+
"entry": "entry",
|
|
119
|
+
"entry-dictionary": "dictionary entry",
|
|
120
|
+
"entry-encyclopedia": "encyclopedia entry",
|
|
121
|
+
"event": "event",
|
|
122
|
+
"graphic": "graphic",
|
|
123
|
+
"hearing": "hearing",
|
|
124
|
+
"interview": "interview",
|
|
125
|
+
"legal_case": "legal case",
|
|
126
|
+
"legislation": "legislation",
|
|
127
|
+
"manuscript": "manuscript",
|
|
128
|
+
"map": "map",
|
|
129
|
+
"motion_picture": "video recording",
|
|
130
|
+
"musical_score": "musical score",
|
|
131
|
+
"pamphlet": "pamphlet",
|
|
132
|
+
"paper-conference": "conference paper",
|
|
133
|
+
"patent": "patent",
|
|
134
|
+
"performance": "performance",
|
|
135
|
+
"periodical": "periodical",
|
|
136
|
+
"personal_communication": "personal communication",
|
|
137
|
+
"post": "post",
|
|
138
|
+
"post-weblog": "blog post",
|
|
139
|
+
"regulation": "regulation",
|
|
140
|
+
"report": "report",
|
|
141
|
+
"review": "review",
|
|
142
|
+
"review-book": "book review",
|
|
143
|
+
"software": "software",
|
|
144
|
+
"song": "audio recording",
|
|
145
|
+
"speech": "presentation",
|
|
146
|
+
"standard": "standard",
|
|
147
|
+
"thesis": "thesis",
|
|
148
|
+
"treaty": "treaty",
|
|
149
|
+
"webpage": "webpage",
|
|
150
|
+
"article-journal:short": "jour. art.",
|
|
151
|
+
"article-magazine:short": "mag. art.",
|
|
152
|
+
"article-newspaper:short": "newspaper art.",
|
|
153
|
+
"broadcast:short": "bdcst.",
|
|
154
|
+
"classic:short": "class. wk.",
|
|
155
|
+
"collection:short": "arch. coll.",
|
|
156
|
+
"document:short": "doc.",
|
|
157
|
+
"entry-dictionary:short": "dict. entry",
|
|
158
|
+
"entry-encyclopedia:short": "ency. entry",
|
|
159
|
+
"graphic:short": "gr.",
|
|
160
|
+
"interview:short": "int.",
|
|
161
|
+
"legal_case:short": "leg. case",
|
|
162
|
+
"legislation:short": "legis.",
|
|
163
|
+
"manuscript:short": {
|
|
164
|
+
"single": "MS",
|
|
165
|
+
"multiple": "MSS"
|
|
166
|
+
},
|
|
167
|
+
"motion_picture:short": "vid. rec.",
|
|
168
|
+
"musical_score:short": "mus. score",
|
|
169
|
+
"pamphlet:short": "pam.",
|
|
170
|
+
"paper-conference:short": "conf. paper",
|
|
171
|
+
"patent:short": "pat.",
|
|
172
|
+
"performance:short": "prfm.",
|
|
173
|
+
"personal_communication:short": "pers. comm.",
|
|
174
|
+
"regulation:short": "reg.",
|
|
175
|
+
"report:short": "rep.",
|
|
176
|
+
"review:short": "rev.",
|
|
177
|
+
"review-book:short": "bk. rev.",
|
|
178
|
+
"software:short": "sftw.",
|
|
179
|
+
"song:short": "au. rec.",
|
|
180
|
+
"standard:short": "std.",
|
|
181
|
+
"thesis:short": "thes.",
|
|
182
|
+
"webpage:short": "webpg.",
|
|
183
|
+
"hearing:verb": "testimony of",
|
|
184
|
+
"review:verb": "review of",
|
|
185
|
+
"review-book:verb": "review of the book",
|
|
186
|
+
"hearing:verb-short": "test. of",
|
|
187
|
+
"review:verb-short": "rev. of",
|
|
188
|
+
"review-book:verb-short": "rev. of the bk.",
|
|
189
|
+
"ad": "AD",
|
|
190
|
+
"bc": "BC",
|
|
191
|
+
"bce": "BCE",
|
|
192
|
+
"ce": "CE",
|
|
193
|
+
"open-quote": "“",
|
|
194
|
+
"close-quote": "”",
|
|
195
|
+
"open-inner-quote": "‘",
|
|
196
|
+
"close-inner-quote": "’",
|
|
197
|
+
"page-range-delimiter": "–",
|
|
198
|
+
"colon": ":",
|
|
199
|
+
"comma": ",",
|
|
200
|
+
"semicolon": ";",
|
|
201
|
+
"ordinal": "th",
|
|
202
|
+
"ordinal-01": "st",
|
|
203
|
+
"ordinal-02": "nd",
|
|
204
|
+
"ordinal-03": "rd",
|
|
205
|
+
"ordinal-11": "th",
|
|
206
|
+
"ordinal-12": "th",
|
|
207
|
+
"ordinal-13": "th",
|
|
208
|
+
"long-ordinal-01": "first",
|
|
209
|
+
"long-ordinal-02": "second",
|
|
210
|
+
"long-ordinal-03": "third",
|
|
211
|
+
"long-ordinal-04": "fourth",
|
|
212
|
+
"long-ordinal-05": "fifth",
|
|
213
|
+
"long-ordinal-06": "sixth",
|
|
214
|
+
"long-ordinal-07": "seventh",
|
|
215
|
+
"long-ordinal-08": "eighth",
|
|
216
|
+
"long-ordinal-09": "ninth",
|
|
217
|
+
"long-ordinal-10": "tenth",
|
|
218
|
+
"act": {
|
|
219
|
+
"single": "act",
|
|
220
|
+
"multiple": "acts"
|
|
221
|
+
},
|
|
222
|
+
"appendix": {
|
|
223
|
+
"single": "appendix",
|
|
224
|
+
"multiple": "appendices"
|
|
225
|
+
},
|
|
226
|
+
"article-locator": {
|
|
227
|
+
"single": "article",
|
|
228
|
+
"multiple": "articles"
|
|
229
|
+
},
|
|
230
|
+
"book": {
|
|
231
|
+
"single": "book",
|
|
232
|
+
"multiple": "books"
|
|
233
|
+
},
|
|
234
|
+
"canon": {
|
|
235
|
+
"single": "canon",
|
|
236
|
+
"multiple": "canons"
|
|
237
|
+
},
|
|
238
|
+
"chapter": {
|
|
239
|
+
"single": "chapter",
|
|
240
|
+
"multiple": "chapters"
|
|
241
|
+
},
|
|
242
|
+
"column": {
|
|
243
|
+
"single": "column",
|
|
244
|
+
"multiple": "columns"
|
|
245
|
+
},
|
|
246
|
+
"elocation": {
|
|
247
|
+
"single": "location",
|
|
248
|
+
"multiple": "locations"
|
|
249
|
+
},
|
|
250
|
+
"equation": {
|
|
251
|
+
"single": "equation",
|
|
252
|
+
"multiple": "equations"
|
|
253
|
+
},
|
|
254
|
+
"figure": {
|
|
255
|
+
"single": "figure",
|
|
256
|
+
"multiple": "figures"
|
|
257
|
+
},
|
|
258
|
+
"folio": {
|
|
259
|
+
"single": "folio",
|
|
260
|
+
"multiple": "folios"
|
|
261
|
+
},
|
|
262
|
+
"issue": {
|
|
263
|
+
"single": "issue",
|
|
264
|
+
"multiple": "issues"
|
|
265
|
+
},
|
|
266
|
+
"line": {
|
|
267
|
+
"single": "line",
|
|
268
|
+
"multiple": "lines"
|
|
269
|
+
},
|
|
270
|
+
"note": {
|
|
271
|
+
"single": "note",
|
|
272
|
+
"multiple": "notes"
|
|
273
|
+
},
|
|
274
|
+
"opus": {
|
|
275
|
+
"single": "opus",
|
|
276
|
+
"multiple": "opera"
|
|
277
|
+
},
|
|
278
|
+
"page": {
|
|
279
|
+
"single": "page",
|
|
280
|
+
"multiple": "pages"
|
|
281
|
+
},
|
|
282
|
+
"paragraph": {
|
|
283
|
+
"single": "paragraph",
|
|
284
|
+
"multiple": "paragraphs"
|
|
285
|
+
},
|
|
286
|
+
"part": {
|
|
287
|
+
"single": "part",
|
|
288
|
+
"multiple": "parts"
|
|
289
|
+
},
|
|
290
|
+
"rule": {
|
|
291
|
+
"single": "rule",
|
|
292
|
+
"multiple": "rules"
|
|
293
|
+
},
|
|
294
|
+
"scene": {
|
|
295
|
+
"single": "scene",
|
|
296
|
+
"multiple": "scenes"
|
|
297
|
+
},
|
|
298
|
+
"section": {
|
|
299
|
+
"single": "section",
|
|
300
|
+
"multiple": "sections"
|
|
301
|
+
},
|
|
302
|
+
"sub-verbo": {
|
|
303
|
+
"single": "sub verbo",
|
|
304
|
+
"multiple": "sub verbis"
|
|
305
|
+
},
|
|
306
|
+
"supplement": {
|
|
307
|
+
"single": "supplement",
|
|
308
|
+
"multiple": "supplements"
|
|
309
|
+
},
|
|
310
|
+
"table": {
|
|
311
|
+
"single": "table",
|
|
312
|
+
"multiple": "tables"
|
|
313
|
+
},
|
|
314
|
+
"timestamp": "",
|
|
315
|
+
"title-locator": {
|
|
316
|
+
"single": "title",
|
|
317
|
+
"multiple": "titles"
|
|
318
|
+
},
|
|
319
|
+
"verse": {
|
|
320
|
+
"single": "verse",
|
|
321
|
+
"multiple": "verses"
|
|
322
|
+
},
|
|
323
|
+
"volume": {
|
|
324
|
+
"single": "volume",
|
|
325
|
+
"multiple": "volumes"
|
|
326
|
+
},
|
|
327
|
+
"appendix:short": {
|
|
328
|
+
"single": "app.",
|
|
329
|
+
"multiple": "apps."
|
|
330
|
+
},
|
|
331
|
+
"article-locator:short": {
|
|
332
|
+
"single": "art.",
|
|
333
|
+
"multiple": "arts."
|
|
334
|
+
},
|
|
335
|
+
"book:short": {
|
|
336
|
+
"single": "bk.",
|
|
337
|
+
"multiple": "bks."
|
|
338
|
+
},
|
|
339
|
+
"canon:short": {
|
|
340
|
+
"single": "can.",
|
|
341
|
+
"multiple": "cann."
|
|
342
|
+
},
|
|
343
|
+
"chapter:short": {
|
|
344
|
+
"single": "chap.",
|
|
345
|
+
"multiple": "chaps."
|
|
346
|
+
},
|
|
347
|
+
"column:short": {
|
|
348
|
+
"single": "col.",
|
|
349
|
+
"multiple": "cols."
|
|
350
|
+
},
|
|
351
|
+
"elocation:short": {
|
|
352
|
+
"single": "loc.",
|
|
353
|
+
"multiple": "locs."
|
|
354
|
+
},
|
|
355
|
+
"equation:short": {
|
|
356
|
+
"single": "eq.",
|
|
357
|
+
"multiple": "eqq."
|
|
358
|
+
},
|
|
359
|
+
"figure:short": {
|
|
360
|
+
"single": "fig.",
|
|
361
|
+
"multiple": "figs."
|
|
362
|
+
},
|
|
363
|
+
"folio:short": {
|
|
364
|
+
"single": "fol.",
|
|
365
|
+
"multiple": "fols."
|
|
366
|
+
},
|
|
367
|
+
"issue:short": {
|
|
368
|
+
"single": "no.",
|
|
369
|
+
"multiple": "nos."
|
|
370
|
+
},
|
|
371
|
+
"line:short": {
|
|
372
|
+
"single": "l.",
|
|
373
|
+
"multiple": "ll."
|
|
374
|
+
},
|
|
375
|
+
"note:short": {
|
|
376
|
+
"single": "n.",
|
|
377
|
+
"multiple": "nn."
|
|
378
|
+
},
|
|
379
|
+
"opus:short": {
|
|
380
|
+
"single": "op.",
|
|
381
|
+
"multiple": "opp."
|
|
382
|
+
},
|
|
383
|
+
"page:short": {
|
|
384
|
+
"single": "p.",
|
|
385
|
+
"multiple": "pp."
|
|
386
|
+
},
|
|
387
|
+
"paragraph:short": {
|
|
388
|
+
"single": "para.",
|
|
389
|
+
"multiple": "paras."
|
|
390
|
+
},
|
|
391
|
+
"part:short": {
|
|
392
|
+
"single": "pt.",
|
|
393
|
+
"multiple": "pts."
|
|
394
|
+
},
|
|
395
|
+
"rule:short": {
|
|
396
|
+
"single": "r.",
|
|
397
|
+
"multiple": "rr."
|
|
398
|
+
},
|
|
399
|
+
"scene:short": {
|
|
400
|
+
"single": "sc.",
|
|
401
|
+
"multiple": "scs."
|
|
402
|
+
},
|
|
403
|
+
"section:short": {
|
|
404
|
+
"single": "sec.",
|
|
405
|
+
"multiple": "secs."
|
|
406
|
+
},
|
|
407
|
+
"sub-verbo:short": {
|
|
408
|
+
"single": "s.v.",
|
|
409
|
+
"multiple": "s.vv."
|
|
410
|
+
},
|
|
411
|
+
"supplement:short": {
|
|
412
|
+
"single": "supp.",
|
|
413
|
+
"multiple": "supps."
|
|
414
|
+
},
|
|
415
|
+
"table:short": {
|
|
416
|
+
"single": "tbl.",
|
|
417
|
+
"multiple": "tbls."
|
|
418
|
+
},
|
|
419
|
+
"title-locator:short": {
|
|
420
|
+
"single": "tit.",
|
|
421
|
+
"multiple": "titt."
|
|
422
|
+
},
|
|
423
|
+
"verse:short": {
|
|
424
|
+
"single": "v.",
|
|
425
|
+
"multiple": "vv."
|
|
426
|
+
},
|
|
427
|
+
"volume:short": {
|
|
428
|
+
"single": "vol.",
|
|
429
|
+
"multiple": "vols."
|
|
430
|
+
},
|
|
431
|
+
"chapter:symbol": {
|
|
432
|
+
"single": "c.",
|
|
433
|
+
"multiple": "cc."
|
|
434
|
+
},
|
|
435
|
+
"paragraph:symbol": {
|
|
436
|
+
"single": "¶",
|
|
437
|
+
"multiple": "¶¶"
|
|
438
|
+
},
|
|
439
|
+
"section:symbol": {
|
|
440
|
+
"single": "§",
|
|
441
|
+
"multiple": "§§"
|
|
442
|
+
},
|
|
443
|
+
"chapter-number": {
|
|
444
|
+
"single": "chapter",
|
|
445
|
+
"multiple": "chapters"
|
|
446
|
+
},
|
|
447
|
+
"citation-number": {
|
|
448
|
+
"single": "citation",
|
|
449
|
+
"multiple": "citations"
|
|
450
|
+
},
|
|
451
|
+
"collection-number": {
|
|
452
|
+
"single": "number",
|
|
453
|
+
"multiple": "numbers"
|
|
454
|
+
},
|
|
455
|
+
"edition": {
|
|
456
|
+
"single": "edition",
|
|
457
|
+
"multiple": "editions"
|
|
458
|
+
},
|
|
459
|
+
"first-reference-note-number": {
|
|
460
|
+
"single": "reference",
|
|
461
|
+
"multiple": "references"
|
|
462
|
+
},
|
|
463
|
+
"number": {
|
|
464
|
+
"single": "number",
|
|
465
|
+
"multiple": "numbers"
|
|
466
|
+
},
|
|
467
|
+
"number-of-pages": {
|
|
468
|
+
"single": "page",
|
|
469
|
+
"multiple": "pages"
|
|
470
|
+
},
|
|
471
|
+
"number-of-volumes": {
|
|
472
|
+
"single": "volume",
|
|
473
|
+
"multiple": "volumes"
|
|
474
|
+
},
|
|
475
|
+
"page-first": {
|
|
476
|
+
"single": "page",
|
|
477
|
+
"multiple": "pages"
|
|
478
|
+
},
|
|
479
|
+
"printing": {
|
|
480
|
+
"single": "printing",
|
|
481
|
+
"multiple": "printings"
|
|
482
|
+
},
|
|
483
|
+
"version": {
|
|
484
|
+
"single": "version",
|
|
485
|
+
"multiple": "versions"
|
|
486
|
+
},
|
|
487
|
+
"chapter-number:short": {
|
|
488
|
+
"single": "chap.",
|
|
489
|
+
"multiple": "chaps."
|
|
490
|
+
},
|
|
491
|
+
"citation-number:short": {
|
|
492
|
+
"single": "cit.",
|
|
493
|
+
"multiple": "cits."
|
|
494
|
+
},
|
|
495
|
+
"collection-number:short": {
|
|
496
|
+
"single": "no.",
|
|
497
|
+
"multiple": "nos."
|
|
498
|
+
},
|
|
499
|
+
"edition:short": {
|
|
500
|
+
"single": "ed.",
|
|
501
|
+
"multiple": "eds."
|
|
502
|
+
},
|
|
503
|
+
"first-reference-note-number:short": {
|
|
504
|
+
"single": "ref.",
|
|
505
|
+
"multiple": "refs."
|
|
506
|
+
},
|
|
507
|
+
"number:short": {
|
|
508
|
+
"single": "no.",
|
|
509
|
+
"multiple": "nos."
|
|
510
|
+
},
|
|
511
|
+
"number-of-pages:short": {
|
|
512
|
+
"single": "p.",
|
|
513
|
+
"multiple": "pp."
|
|
514
|
+
},
|
|
515
|
+
"number-of-volumes:short": {
|
|
516
|
+
"single": "vol.",
|
|
517
|
+
"multiple": "vols."
|
|
518
|
+
},
|
|
519
|
+
"page-first:short": {
|
|
520
|
+
"single": "p.",
|
|
521
|
+
"multiple": "pp."
|
|
522
|
+
},
|
|
523
|
+
"printing:short": {
|
|
524
|
+
"single": "ptg.",
|
|
525
|
+
"multiple": "ptgs."
|
|
526
|
+
},
|
|
527
|
+
"version:short": "v.",
|
|
528
|
+
"author": "",
|
|
529
|
+
"chair": {
|
|
530
|
+
"single": "chair",
|
|
531
|
+
"multiple": "chairs"
|
|
532
|
+
},
|
|
533
|
+
"collection-editor": {
|
|
534
|
+
"single": "editor",
|
|
535
|
+
"multiple": "editors"
|
|
536
|
+
},
|
|
537
|
+
"compiler": {
|
|
538
|
+
"single": "compiler",
|
|
539
|
+
"multiple": "compilers"
|
|
540
|
+
},
|
|
541
|
+
"composer": "",
|
|
542
|
+
"container-author": "",
|
|
543
|
+
"contributor": {
|
|
544
|
+
"single": "contributor",
|
|
545
|
+
"multiple": "contributors"
|
|
546
|
+
},
|
|
547
|
+
"curator": {
|
|
548
|
+
"single": "curator",
|
|
549
|
+
"multiple": "curators"
|
|
550
|
+
},
|
|
551
|
+
"director": {
|
|
552
|
+
"single": "director",
|
|
553
|
+
"multiple": "directors"
|
|
554
|
+
},
|
|
555
|
+
"editor": {
|
|
556
|
+
"single": "editor",
|
|
557
|
+
"multiple": "editors"
|
|
558
|
+
},
|
|
559
|
+
"editor-translator": {
|
|
560
|
+
"single": "editor & translator",
|
|
561
|
+
"multiple": "editors & translators"
|
|
562
|
+
},
|
|
563
|
+
"editortranslator": {
|
|
564
|
+
"single": "editor & translator",
|
|
565
|
+
"multiple": "editors & translators"
|
|
566
|
+
},
|
|
567
|
+
"editorial-director": {
|
|
568
|
+
"single": "editor",
|
|
569
|
+
"multiple": "editors"
|
|
570
|
+
},
|
|
571
|
+
"executive-producer": {
|
|
572
|
+
"single": "executive producer",
|
|
573
|
+
"multiple": "executive producers"
|
|
574
|
+
},
|
|
575
|
+
"guest": {
|
|
576
|
+
"single": "guest",
|
|
577
|
+
"multiple": "guests"
|
|
578
|
+
},
|
|
579
|
+
"host": {
|
|
580
|
+
"single": "host",
|
|
581
|
+
"multiple": "hosts"
|
|
582
|
+
},
|
|
583
|
+
"illustrator": {
|
|
584
|
+
"single": "illustrator",
|
|
585
|
+
"multiple": "illustrators"
|
|
586
|
+
},
|
|
587
|
+
"interviewer": "",
|
|
588
|
+
"narrator": {
|
|
589
|
+
"single": "narrator",
|
|
590
|
+
"multiple": "narrators"
|
|
591
|
+
},
|
|
592
|
+
"organizer": {
|
|
593
|
+
"single": "organizer",
|
|
594
|
+
"multiple": "organizers"
|
|
595
|
+
},
|
|
596
|
+
"original-author": "",
|
|
597
|
+
"performer": {
|
|
598
|
+
"single": "performer",
|
|
599
|
+
"multiple": "performers"
|
|
600
|
+
},
|
|
601
|
+
"producer": {
|
|
602
|
+
"single": "producer",
|
|
603
|
+
"multiple": "producers"
|
|
604
|
+
},
|
|
605
|
+
"recipient": "",
|
|
606
|
+
"reviewed-author": "",
|
|
607
|
+
"script-writer": {
|
|
608
|
+
"single": "writer",
|
|
609
|
+
"multiple": "writers"
|
|
610
|
+
},
|
|
611
|
+
"series-creator": {
|
|
612
|
+
"single": "series creator",
|
|
613
|
+
"multiple": "series creators"
|
|
614
|
+
},
|
|
615
|
+
"translator": {
|
|
616
|
+
"single": "translator",
|
|
617
|
+
"multiple": "translators"
|
|
618
|
+
},
|
|
619
|
+
"collection-editor:short": {
|
|
620
|
+
"single": "ed.",
|
|
621
|
+
"multiple": "eds."
|
|
622
|
+
},
|
|
623
|
+
"compiler:short": {
|
|
624
|
+
"single": "comp.",
|
|
625
|
+
"multiple": "comps."
|
|
626
|
+
},
|
|
627
|
+
"contributor:short": {
|
|
628
|
+
"single": "contrib.",
|
|
629
|
+
"multiple": "contribs."
|
|
630
|
+
},
|
|
631
|
+
"curator:short": {
|
|
632
|
+
"single": "cur.",
|
|
633
|
+
"multiple": "curs."
|
|
634
|
+
},
|
|
635
|
+
"director:short": {
|
|
636
|
+
"single": "dir.",
|
|
637
|
+
"multiple": "dirs."
|
|
638
|
+
},
|
|
639
|
+
"editor:short": {
|
|
640
|
+
"single": "ed.",
|
|
641
|
+
"multiple": "eds."
|
|
642
|
+
},
|
|
643
|
+
"editor-translator:short": {
|
|
644
|
+
"single": "ed. & trans.",
|
|
645
|
+
"multiple": "eds. & trans."
|
|
646
|
+
},
|
|
647
|
+
"editortranslator:short": {
|
|
648
|
+
"single": "ed. & trans.",
|
|
649
|
+
"multiple": "eds. & trans."
|
|
650
|
+
},
|
|
651
|
+
"editorial-director:short": {
|
|
652
|
+
"single": "ed.",
|
|
653
|
+
"multiple": "eds."
|
|
654
|
+
},
|
|
655
|
+
"executive-producer:short": {
|
|
656
|
+
"single": "exec. prod.",
|
|
657
|
+
"multiple": "exec. prods."
|
|
658
|
+
},
|
|
659
|
+
"illustrator:short": {
|
|
660
|
+
"single": "ill.",
|
|
661
|
+
"multiple": "ills."
|
|
662
|
+
},
|
|
663
|
+
"narrator:short": {
|
|
664
|
+
"single": "narr.",
|
|
665
|
+
"multiple": "narrs."
|
|
666
|
+
},
|
|
667
|
+
"organizer:short": {
|
|
668
|
+
"single": "org.",
|
|
669
|
+
"multiple": "orgs."
|
|
670
|
+
},
|
|
671
|
+
"performer:short": {
|
|
672
|
+
"single": "perf.",
|
|
673
|
+
"multiple": "perfs."
|
|
674
|
+
},
|
|
675
|
+
"producer:short": {
|
|
676
|
+
"single": "prod.",
|
|
677
|
+
"multiple": "prods."
|
|
678
|
+
},
|
|
679
|
+
"script-writer:short": {
|
|
680
|
+
"single": "wrtr.",
|
|
681
|
+
"multiple": "wrtrs."
|
|
682
|
+
},
|
|
683
|
+
"series-creator:short": {
|
|
684
|
+
"single": "ser. creator",
|
|
685
|
+
"multiple": "ser. creators"
|
|
686
|
+
},
|
|
687
|
+
"translator:short": "trans.",
|
|
688
|
+
"chair:verb": "chaired by",
|
|
689
|
+
"collection-editor:verb": "edited by",
|
|
690
|
+
"compiler:verb": "compiled by",
|
|
691
|
+
"composer:verb": "composed by",
|
|
692
|
+
"container-author:verb": "by",
|
|
693
|
+
"contributor:verb": "with",
|
|
694
|
+
"curator:verb": "curated by",
|
|
695
|
+
"director:verb": "directed by",
|
|
696
|
+
"editor:verb": "edited by",
|
|
697
|
+
"editor-translator:verb": "edited & translated by",
|
|
698
|
+
"editortranslator:verb": "edited & translated by",
|
|
699
|
+
"editorial-director:verb": "edited by",
|
|
700
|
+
"executive-producer:verb": "executive produced by",
|
|
701
|
+
"guest:verb": {
|
|
702
|
+
"single": "with guest",
|
|
703
|
+
"multiple": "with guests"
|
|
704
|
+
},
|
|
705
|
+
"host:verb": "hosted by",
|
|
706
|
+
"illustrator:verb": "illustrated by",
|
|
707
|
+
"interviewer:verb": "interview by",
|
|
708
|
+
"narrator:verb": "narrated by",
|
|
709
|
+
"organizer:verb": "organized by",
|
|
710
|
+
"original-author:verb": "by",
|
|
711
|
+
"performer:verb": "performed by",
|
|
712
|
+
"producer:verb": "produced by",
|
|
713
|
+
"recipient:verb": "to",
|
|
714
|
+
"reviewed-author:verb": "by",
|
|
715
|
+
"script-writer:verb": "written by",
|
|
716
|
+
"series-creator:verb": "created by",
|
|
717
|
+
"translator:verb": "translated by",
|
|
718
|
+
"collection-editor:verb-short": "ed. by",
|
|
719
|
+
"compiler:verb-short": "comp. by",
|
|
720
|
+
"composer:verb-short": "comp. by",
|
|
721
|
+
"curator:verb-short": "cur. by",
|
|
722
|
+
"director:verb-short": "dir. by",
|
|
723
|
+
"editor:verb-short": "ed. by",
|
|
724
|
+
"editor-translator:verb-short": "ed. & trans. by",
|
|
725
|
+
"editortranslator:verb-short": "ed. & trans. by",
|
|
726
|
+
"editorial-director:verb-short": "ed. by",
|
|
727
|
+
"executive-producer:verb-short": "exec. prod. by",
|
|
728
|
+
"illustrator:verb-short": "ill. by",
|
|
729
|
+
"narrator:verb-short": "narr. by",
|
|
730
|
+
"organizer:verb-short": "org. by",
|
|
731
|
+
"performer:verb-short": "perf. by",
|
|
732
|
+
"producer:verb-short": "prod. by",
|
|
733
|
+
"script-writer:verb-short": "writ. by",
|
|
734
|
+
"translator:verb-short": "trans. by",
|
|
735
|
+
"month-01": "January",
|
|
736
|
+
"month-02": "February",
|
|
737
|
+
"month-03": "March",
|
|
738
|
+
"month-04": "April",
|
|
739
|
+
"month-05": "May",
|
|
740
|
+
"month-06": "June",
|
|
741
|
+
"month-07": "July",
|
|
742
|
+
"month-08": "August",
|
|
743
|
+
"month-09": "September",
|
|
744
|
+
"month-10": "October",
|
|
745
|
+
"month-11": "November",
|
|
746
|
+
"month-12": "December",
|
|
747
|
+
"month-01:short": "Jan.",
|
|
748
|
+
"month-02:short": "Feb.",
|
|
749
|
+
"month-03:short": "Mar.",
|
|
750
|
+
"month-04:short": "Apr.",
|
|
751
|
+
"month-05:short": "May",
|
|
752
|
+
"month-06:short": "June",
|
|
753
|
+
"month-07:short": "July",
|
|
754
|
+
"month-08:short": "Aug.",
|
|
755
|
+
"month-09:short": "Sept.",
|
|
756
|
+
"month-10:short": "Oct.",
|
|
757
|
+
"month-11:short": "Nov.",
|
|
758
|
+
"month-12:short": "Dec.",
|
|
759
|
+
"season-01": "Spring",
|
|
760
|
+
"season-02": "Summer",
|
|
761
|
+
"season-03": "Autumn",
|
|
762
|
+
"season-04": "Winter"
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
const MONTHS = {"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"}
|
|
766
|
+
|
|
767
|
+
const NAME_OPTS = {}
|
|
768
|
+
|
|
769
|
+
function _nameConfig(ctx, el) {
|
|
770
|
+
const c = Object.assign({}, NAME_OPTS, ctx._secOpts || {}, el)
|
|
771
|
+
if (el.initialize === false || (ctx._secOpts || {}).initialize === false || NAME_OPTS.initialize === false) c.initialize = false
|
|
772
|
+
if (c.and === 'text') c.andTerm = T['and'] || 'and'
|
|
773
|
+
else if (c.and === 'symbol') c.andTerm = '&'
|
|
774
|
+
if (!c.etAlTerm) c.etAlTerm = T[el._etAlTerm || 'et-al'] || 'et al.'
|
|
775
|
+
if (ctx._disambig) c._disambig = ctx._disambig
|
|
776
|
+
return c
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
function macro_editor(item, ctx) {
|
|
780
|
+
let _ch0 = ''
|
|
781
|
+
if ((item.type === "chapter" || item.type === "paper-conference")) {
|
|
782
|
+
const _gp2 = []
|
|
783
|
+
const _v3 = (T["in"] != null ? (typeof T["in"] === 'string' ? T["in"] : (T["in"].single || '')) : '')
|
|
784
|
+
_gp2.push(_v3)
|
|
785
|
+
let _n4 = ''
|
|
786
|
+
if (item["container-author"] && item["container-author"].length) {
|
|
787
|
+
_n4 = formatNames(item["container-author"], _nameConfig(ctx, {"and":"text","delimiter":", ","etAlUseLast":false,"initializeWith":". ","sortSeparator":", "}))
|
|
788
|
+
if (_n4) _n4 = '\uE020container-author\uE021' + _n4 + '\uE022'
|
|
789
|
+
}
|
|
790
|
+
_gp2.push((_n4 ? _n4 + ", " : ''))
|
|
791
|
+
if (!((item["container-author"] != null && item["container-author"] !== ''))) {
|
|
792
|
+
let _n5 = ''
|
|
793
|
+
if (item.editor && item.editor.length) {
|
|
794
|
+
_n5 = formatNames(item.editor, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlUseLast":false,"initializeWith":".","sortSeparator":", "}))
|
|
795
|
+
if (_n5) _n5 = '\uE020editor\uE021' + _n5 + '\uE022'
|
|
796
|
+
}
|
|
797
|
+
else if (item.translator && item.translator.length) {
|
|
798
|
+
_n5 = formatNames(item.translator, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlUseLast":false,"initializeWith":".","sortSeparator":", "}))
|
|
799
|
+
const _v6 = (() => {
|
|
800
|
+
const _val = item.translator
|
|
801
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
802
|
+
const _term = T["translator:short"]
|
|
803
|
+
if (_term == null) return ''
|
|
804
|
+
if (typeof _term === 'string') return _term
|
|
805
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
806
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
807
|
+
})()
|
|
808
|
+
if (_n5) _n5 += ' ' + (_v6 ? " (" + _v6 + ")" : '')
|
|
809
|
+
if (_n5) _n5 = '\uE020translator\uE021' + _n5 + '\uE022'
|
|
810
|
+
}
|
|
811
|
+
_gp2.push(_n5)
|
|
812
|
+
}
|
|
813
|
+
const _g1 = _gp2.filter(v => v !== '').join(" ")
|
|
814
|
+
_ch0 = _g1
|
|
815
|
+
}
|
|
816
|
+
return _ch0
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
function macro_secondary_contributors(item, ctx) {
|
|
820
|
+
let _ch7 = ''
|
|
821
|
+
if (!(item.type === "chapter") && !(item.type === "paper-conference")) {
|
|
822
|
+
let _n8 = ''
|
|
823
|
+
if (item.editor && item.editor.length) {
|
|
824
|
+
_n8 = formatNames(item.editor, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlUseLast":false,"initializeWith":".","sortSeparator":", "}))
|
|
825
|
+
if (_n8) _n8 = '\uE020editor\uE021' + _n8 + '\uE022'
|
|
826
|
+
}
|
|
827
|
+
else if (item.translator && item.translator.length) {
|
|
828
|
+
_n8 = formatNames(item.translator, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlUseLast":false,"initializeWith":".","sortSeparator":", "}))
|
|
829
|
+
const _v9 = (() => {
|
|
830
|
+
const _val = item.translator
|
|
831
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
832
|
+
const _term = T["translator:verb"]
|
|
833
|
+
if (_term == null) return ''
|
|
834
|
+
if (typeof _term === 'string') return _term
|
|
835
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
836
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
837
|
+
})()
|
|
838
|
+
if (_n8) _n8 += ' ' + (applyTextCase(_v9, "capitalize-first") ? applyTextCase(_v9, "capitalize-first") + " " : '')
|
|
839
|
+
if (_n8) _n8 = '\uE020translator\uE021' + _n8 + '\uE022'
|
|
840
|
+
}
|
|
841
|
+
_ch7 = _n8
|
|
842
|
+
}
|
|
843
|
+
else if ((item["container-author"] != null && item["container-author"] !== '')) {
|
|
844
|
+
let _n10 = ''
|
|
845
|
+
if (item.editor && item.editor.length) {
|
|
846
|
+
_n10 = formatNames(item.editor, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlUseLast":false,"initializeWith":". ","sortSeparator":", "}))
|
|
847
|
+
if (_n10) _n10 = '\uE020editor\uE021' + _n10 + '\uE022'
|
|
848
|
+
}
|
|
849
|
+
else if (item.translator && item.translator.length) {
|
|
850
|
+
_n10 = formatNames(item.translator, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlUseLast":false,"initializeWith":". ","sortSeparator":", "}))
|
|
851
|
+
const _v11 = (() => {
|
|
852
|
+
const _val = item.translator
|
|
853
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
854
|
+
const _term = T["translator:verb"]
|
|
855
|
+
if (_term == null) return ''
|
|
856
|
+
if (typeof _term === 'string') return _term
|
|
857
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
858
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
859
|
+
})()
|
|
860
|
+
if (_n10) _n10 += ' ' + (applyTextCase(_v11, "capitalize-first") ? applyTextCase(_v11, "capitalize-first") + " " : '')
|
|
861
|
+
if (_n10) _n10 = '\uE020translator\uE021' + _n10 + '\uE022'
|
|
862
|
+
}
|
|
863
|
+
_ch7 = _n10
|
|
864
|
+
}
|
|
865
|
+
return _ch7
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
function macro_author(item, ctx) {
|
|
869
|
+
let _n12 = ''
|
|
870
|
+
if (item.author && item.author.length) {
|
|
871
|
+
_n12 = formatNames(item.author, _nameConfig(ctx, {"and":"text","delimiter":", ","delimiterPrecedesLast":"never","etAlUseLast":false,"initializeWith":".","nameAsSortOrder":"all","sortSeparator":", "}))
|
|
872
|
+
if (_n12) _n12 = '\uE020author\uE021' + _n12 + '\uE022'
|
|
873
|
+
}
|
|
874
|
+
if (!_n12) {
|
|
875
|
+
let _n13 = ''
|
|
876
|
+
if (item.editor && item.editor.length) {
|
|
877
|
+
_n13 = formatNames(item.editor, _nameConfig(ctx, {"and":"text","delimiter":", ","delimiterPrecedesLast":"never","etAlUseLast":false,"initializeWith":".","nameAsSortOrder":"all","sortSeparator":", "}))
|
|
878
|
+
if (_n13) _n13 = '\uE020editor\uE021' + _n13 + '\uE022'
|
|
879
|
+
}
|
|
880
|
+
if (!_n12) _n12 = _n13
|
|
881
|
+
let _n14 = ''
|
|
882
|
+
if (item.translator && item.translator.length) {
|
|
883
|
+
_n14 = formatNames(item.translator, _nameConfig(ctx, {"and":"text","delimiter":", ","delimiterPrecedesLast":"never","etAlUseLast":false,"initializeWith":".","nameAsSortOrder":"all","sortSeparator":", "}))
|
|
884
|
+
if (_n14) _n14 = '\uE020translator\uE021' + _n14 + '\uE022'
|
|
885
|
+
}
|
|
886
|
+
if (!_n12) _n12 = _n14
|
|
887
|
+
let _ch15 = ''
|
|
888
|
+
if ((item.type === "article-newspaper" || item.type === "article-magazine" || item.type === "article-journal")) {
|
|
889
|
+
const _v16 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
890
|
+
_ch15 = ((applyTextCase(_v16, "title") ? '\uE000' + applyTextCase(_v16, "title") + '\uE001' : '') ? '\uE020container-title\uE021' + (applyTextCase(_v16, "title") ? '\uE000' + applyTextCase(_v16, "title") + '\uE001' : '') + '\uE022' : '')
|
|
891
|
+
}
|
|
892
|
+
else {
|
|
893
|
+
const _v17 = macro_title(item, ctx)
|
|
894
|
+
_ch15 = _v17
|
|
895
|
+
}
|
|
896
|
+
if (!_n12) _n12 = _ch15
|
|
897
|
+
}
|
|
898
|
+
return _n12
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
function macro_author_short(item, ctx) {
|
|
902
|
+
let _n18 = ''
|
|
903
|
+
if (item.author && item.author.length) {
|
|
904
|
+
_n18 = formatNames(item.author, _nameConfig(ctx, {"and":"text","delimiter":", ","delimiterPrecedesLast":"never","etAlUseLast":false,"initializeWith":". ","sortSeparator":", ","form":"short"}))
|
|
905
|
+
if (_n18) _n18 = '\uE020author\uE021' + _n18 + '\uE022'
|
|
906
|
+
}
|
|
907
|
+
if (!_n18) {
|
|
908
|
+
let _n19 = ''
|
|
909
|
+
if (item.editor && item.editor.length) {
|
|
910
|
+
_n19 = formatNames(item.editor, _nameConfig(ctx, {"and":"text","delimiter":", ","delimiterPrecedesLast":"never","etAlUseLast":false,"initializeWith":". ","sortSeparator":", ","form":"short"}))
|
|
911
|
+
if (_n19) _n19 = '\uE020editor\uE021' + _n19 + '\uE022'
|
|
912
|
+
}
|
|
913
|
+
if (!_n18) _n18 = _n19
|
|
914
|
+
let _n20 = ''
|
|
915
|
+
if (item.translator && item.translator.length) {
|
|
916
|
+
_n20 = formatNames(item.translator, _nameConfig(ctx, {"and":"text","delimiter":", ","delimiterPrecedesLast":"never","etAlUseLast":false,"initializeWith":". ","sortSeparator":", ","form":"short"}))
|
|
917
|
+
if (_n20) _n20 = '\uE020translator\uE021' + _n20 + '\uE022'
|
|
918
|
+
}
|
|
919
|
+
if (!_n18) _n18 = _n20
|
|
920
|
+
let _ch21 = ''
|
|
921
|
+
if ((item.type === "article-newspaper" || item.type === "article-magazine" || item.type === "article-journal")) {
|
|
922
|
+
const _v22 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
923
|
+
_ch21 = ((applyTextCase(_v22, "title") ? '\uE000' + applyTextCase(_v22, "title") + '\uE001' : '') ? '\uE020container-title\uE021' + (applyTextCase(_v22, "title") ? '\uE000' + applyTextCase(_v22, "title") + '\uE001' : '') + '\uE022' : '')
|
|
924
|
+
}
|
|
925
|
+
else {
|
|
926
|
+
const _v23 = macro_title(item, ctx)
|
|
927
|
+
_ch21 = _v23
|
|
928
|
+
}
|
|
929
|
+
if (!_n18) _n18 = _ch21
|
|
930
|
+
}
|
|
931
|
+
return _n18
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
function macro_access(item, ctx) {
|
|
935
|
+
let _ch24 = ''
|
|
936
|
+
if ((item.DOI != null && item.DOI !== '')) {
|
|
937
|
+
const _v27 = (T["available at"] != null ? (typeof T["available at"] === 'string' ? T["available at"] : (T["available at"].single || '')) : '')
|
|
938
|
+
const _v28 = (item.DOI != null && item.DOI !== '' ? String(item.DOI) : '')
|
|
939
|
+
const _g25 = ((item.DOI == null || item.DOI === '')) ? '' : [applyTextCase(_v27, "capitalize-first"), ((stripNocaseSpans(_v28) ? "https://doi.org/" + stripNocaseSpans(_v28) : '') ? '\uE020DOI\uE021' + (stripNocaseSpans(_v28) ? "https://doi.org/" + stripNocaseSpans(_v28) : '') + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
940
|
+
_ch24 = _g25
|
|
941
|
+
}
|
|
942
|
+
else if ((item.URL != null && item.URL !== '')) {
|
|
943
|
+
const _v29 = (T["available at"] != null ? (typeof T["available at"] === 'string' ? T["available at"] : (T["available at"].single || '')) : '')
|
|
944
|
+
const _v30 = (item.URL != null && item.URL !== '' ? String(item.URL) : '')
|
|
945
|
+
const _v33 = (T["accessed"] != null ? (typeof T["accessed"] === 'string' ? T["accessed"] : (T["accessed"].single || '')) : '')
|
|
946
|
+
const _d34 = item.accessed ? formatDate(item.accessed, {"dateParts":[{"name":"day","form":null,"prefix":"","suffix":"","rangeDelimiter":null},{"name":"month","form":null,"prefix":"","suffix":"","rangeDelimiter":null},{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
947
|
+
const _g31 = ((item.accessed == null || item.accessed === '')) ? '' : [applyTextCase(_v33, "capitalize-first"), (_d34 ? '\uE020accessed\uE021' + _d34 + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
948
|
+
_ch24 = [(applyTextCase(_v29, "capitalize-first") ? applyTextCase(_v29, "capitalize-first") + ": " : ''), (stripNocaseSpans(_v30) ? '\uE020URL\uE021' + stripNocaseSpans(_v30) + '\uE022' : ''), (_g31 ? " (" + _g31 + ")" : '')].filter(v => v !== '').join('')
|
|
949
|
+
}
|
|
950
|
+
return _ch24
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
function macro_number_volumes(item, ctx) {
|
|
954
|
+
let _ch35 = ''
|
|
955
|
+
if (!((item.volume != null && item.volume !== ''))) {
|
|
956
|
+
const _v38 = (item["number-of-volumes"] != null && item["number-of-volumes"] !== '' ? String(item["number-of-volumes"]) : '')
|
|
957
|
+
const _v39 = (() => {
|
|
958
|
+
const _val = item.volume
|
|
959
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
960
|
+
const _term = T["volume:short"]
|
|
961
|
+
if (_term == null) return ''
|
|
962
|
+
if (typeof _term === 'string') return _term
|
|
963
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
964
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
965
|
+
})()
|
|
966
|
+
const _g36 = ((item["number-of-volumes"] == null || item["number-of-volumes"] === '') && (item.volume == null || item.volume === '')) ? '' : [(stripNocaseSpans(_v38) ? '\uE020number-of-volumes\uE021' + stripNocaseSpans(_v38) + '\uE022' : ''), _v39.replace(/\./g, '')].filter(v => v !== '').join(" ")
|
|
967
|
+
_ch35 = (_g36 ? "(" + _g36 + ")" : '')
|
|
968
|
+
}
|
|
969
|
+
return _ch35
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
function macro_title(item, ctx) {
|
|
973
|
+
let _ch40 = ''
|
|
974
|
+
if ((item.type === "bill" || item.type === "book" || item.type === "legal_case" || item.type === "legislation" || item.type === "motion_picture" || item.type === "report" || item.type === "song" || item.type === "thesis" || item.type === "webpage" || item.type === "graphic")) {
|
|
975
|
+
const _v47 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
976
|
+
const _v48 = (item.medium != null && item.medium !== '' ? String(item.medium) : '')
|
|
977
|
+
const _g45 = ((item.title == null || item.title === '') && (item.medium == null || item.medium === '')) ? '' : [((stripNocaseSpans(_v47) ? '\uE000' + stripNocaseSpans(_v47) + '\uE001' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v47) ? '\uE000' + stripNocaseSpans(_v47) + '\uE001' : '') + '\uE022' : ''), ((stripNocaseSpans(_v48) ? "[" + stripNocaseSpans(_v48) + "]" : '') ? '\uE020medium\uE021' + (stripNocaseSpans(_v48) ? "[" + stripNocaseSpans(_v48) + "]" : '') + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
978
|
+
const _v49 = macro_number_volumes(item, ctx)
|
|
979
|
+
const _g43 = ((item.title == null || item.title === '') && (item.medium == null || item.medium === '') && !macro_number_volumes(item, ctx)) ? '' : [_g45, _v49].filter(v => v !== '').join(" ")
|
|
980
|
+
const _v50 = macro_edition(item, ctx)
|
|
981
|
+
const _g41 = ((item.title == null || item.title === '') && (item.medium == null || item.medium === '') && !macro_number_volumes(item, ctx) && !macro_edition(item, ctx)) ? '' : [_g43, _v50].filter(v => v !== '').join(". ")
|
|
982
|
+
_ch40 = _g41
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
const _v51 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
986
|
+
_ch40 = ((stripNocaseSpans(_v51) ? '“' + stripNocaseSpans(_v51) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v51) ? '“' + stripNocaseSpans(_v51) + '”' : '') + '\uE022' : '')
|
|
987
|
+
}
|
|
988
|
+
return _ch40
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
function macro_publisher(item, ctx) {
|
|
992
|
+
let _ch52 = ''
|
|
993
|
+
if (item.type === "thesis") {
|
|
994
|
+
const _v55 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
|
|
995
|
+
const _v56 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
|
|
996
|
+
const _g53 = ((item.genre == null || item.genre === '') && (item.publisher == null || item.publisher === '')) ? '' : [(stripNocaseSpans(_v55) ? '\uE020genre\uE021' + stripNocaseSpans(_v55) + '\uE022' : ''), (stripNocaseSpans(_v56) ? '\uE020publisher\uE021' + stripNocaseSpans(_v56) + '\uE022' : '')].filter(v => v !== '').join(". ")
|
|
997
|
+
_ch52 = _g53
|
|
998
|
+
}
|
|
999
|
+
else if (item.type === "report") {
|
|
1000
|
+
const _v61 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
|
|
1001
|
+
const _v62 = (item.number != null && item.number !== '' ? String(item.number) : '')
|
|
1002
|
+
const _g59 = ((item.genre == null || item.genre === '') && (item.number == null || item.number === '')) ? '' : [(stripNocaseSpans(_v61) ? '\uE020genre\uE021' + stripNocaseSpans(_v61) + '\uE022' : ''), (stripNocaseSpans(_v62) ? '\uE020number\uE021' + stripNocaseSpans(_v62) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
1003
|
+
const _v65 = (item["publisher-place"] != null && item["publisher-place"] !== '' ? String(item["publisher-place"]) : '')
|
|
1004
|
+
const _v66 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
|
|
1005
|
+
const _g63 = ((item["publisher-place"] == null || item["publisher-place"] === '') && (item.publisher == null || item.publisher === '')) ? '' : [(stripNocaseSpans(_v65) ? '\uE020publisher-place\uE021' + stripNocaseSpans(_v65) + '\uE022' : ''), (stripNocaseSpans(_v66) ? '\uE020publisher\uE021' + stripNocaseSpans(_v66) + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
1006
|
+
const _g57 = ((item.genre == null || item.genre === '') && (item.number == null || item.number === '') && (item["publisher-place"] == null || item["publisher-place"] === '') && (item.publisher == null || item.publisher === '')) ? '' : [_g59, _g63].filter(v => v !== '').join(". ")
|
|
1007
|
+
_ch52 = _g57
|
|
1008
|
+
}
|
|
1009
|
+
else if (!(item.type === "article-journal") && !(item.type === "article-newspaper") && !(item.type === "article-magazine")) {
|
|
1010
|
+
const _gp70 = []
|
|
1011
|
+
if ((item.type === "speech" || (item.event != null && item.event !== ''))) {
|
|
1012
|
+
const _v71 = (item.event != null && item.event !== '' ? String(item.event) : '')
|
|
1013
|
+
_gp70.push(((stripNocaseSpans(_v71) ? '\uE000' + stripNocaseSpans(_v71) + '\uE001' : '') ? '\uE020event\uE021' + (stripNocaseSpans(_v71) ? '\uE000' + stripNocaseSpans(_v71) + '\uE001' : '') + '\uE022' : ''))
|
|
1014
|
+
}
|
|
1015
|
+
const _v74 = (item["publisher-place"] != null && item["publisher-place"] !== '' ? String(item["publisher-place"]) : '')
|
|
1016
|
+
const _v75 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
|
|
1017
|
+
const _g72 = ((item["publisher-place"] == null || item["publisher-place"] === '') && (item.publisher == null || item.publisher === '')) ? '' : [(stripNocaseSpans(_v74) ? '\uE020publisher-place\uE021' + stripNocaseSpans(_v74) + '\uE022' : ''), (stripNocaseSpans(_v75) ? '\uE020publisher\uE021' + stripNocaseSpans(_v75) + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
1018
|
+
_gp70.push(_g72)
|
|
1019
|
+
const _g69 = _gp70.filter(v => v !== '').join(", ")
|
|
1020
|
+
const _v78 = (item["collection-title"] != null && item["collection-title"] !== '' ? String(item["collection-title"]) : '')
|
|
1021
|
+
const _v79 = (item["collection-number"] != null && item["collection-number"] !== '' ? String(item["collection-number"]) : '')
|
|
1022
|
+
const _g76 = ((item["collection-title"] == null || item["collection-title"] === '') && (item["collection-number"] == null || item["collection-number"] === '')) ? '' : [(stripNocaseSpans(_v78) ? '\uE020collection-title\uE021' + stripNocaseSpans(_v78) + '\uE022' : ''), (stripNocaseSpans(_v79) ? '\uE020collection-number\uE021' + stripNocaseSpans(_v79) + '\uE022' : '')].filter(v => v !== '').join(", ")
|
|
1023
|
+
const _g67 = ((item.event == null || item.event === '') && (item["publisher-place"] == null || item["publisher-place"] === '') && (item.publisher == null || item.publisher === '') && (item["collection-title"] == null || item["collection-title"] === '') && (item["collection-number"] == null || item["collection-number"] === '')) ? '' : [_g69, (_g76 ? "(" + _g76 + ")" : '')].filter(v => v !== '').join(" ")
|
|
1024
|
+
_ch52 = _g67
|
|
1025
|
+
}
|
|
1026
|
+
return _ch52
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
function macro_year_date(item, ctx) {
|
|
1030
|
+
let _ch80 = ''
|
|
1031
|
+
if ((item.issued != null && item.issued !== '')) {
|
|
1032
|
+
const _d81 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
1033
|
+
const _v82 = (item["year-suffix"] != null && item["year-suffix"] !== '' ? String(item["year-suffix"]) : '')
|
|
1034
|
+
_ch80 = [(_d81 ? '\uE020issued\uE021' + _d81 + '\uE022' : ''), (stripNocaseSpans(_v82) ? '\uE020year-suffix\uE021' + stripNocaseSpans(_v82) + '\uE022' : '')].filter(v => v !== '').join('')
|
|
1035
|
+
}
|
|
1036
|
+
else {
|
|
1037
|
+
const _v83 = (T["no date"] != null ? (typeof T["no date"] === 'string' ? T["no date"] : (T["no date"].single || '')) : '')
|
|
1038
|
+
const _v84 = (item["year-suffix"] != null && item["year-suffix"] !== '' ? String(item["year-suffix"]) : '')
|
|
1039
|
+
_ch80 = [_v83, ((stripNocaseSpans(_v84) ? " " + stripNocaseSpans(_v84) : '') ? '\uE020year-suffix\uE021' + (stripNocaseSpans(_v84) ? " " + stripNocaseSpans(_v84) : '') + '\uE022' : '')].filter(v => v !== '').join('')
|
|
1040
|
+
}
|
|
1041
|
+
return _ch80
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
function macro_locator(item, ctx) {
|
|
1045
|
+
let _ch85 = ''
|
|
1046
|
+
if (item.type === "article-journal") {
|
|
1047
|
+
const _v86 = (item.volume != null && item.volume !== '' ? String(item.volume) : '')
|
|
1048
|
+
const _v87 = (item.issue != null && item.issue !== '' ? String(item.issue) : '')
|
|
1049
|
+
_ch85 = [(stripNocaseSpans(_v86) ? '\uE020volume\uE021' + stripNocaseSpans(_v86) + '\uE022' : ''), ((stripNocaseSpans(_v87) ? "(" + stripNocaseSpans(_v87) + ")" : '') ? '\uE020issue\uE021' + (stripNocaseSpans(_v87) ? "(" + stripNocaseSpans(_v87) + ")" : '') + '\uE022' : '')].filter(v => v !== '').join('')
|
|
1050
|
+
}
|
|
1051
|
+
return _ch85
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
function macro_published_date(item, ctx) {
|
|
1055
|
+
let _ch88 = ''
|
|
1056
|
+
if ((item.type === "article-newspaper" || item.type === "article-magazine" || item.type === "post-weblog" || item.type === "speech")) {
|
|
1057
|
+
const _d89 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"day","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"month","form":"long","prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
1058
|
+
_ch88 = (_d89 ? '\uE020issued\uE021' + _d89 + '\uE022' : '')
|
|
1059
|
+
}
|
|
1060
|
+
return _ch88
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
function macro_pages(item, ctx) {
|
|
1064
|
+
let _ch90 = ''
|
|
1065
|
+
if ((item.type === "chapter" || item.type === "paper-conference" || item.type === "article-journal" || item.type === "article" || item.type === "article-magazine" || item.type === "article-newspaper" || item.type === "book" || item.type === "review" || item.type === "review-book" || item.type === "report")) {
|
|
1066
|
+
const _v93 = (() => {
|
|
1067
|
+
const _val = item.page
|
|
1068
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
1069
|
+
const _term = T["page:short"]
|
|
1070
|
+
if (_term == null) return ''
|
|
1071
|
+
if (typeof _term === 'string') return _term
|
|
1072
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
1073
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
1074
|
+
})()
|
|
1075
|
+
const _v94 = (item.page != null && item.page !== '' ? String(item.page) : '')
|
|
1076
|
+
const _g91 = ((item.page == null || item.page === '')) ? '' : [_v93, (stripNocaseSpans(_v94) ? '\uE020page\uE021' + stripNocaseSpans(_v94) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
1077
|
+
_ch90 = _g91
|
|
1078
|
+
}
|
|
1079
|
+
return _ch90
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
function macro_container_title(item, ctx) {
|
|
1083
|
+
let _ch95 = ''
|
|
1084
|
+
if ((item["container-title"] != null && item["container-title"] !== '')) {
|
|
1085
|
+
const _gp99 = []
|
|
1086
|
+
const _v100 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
1087
|
+
_gp99.push(((stripNocaseSpans(_v100) ? '\uE000' + stripNocaseSpans(_v100) + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v100) ? '\uE000' + stripNocaseSpans(_v100) + '\uE001' : '') + '\uE022' : ''))
|
|
1088
|
+
if ((item.type === "article" || item.type === "article-journal")) {
|
|
1089
|
+
let _ch101 = ''
|
|
1090
|
+
if (!((item.page != null && item.page !== '')) && !((item.volume != null && item.volume !== ''))) {
|
|
1091
|
+
const _v102 = "Preprint"
|
|
1092
|
+
_ch101 = (_v102 ? "[" + _v102 + "]" : '')
|
|
1093
|
+
}
|
|
1094
|
+
_gp99.push(_ch101)
|
|
1095
|
+
}
|
|
1096
|
+
const _g98 = _gp99.filter(v => v !== '').join(" ")
|
|
1097
|
+
const _v103 = macro_edition(item, ctx)
|
|
1098
|
+
const _g96 = ((item["container-title"] == null || item["container-title"] === '') && !macro_edition(item, ctx)) ? '' : [_g98, _v103].filter(v => v !== '').join(". ")
|
|
1099
|
+
_ch95 = _g96
|
|
1100
|
+
}
|
|
1101
|
+
return _ch95
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
function macro_edition(item, ctx) {
|
|
1105
|
+
let _ch104 = ''
|
|
1106
|
+
if ((item.edition != null && /^\s*\d/.test(String(item.edition)))) {
|
|
1107
|
+
const _v107 = item.edition != null ? String(item.edition) : ''
|
|
1108
|
+
const _v108 = (T["edition:short"] != null ? (typeof T["edition:short"] === 'string' ? T["edition:short"] : (T["edition:short"].single || '')) : '')
|
|
1109
|
+
const _g105 = ((item.edition == null || item.edition === '')) ? '' : [((_v107 && !isNaN(Number(_v107)) ? ordinal(Number(_v107)) : _v107) ? '\uE020edition\uE021' + (_v107 && !isNaN(Number(_v107)) ? ordinal(Number(_v107)) : _v107) + '\uE022' : ''), _v108.replace(/\./g, '')].filter(v => v !== '').join(" ")
|
|
1110
|
+
_ch104 = _g105
|
|
1111
|
+
}
|
|
1112
|
+
else {
|
|
1113
|
+
const _v109 = (item.edition != null && item.edition !== '' ? String(item.edition) : '')
|
|
1114
|
+
_ch104 = (stripNocaseSpans(_v109) ? '\uE020edition\uE021' + stripNocaseSpans(_v109) + '\uE022' : '')
|
|
1115
|
+
}
|
|
1116
|
+
return _ch104
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
const BIB_NAME_OPTS = {"and":"text","etAlMin":4,"etAlUseFirst":1}
|
|
1120
|
+
|
|
1121
|
+
export function bibliography(item, ctx = {}) {
|
|
1122
|
+
ctx = { ...ctx, _secOpts: BIB_NAME_OPTS }
|
|
1123
|
+
const _v114 = macro_author(item, ctx)
|
|
1124
|
+
const _v115 = macro_year_date(item, ctx)
|
|
1125
|
+
const _v118 = macro_title(item, ctx)
|
|
1126
|
+
const _v121 = macro_editor(item, ctx)
|
|
1127
|
+
const _v122 = macro_container_title(item, ctx)
|
|
1128
|
+
const _g119 = (!macro_editor(item, ctx) && !macro_container_title(item, ctx)) ? '' : [_v121, _v122].filter(v => v !== '').join(" ")
|
|
1129
|
+
const _g116 = (!macro_title(item, ctx) && !macro_editor(item, ctx) && !macro_container_title(item, ctx)) ? '' : [_v118, _g119].filter(v => v !== '').join(", ")
|
|
1130
|
+
const _g112 = (!macro_author(item, ctx) && !macro_year_date(item, ctx) && !macro_title(item, ctx) && !macro_editor(item, ctx) && !macro_container_title(item, ctx)) ? '' : [_v114, (_v115 ? "(" + _v115 + ")" : ''), _g116].filter(v => v !== '').join(" ")
|
|
1131
|
+
const _v123 = macro_secondary_contributors(item, ctx)
|
|
1132
|
+
const _v124 = macro_publisher(item, ctx)
|
|
1133
|
+
const _g110 = (!macro_author(item, ctx) && !macro_year_date(item, ctx) && !macro_title(item, ctx) && !macro_editor(item, ctx) && !macro_container_title(item, ctx) && !macro_secondary_contributors(item, ctx) && !macro_publisher(item, ctx)) ? '' : [_g112, _v123, _v124].filter(v => v !== '').join(". ")
|
|
1134
|
+
const _v127 = macro_locator(item, ctx)
|
|
1135
|
+
const _v128 = macro_published_date(item, ctx)
|
|
1136
|
+
const _v129 = macro_pages(item, ctx)
|
|
1137
|
+
const _g125 = (!macro_locator(item, ctx) && !macro_published_date(item, ctx) && !macro_pages(item, ctx)) ? '' : [_v127, _v128, _v129].filter(v => v !== '').join(", ")
|
|
1138
|
+
const _v130 = macro_access(item, ctx)
|
|
1139
|
+
const _layout = [_g110, (_g125 ? ", " + _g125 : ''), (_v130 ? ". " + _v130 : '')].filter(v => v !== '')
|
|
1140
|
+
const _raw = _layout.join("") + "."
|
|
1141
|
+
const _norm = _normalizePunctuation(_raw)
|
|
1142
|
+
const text = stripFormatting(_norm)
|
|
1143
|
+
const html = '<div class="csl-entry">' + toHtml(_norm) + '</div>'
|
|
1144
|
+
return {
|
|
1145
|
+
text,
|
|
1146
|
+
html,
|
|
1147
|
+
parts: _extractParts(item),
|
|
1148
|
+
links: _extractLinks(item),
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
function _extractParts(item) {
|
|
1153
|
+
return {
|
|
1154
|
+
authors: item.author || [],
|
|
1155
|
+
year: item.issued?.['date-parts']?.[0]?.[0]?.toString() || '',
|
|
1156
|
+
title: item.title || '',
|
|
1157
|
+
container: item['container-title'] || '',
|
|
1158
|
+
volume: item.volume?.toString() || '',
|
|
1159
|
+
issue: item.issue?.toString() || '',
|
|
1160
|
+
pages: item.page || '',
|
|
1161
|
+
doi: item.DOI || '',
|
|
1162
|
+
url: item.URL || '',
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
function _extractLinks(item) {
|
|
1167
|
+
return {
|
|
1168
|
+
doi: item.DOI ? 'https://doi.org/' + item.DOI : null,
|
|
1169
|
+
url: item.URL || null,
|
|
1170
|
+
pdf: item.extended?.pdf_url || null,
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
function _normalizePunctuation(str) {
|
|
1175
|
+
if (!str) return ''
|
|
1176
|
+
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
1177
|
+
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
1178
|
+
return str
|
|
1179
|
+
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
1180
|
+
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
1181
|
+
.replace(/ +/g, ' ')
|
|
1182
|
+
.trim()
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
export function bibliographySort(a, b) {
|
|
1186
|
+
const keys = [
|
|
1187
|
+
{ fn: (item) => macro_author(item, {}), dir: 1 },
|
|
1188
|
+
{ fn: (item) => macro_year_date(item, {}), dir: 1 },
|
|
1189
|
+
{ fn: (item) => String(item["title"] || ''), dir: 1 }
|
|
1190
|
+
]
|
|
1191
|
+
for (const k of keys) {
|
|
1192
|
+
const va = k.fn(a)
|
|
1193
|
+
const vb = k.fn(b)
|
|
1194
|
+
const cmp = va < vb ? -1 : va > vb ? 1 : 0
|
|
1195
|
+
if (cmp !== 0) return cmp * k.dir
|
|
1196
|
+
}
|
|
1197
|
+
return 0
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
const CIT_NAME_OPTS = {"etAlMin":4,"etAlUseFirst":1}
|
|
1201
|
+
|
|
1202
|
+
export function citation(cites, ctx = {}) {
|
|
1203
|
+
const _outerCtx = { ...ctx, _secOpts: CIT_NAME_OPTS }
|
|
1204
|
+
const rendered = cites.map(cite => {
|
|
1205
|
+
let ctx = cite._disambig ? { ..._outerCtx, _disambig: cite._disambig } : _outerCtx
|
|
1206
|
+
let item = cite.item || cite
|
|
1207
|
+
if (cite.locator != null) { item = { ...item, locator: cite.locator, _locatorLabel: cite.label || 'page' } }
|
|
1208
|
+
const _v135 = macro_author_short(item, ctx)
|
|
1209
|
+
const _v136 = macro_year_date(item, ctx)
|
|
1210
|
+
const _g133 = (!macro_author_short(item, ctx) && !macro_year_date(item, ctx)) ? '' : [_v135, _v136].filter(v => v !== '').join(", ")
|
|
1211
|
+
const _v139 = (() => {
|
|
1212
|
+
const _val = item.locator
|
|
1213
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
1214
|
+
const _term = T[(item._locatorLabel || 'page') + ":short"]
|
|
1215
|
+
if (_term == null) return ''
|
|
1216
|
+
if (typeof _term === 'string') return _term
|
|
1217
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
1218
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
1219
|
+
})()
|
|
1220
|
+
const _v140 = (item.locator != null && item.locator !== '' ? String(item.locator) : '')
|
|
1221
|
+
const _g137 = ((item.locator == null || item.locator === '')) ? '' : [(_v139 ? _v139 + " " : ''), (stripNocaseSpans(_v140) ? '\uE020locator\uE021' + stripNocaseSpans(_v140) + '\uE022' : '')].filter(v => v !== '').join('')
|
|
1222
|
+
const _g131 = (!macro_author_short(item, ctx) && !macro_year_date(item, ctx) && (item.locator == null || item.locator === '')) ? '' : [_g133, _g137].filter(v => v !== '').join(", ")
|
|
1223
|
+
return [_g131].filter(v => v !== '').join('')
|
|
1224
|
+
})
|
|
1225
|
+
const _raw = "(" + rendered.join("; ") + ")"
|
|
1226
|
+
const text = stripFormatting(_raw)
|
|
1227
|
+
const html = '<span class="csl-citation">' + toHtml(_raw) + '</span>'
|
|
1228
|
+
return { text, html }
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
function _resolveTerm(key) {
|
|
1232
|
+
const val = T[key]
|
|
1233
|
+
if (val == null) return null
|
|
1234
|
+
return typeof val === 'string' ? val : val.single || ''
|
|
1235
|
+
}
|