diff --git a/docs/api/api_data.js b/docs/api/api_data.js
index 7b6e9e3b..3f081e83 100644
--- a/docs/api/api_data.js
+++ b/docs/api/api_data.js
@@ -1,3669 +1,4143 @@
-define({
- api: [
- {
- type: "post",
- url: "/account/",
- title: "create a new account",
- name: "create",
- group: "Account",
- version: "0.0.8",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "String",
- optional: false,
- field: "firstName",
- description:
- "
First name of the account creator.
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "lastName",
- description:
- "Last name of the account creator.
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "pronoun",
- description:
- "the pronoun of the account creator.
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "email",
- description: "Email of the account.
"
- },
- {
- group: "body",
- type: "String[]",
- optional: false,
- field: "dietaryRestrictions",
- description:
- "Any dietary restrictions for the user. 'None' if there are no restrictions
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "shirtSize",
- description:
- "Size of the shirt that the user will receive.
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "password",
- description: "The password of the account.
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "birthDate",
- description: "a Date parsable string.
"
- },
- {
- group: "body",
- type: "Number",
- optional: false,
- field: "phoneNumber",
- description:
- "the user's phone number, represented as a string.
"
- }
- ],
- header: [
- {
- group: "header",
- type: "JWT",
- optional: true,
- field: "token",
- description: "the user's invite token.
"
- }
- ]
- },
- examples: [
- {
- title: "Request-Example:",
- content:
- '{ \n "firstName": "Theo",\n "lastName":"Klein",\n "pronoun":"he/him",\n "email":"theo@klein.com",\n "password":"hunter2",\n "dietaryRestrictions":["Halal"],\n "phoneNumber":1234567890,\n "shirtSize":"S",\n "birthDate":"10/30/1997"\n}',
- type: "json"
- }
- ]
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Account object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Account creation successful", \n "data": {\n "id": ObjectId("5bff8b9f3274cf001bc71048"),\n \t"firstName": "Theo",\n "lastName":"Klein",\n "pronoun":"he/him",\n "email":"theo@klein.com",\n "dietaryRestrictions":["Halal"],\n "phoneNumber":1234567890,\n \t"shirtSize":"S",\n "birthDate":Date("10/30/1997")\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{\n "message": "Account already exists", \n "data": {\n "route": "/"\n }\n}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/account.js",
- groupTitle: "Account",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/account/"
- }
- ]
- },
- {
- type: "get",
- url: "/account/:id",
- title: "gets information from an account with mongoid ':id'",
- name: "getAccount",
- group: "Account",
- version: "0.0.8",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "ObjectId",
- optional: false,
- field: "id",
- description: "MongoId of an account
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Account object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Account found by user id", \n "data": {\n "id": ObjectId("5bff8b9f3274cf001bc71048"),\n "firstName": "Theo",\n "lastName":"Klein",\n "pronoun":"he/him",\n "email":"theo@klein.com",\n "dietaryRestrictions":["Halal"],\n "phoneNumber":1234567890,\n "shirtSize":"S",\n "birthDate":Date("10/30/1997")\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content: '{"message": "Account not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/account.js",
- groupTitle: "Account",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/account/:id"
- }
- ]
- },
- {
- type: "get",
- url: "/account/invite",
- title: "Get all of the invites.",
- name: "getAllInvites",
- group: "Account",
- version: "0.0.8",
- description:
- "Get all of the invites that currently exist in the database.
",
- success: {
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Invite retrieval successful.", \n "data": [{\n "email":"abc@def.com",\n "accountType":"Hacker"\n }]\n }',
- type: "object"
- }
- ]
- },
- filename: "routes/api/account.js",
- groupTitle: "Account",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/account/invite"
- }
- ]
- },
- {
- type: "post",
- url: "/account/invite",
- title:
- "invites a user to create an account with the specified accountType",
- name: "inviteAccount",
- group: "Account",
- version: "0.0.8",
- description:
- "sends link with token to be used with the account/create route
",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "String",
- optional: true,
- field: "email",
- description:
- "email of the account to be created and where to send the link
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "accountType",
- description:
- "the type of the account which the user can create, for sponsor this should specify tier as well
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Account object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Successfully invited user", \n "data": {}\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "Error object
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response:",
- content:
- '{\n "message": "Invalid Authentication",\n "data": {\n "route": "/invite"\n }\n }',
- type: "object"
- }
- ]
- },
- filename: "routes/api/account.js",
- groupTitle: "Account",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/account/invite"
- }
- ]
- },
- {
- type: "get",
- url: "/account/self",
- title: "get information about own account",
- name: "self",
- group: "Account",
- version: "0.0.8",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Account object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Account found by user email", \n "data": {\n \t"id": ObjectId("5bff8b9f3274cf001bc71048"),\n \t"firstName": "Theo",\n "lastName":"Klein",\n "pronoun":"he/him",\n "email":"theo@klein.com",\n "dietaryRestrictions":["Halal"],\n "phoneNumber":1234567890,\n \t"shirtSize":"S",\n "birthDate":Date("10/30/1997")\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty object
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content: '{"message": "Account not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/account.js",
- groupTitle: "Account",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/account/self"
- }
- ]
- },
- {
- type: "patch",
- url: "/account/:id",
- title: "update an account's information",
- name: "updateOneUser",
- group: "Account",
- version: "0.0.8",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "String",
- optional: true,
- field: "firstName",
- description:
- "First name of the account creator.
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "lastName",
- description:
- "Last name of the account creator.
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "pronoun",
- description:
- "the pronoun of the account creator.
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "email",
- description: "Email of the account.
"
- },
- {
- group: "body",
- type: "String[]",
- optional: true,
- field: "dietaryRestrictions",
- description:
- "Any dietary restrictions for the user. 'None' if there are no restrictions
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "shirtSize",
- description:
- "Size of the shirt that the user will receive.
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "birthDate",
- description: "a Date parsable string.
"
- },
- {
- group: "body",
- type: "Number",
- optional: true,
- field: "phoneNumber",
- description:
- "the user's phone number, represented as a string.
"
- }
- ]
- },
- examples: [
- {
- title: "Request-Example:",
- content: '{ "shirtSize": "M" }',
- type: "json"
- }
- ]
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Account object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Changed account information", \n "data": {\n "id": ObjectId("5bff8b9f3274cf001bc71048"),\n \t"firstName": "Theo",\n "lastName":"Klein",\n "pronoun":"he/him",\n "email":"theo@klein.com",\n "dietaryRestrictions":["Halal"],\n "phoneNumber":1234567890,\n \t"shirtSize":"M",\n "birthDate":Date("10/30/1997")\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Error while updating account", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/account.js",
- groupTitle: "Account",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/account/:id"
- }
- ]
- },
- {
- type: "patch",
- url: "/auth/password/change",
- title: "change password for logged in user",
- name: "changePassword",
- group: "Authentication",
- version: "0.0.8",
- parameter: {
- fields: {
- Parameter: [
- {
- group: "Parameter",
- type: "String",
- optional: false,
- field: "oldPassword",
- description:
- "The current password of the user
"
- },
- {
- group: "Parameter",
- type: "String",
- optional: false,
- field: "newPassword",
- description: "The new password of the user
"
- }
- ]
- },
- examples: [
- {
- title: "Request-Example:",
- content:
- '{ \n "oldPassword": "password12345",\n "newPassword": "password123456"\n}',
- type: "json"
- }
- ]
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{"message": "Successfully reset password", "data": {}}',
- type: "json"
- }
- ]
- },
- permission: [
- {
- name: ": Must be logged in"
- }
- ],
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/password/change"
- }
- ]
- },
- {
- type: "post",
- url: "/auth/confirm/:token",
- title: "confirm account using the JWT in :token",
- name: "confirmAccount",
- group: "Authentication",
- version: "0.0.8",
- parameter: {
- fields: {
- Parameter: [
- {
- group: "Parameter",
- type: "String",
- optional: false,
- field: "JWT",
- description: "for confirming the account
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response:",
- content:
- '{"message": "Successfully confirmed account", "data": {}}',
- type: "json"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Invalid token for confirming account, "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/confirm/:token"
- }
- ]
- },
- {
- type: "post",
- url: "/auth/password/forgot",
- title: "forgot password route",
- name: "forgotPassword",
- group: "Authentication",
- version: "0.0.8",
- parameter: {
- fields: {
- Parameter: [
- {
- group: "Parameter",
- type: "String",
- optional: false,
- field: "email",
- description:
- "the email address of the account
"
- }
- ]
- },
- examples: [
- {
- title: "Request-Example:",
- content: '{ "email": "myemail@mchacks.ca" }',
- type: "json"
- }
- ]
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content: '{"message": "Sent reset email", "data": {}}',
- type: "json"
- }
- ]
- },
- permission: [
- {
- name: ": public"
- }
- ],
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/password/forgot"
- }
- ]
- },
- {
- type: "get",
- url: "/auth/rolebindings/:id",
- title:
- "retrieve rolebindings for a user given by their user id :id",
- name: "getRoleBindings",
- group: "Authentication",
- version: "0.0.8",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "ObjectId",
- optional: false,
- field: "id",
- description: "MongoId of an account
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Rolebindings object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Successfully retrieved role bindings",\n "data": {\n accountId:"5beca4ab2e069a34f91697b2"\n id:"5beca4ae2e069a34f91698b1"\n roles: [\n {\n _id:"5beca4ab2e069a34f91697d9",\n name:"hacker",\n routes: [\n {_id: "5beca4ae2e069a34f9169852", requestType: "POST", uri: "/api/auth/login"},\n {_id: "5beca4ae2e069a34f9169851", requestType: "POST", uri: "/api/auth/logout"},\n {_id: "5beca4ae2e069a34f9169850", requestType: "GET", uri: "/api/auth/rolebindings/:self"},\n {_id: "5beca4ae2e069a34f916984f", requestType: "GET", uri: "/api/account/self"},\n {_id: "5beca4ae2e069a34f916984e", requestType: "GET", uri: "/api/account/:self"},\n {_id: "5beca4ae2e069a34f916984d", requestType: "PATCH", uri: "/api/account/:self"},\n {_id: "5beca4ae2e069a34f916984c", requestType: "POST", uri: "/api/hacker/"},\n {_id: "5beca4ae2e069a34f916984b", requestType: "GET", uri: "/api/hacker/:self"},\n {_id: "5beca4ae2e069a34f916984a", requestType: "GET", uri: "/api/hacker/:self/resume"},\n {_id: "5beca4ae2e069a34f9169849", requestType: "PATCH", uri: "/api/hacker/:self"}\n ]\n }\n ]\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Role Bindings not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/rolebindings/:id"
- }
- ]
- },
- {
- type: "get",
- url: "/auth/roles",
- title: "get roles",
- name: "getRoles",
- description: "get all roles that exist in the database
",
- group: "Authentication",
- version: "0.0.8",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response:",
- content:
- '{"message": "Sucessfully retrieved all roles", "data":\n[{name: "GodStaff", routes: Array(27), id: "5bee20ef3ca9dd4754382880"},\n {name: "Hacker", routes: Array(10), id: "5bee20ef3ca9dd4754382881"},\n {name: "Volunteer", routes: Array(4), id: "5bee20ef3ca9dd4754382882"}]',
- type: "json"
- }
- ]
- },
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/roles"
- }
- ]
- },
- {
- type: "post",
- url: "/auth/login",
- title: "login to the service",
- name: "login",
- group: "Authentication",
- version: "0.0.8",
- parameter: {
- fields: {
- Parameter: [
- {
- group: "Parameter",
- type: "string",
- optional: false,
- field: "email",
- description: "Account email
"
- },
- {
- group: "Parameter",
- type: "string",
- optional: false,
- field: "password",
- description: "Account password
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{"message": "Successfully logged in", "data": {}}',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Invalid Authentication", "data": {}}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: ": public"
- }
- ],
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/login"
- }
- ]
- },
- {
- type: "get",
- url: "/auth/logout",
- title: "logout of service",
- name: "logout",
- group: "Authentication",
- version: "0.0.8",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{"message": "Successfully logged out", "data": {}}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: ": public"
- }
- ],
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/logout"
- }
- ]
- },
- {
- type: "get",
- url: "/auth/confirm/resend",
- title: "resend confirmation token",
- name: "resendConfirmAccount",
- group: "Authentication",
- version: "0.0.8",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response:",
- content:
- '{"message": "Successfully resent confirmation email", "data": {}}',
- type: "json"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response:",
- content:
- ' HTTP/1.1 422\n{"message": "Account already confirmed", "data": {}}',
- type: "json"
- },
- {
- title: "Error-Response:",
- content:
- ' HTTP/1.1 428\n{"message": "Account confirmation token does not exist", "data": {}}',
- type: "json"
- }
- ]
- },
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/confirm/resend"
- }
- ]
- },
- {
- type: "post",
- url: "/auth/password/reset",
- title: "reset password",
- name: "resetPassword",
- group: "Authentication",
- version: "0.0.8",
- parameter: {
- fields: {
- Parameter: [
- {
- group: "Parameter",
- type: "String",
- optional: false,
- field: "password",
- description: "the password of the account
"
- }
- ]
- },
- examples: [
- {
- title: "Request-Example:",
- content: '{ "password": "hunter2" }',
- type: "json"
- }
- ]
- },
- header: {
- fields: {
- Header: [
- {
- group: "Header",
- type: "String",
- optional: false,
- field: "Authentication",
- description:
- "the token that was provided in the reset password email
"
- }
- ]
- },
- examples: [
- {
- title: "Header-Example:",
- content:
- '{\n "X-Reset-Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"\n}',
- type: "json"
- }
- ]
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{"message": "Successfully reset password", "data": {}}',
- type: "json"
- }
- ]
- },
- permission: [
- {
- name: ": must have authentication token"
- }
- ],
- filename: "routes/api/auth.js",
- groupTitle: "Authentication",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/auth/password/reset"
- }
- ]
- },
- {
- type: "patch",
- url: "/hacker/checkin/:id",
- title:
- "update a hacker's status to be 'Checked-in'. Note that the Hacker must eitehr be Accepted or Confirmed.",
- name: "checkinHacker",
- group: "Hacker",
- version: "0.0.9",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "string",
- optional: true,
- field: "status",
- description:
- "Check-in status. "Checked-in"
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Changed hacker information", \n "data": {\n "status": "Checked-in"\n }\n}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: "Administrator"
- },
- {
- name: "Volunteer"
- }
- ],
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/checkin/:id"
- }
- ]
- },
- {
- type: "post",
- url: "/hacker/",
- title: "create a new hacker",
- name: "createHacker",
- group: "Hacker",
- version: "0.0.8",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "MongoID",
- optional: false,
- field: "accountId",
- description:
- "ObjectID of the respective account
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "school",
- description:
- "Name of the school the hacker goes to
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "gender",
- description: "Gender of the hacker
"
- },
- {
- group: "body",
- type: "Boolean",
- optional: false,
- field: "travel",
- description:
- "Whether the hacker requires a bus for transportation
"
- },
- {
- group: "body",
- type: "String[]",
- optional: false,
- field: "ethnicity",
- description: "the ethnicities of the hacker
"
- },
- {
- group: "body",
- type: "String[]",
- optional: false,
- field: "major",
- description: "the major of the hacker
"
- },
- {
- group: "body",
- type: "Number",
- optional: false,
- field: "graduationYear",
- description:
- "the graduation year of the hacker
"
- },
- {
- group: "body",
- type: "Boolean",
- optional: false,
- field: "codeOfConduct",
- description:
- "acceptance of the code of conduct
"
- },
- {
- group: "body",
- type: "Json",
- optional: false,
- field: "application",
- description:
- "The hacker's application. Resume and jobInterest fields are required.
"
- }
- ]
- },
- examples: [
- {
- title: "application: ",
- content:
- '{\n "application":{\n "portfolioURL":{\n "resume":"resumes/1543458163426-5bff4d736f86be0a41badb91",\n "github":"https://github.com/abcd",\n "dropler":"https://dribbble.com/abcd",\n "personal":"https://www.hi.com/",\n "linkedIn":"https://linkedin.com/in/abcd",\n "other":"https://github.com/hackmcgill/hackerAPI/issues/168"\n },\n "jobInterest":"Internship",\n "skills":["Javascript","Typescript"],\n "comments":"hi!",\n "essay":"Pls accept me"\n}',
- type: "Json"
- }
- ]
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Hacker creation successful", \n "data": {\n "id":"5bff4d736f86be0a41badb91",\n "application":{\n "portfolioURL":{\n "resume":"resumes/1543458163426-5bff4d736f86be0a41badb91",\n "github":"https://github.com/abcd",\n "dropler":"https://dribbble.com/abcd",\n "personal":"https://www.hi.com/",\n "linkedIn":"https://linkedin.com/in/abcd",\n "other":"https://github.com/hackmcgill/hackerAPI/issues/168"\n },\n "jobInterest":"Internship",\n "skills":["Javascript","Typescript"],\n "comments":"hi!",\n "essay":"Pls accept me"\n },\n "status":"Applied",\n "ethnicity":["White or Caucasian"," Asian or Pacific Islander"],\n "accountId":"5bff2a35e533b0f6562b4998",\n "school":"McPherson College",\n "gender":"Female",\n "travel":0,\n "major":"Accounting",\n "graduationYear":2019,\n "codeOfConduct":true,\n }\n}',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Error while creating hacker", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/"
- }
- ]
- },
- {
- type: "get",
- url: "/hacker/email/:email",
- title: "get a hacker's information",
- name: "getHacker",
- group: "Hacker",
- version: "0.0.8",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "String",
- optional: false,
- field: "email",
- description: "a hacker's unique email
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Successfully retrieved hacker information", \n "data": {\n "id":"5bff4d736f86be0a41badb91",\n "application":{\n "portfolioURL":{\n "resume":"resumes/1543458163426-5bff4d736f86be0a41badb91",\n "github":"https://github.com/abcd",\n "dropler":"https://dribbble.com/abcd",\n "personal":"https://www.hi.com/",\n "linkedIn":"https://linkedin.com/in/abcd",\n "other":"https://github.com/hackmcgill/hackerAPI/issues/168"\n },\n "jobInterest":"Internship",\n "skills":["Javascript","Typescript"],\n "comments":"hi!",\n "essay":"Pls accept me"\n },\n "status":"Applied",\n "ethnicity":["White or Caucasian"," Asian or Pacific Islander"],\n "accountId":"5bff2a35e533b0f6562b4998",\n "school":"McPherson College",\n "gender":"Female",\n "travel":0,\n "major":"Accounting",\n "graduationYear":2019,\n "codeOfConduct":true,\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content: '{"message": "Hacker not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/email/:email"
- }
- ]
- },
- {
- type: "get",
- url: "/hacker/:id",
- title: "get a hacker's information",
- name: "getHacker",
- group: "Hacker",
- version: "0.0.8",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "String",
- optional: false,
- field: "id",
- description: "a hacker's unique mongoID
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Successfully retrieved hacker information", \n "data": {\n "id":"5bff4d736f86be0a41badb91",\n "application":{\n "portfolioURL":{\n "resume":"resumes/1543458163426-5bff4d736f86be0a41badb91",\n "github":"https://github.com/abcd",\n "dropler":"https://dribbble.com/abcd",\n "personal":"https://www.hi.com/",\n "linkedIn":"https://linkedin.com/in/abcd",\n "other":"https://github.com/hackmcgill/hackerAPI/issues/168"\n },\n "jobInterest":"Internship",\n "skills":["Javascript","Typescript"],\n "comments":"hi!",\n "essay":"Pls accept me"\n },\n "status":"Applied",\n "ethnicity":["White or Caucasian"," Asian or Pacific Islander"],\n "accountId":"5bff2a35e533b0f6562b4998",\n "school":"McPherson College",\n "gender":"Female",\n "travel":0,\n "major":"Accounting",\n "graduationYear":2019,\n "codeOfConduct":true,\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content: '{"message": "Hacker not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/:id"
- }
- ]
- },
- {
- type: "get",
- url: "/hacker/resume:id",
- title: "get the resume for a hacker.",
- name: "getHackerResume",
- group: "Hacker",
- version: "0.0.8",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "ObjectId",
- optional: false,
- field: "id",
- description: "Hacker id
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response:",
- content:
- 'HTTP/1.1 200 OK \n{ \n message: "Downloaded resume", \n data: { \n id: "507f191e810c19729de860ea", \n resume: [Buffer] \n } \n}',
- type: "json"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description:
- ""Resume does not exist"
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response:",
- content:
- 'HTTP/1.1 404 \n{ \n message: "Resume not found", \n data: {} \n}',
- type: "json"
- }
- ]
- },
- permission: [
- {
- name:
- "Must be logged in, and the account id must be linked to the hacker."
- }
- ],
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker"
- },
- {
- type: "get",
- url: "/hacker/stats",
- title: "Gets the stats of all of the hackers who have applied.",
- name: "getHackerStats",
- group: "Hacker",
- version: "0.0.9",
- parameter: {
- fields: {
- query: [
- {
- group: "query",
- type: "String",
- optional: false,
- field: "model",
- description:
- "the model to be searched (Only hacker supported)
"
- },
- {
- group: "query",
- type: "Array",
- optional: false,
- field: "q",
- description:
- "the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Retrieved stats",\n "data": {\n "stats" : {\n "total": 10,\n "status": { "Applied": 10 },\n "school": { "McGill University": 3, "Harvard University": 7 },\n degree: { "Undergraduate": 10 },\n gender: { "Male": 1, "Female": 9 },\n travel: { 7:7, 0:3 },\n ethnicity: { "White": 10, },\n jobInterest: { "Internship": 10 },\n major: { "Computer Science": 10 },\n graduationYear: { "2019": 10 },\n dietaryRestrictions: { "None": 10 },\n shirtSize: { "M": 3, "XL": 7 },\n age: { "22": 10 }\n }\n }\n}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/stats"
- }
- ]
- },
- {
- type: "patch",
- url: "/hacker/:id",
- title: "update a hacker's information.",
- description:
- "This route only contains the ability to update a subset of a hacker's information. If you want to update a status, you must have Admin priviledges and use PATCH /hacker/status/:id.
",
- name: "patchHacker",
- group: "Hacker",
- version: "0.0.8",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "String",
- optional: true,
- field: "school",
- description:
- "Name of the school the hacker goes to
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "gender",
- description: "Gender of the hacker
"
- },
- {
- group: "body",
- type: "Boolean",
- optional: true,
- field: "travel",
- description:
- "Whether the hacker requires a bus for transportation
"
- },
- {
- group: "body",
- type: "String[]",
- optional: true,
- field: "ethnicity",
- description: "the ethnicities of the hacker
"
- },
- {
- group: "body",
- type: "String[]",
- optional: true,
- field: "major",
- description: "the major of the hacker
"
- },
- {
- group: "body",
- type: "Number",
- optional: true,
- field: "graduationYear",
- description:
- "the graduation year of the hacker
"
- },
- {
- group: "body",
- type: "Json",
- optional: true,
- field: "application",
- description: "The hacker's application
"
- }
- ]
- },
- examples: [
- {
- title: "application: ",
- content:
- '{\n "portfolioURL":{\n "resume":"resumes/1543458163426-5bff4d736f86be0a41badb91",\n "github":"https://github.com/abcd",\n "dropler":"https://dribbble.com/abcd",\n "personal":"https://www.hi.com/",\n "linkedIn":"https://linkedin.com/in/abcd",\n "other":"https://github.com/hackmcgill/hackerAPI/issues/168"\n },\n "jobInterest":"Internship",\n "skills":["Javascript","Typescript"],\n "comments":"hi!",\n "essay":"Pls accept me"\n }',
- type: "Json"
- }
- ]
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Changed hacker information", \n "data": {\n "id":"5bff4d736f86be0a41badb91",\n "application":{\n "portfolioURL":{\n "resume":"resumes/1543458163426-5bff4d736f86be0a41badb91",\n "github":"https://github.com/abcd",\n "dropler":"https://dribbble.com/abcd",\n "personal":"https://www.hi.com/",\n "linkedIn":"https://linkedin.com/in/abcd",\n "other":"https://github.com/hackmcgill/hackerAPI/issues/168"\n },\n "jobInterest":"Internship",\n "skills":["Javascript","Typescript"],\n "comments":"hi!",\n "essay":"Pls accept me"\n },\n "status":"Applied",\n "ethnicity":["White or Caucasian"," Asian or Pacific Islander"],\n "accountId":"5bff2a35e533b0f6562b4998",\n "school":"McPherson College",\n "gender":"Female",\n "travel":0,\n "major":"Accounting",\n "graduationYear":2019,\n "codeOfConduct":true,\n}',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Error while updating hacker", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/:id"
- }
- ]
- },
- {
- type: "patch",
- url: "/hacker/accept/:id",
- title: "accept a Hacker",
- name: "acceptHacker",
- group: "Hacker",
- version: "0.0.9",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response:",
- content: "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
- type: "object"
- }
- ]
+define({ "api": [
+ {
+ "type": "post",
+ "url": "/account/",
+ "title": "create a new account",
+ "name": "create",
+ "group": "Account",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "firstName",
+ "description": "First name of the account creator.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "lastName",
+ "description": "Last name of the account creator.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "pronoun",
+ "description": "the pronoun of the account creator.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "email",
+ "description": "Email of the account.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "gender",
+ "description": "Gender of the account creator.
"
+ },
+ {
+ "group": "body",
+ "type": "String[]",
+ "optional": false,
+ "field": "dietaryRestrictions",
+ "description": "Any dietary restrictions for the user. 'None' if there are no restrictions
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "password",
+ "description": "The password of the account.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "birthDate",
+ "description": "a Date parsable string.
"
+ },
+ {
+ "group": "body",
+ "type": "Number",
+ "optional": false,
+ "field": "phoneNumber",
+ "description": "the user's phone number, represented as a string.
"
+ }
+ ],
+ "header": [
+ {
+ "group": "header",
+ "type": "JWT",
+ "optional": true,
+ "field": "token",
+ "description": "the user's invite token.
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Request-Example:",
+ "content": "{ \n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"password\":\"hunter2\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":\"10/30/1997\"\n}",
+ "type": "json"
+ }
+ ]
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Account object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Account creation successful\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\n \"message\": \"Account already exists\", \n \"data\": {\n \"route\": \"/\"\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/account.js",
+ "groupTitle": "Account",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/account/"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/account/:id",
+ "title": "gets information from an account with mongoid ':id'",
+ "name": "getAccount",
+ "group": "Account",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "ObjectId",
+ "optional": false,
+ "field": "id",
+ "description": "MongoId of an account
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Account object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Account found by user id\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Account not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/account.js",
+ "groupTitle": "Account",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/account/:id"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/account/invite",
+ "title": "Get all of the invites.",
+ "name": "getAllInvites",
+ "group": "Account",
+ "version": "0.0.8",
+ "description": "Get all of the invites that currently exist in the database.
",
+ "success": {
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Invite retrieval successful.\", \n \"data\": [{\n \"email\":\"abc@def.com\",\n \"accountType\":\"Hacker\"\n }]\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/account.js",
+ "groupTitle": "Account",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/account/invite"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/account/invite",
+ "title": "invites a user to create an account with the specified accountType",
+ "name": "inviteAccount",
+ "group": "Account",
+ "version": "0.0.8",
+ "description": "sends link with token to be used with the account/create route
",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "email",
+ "description": "email of the account to be created and where to send the link
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "accountType",
+ "description": "the type of the account which the user can create, for sponsor this should specify tier as well
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Account object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully invited user\", \n \"data\": {}\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Error object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response:",
+ "content": "{\n \"message\": \"Invalid Authentication\",\n \"data\": {\n \"route\": \"/invite\"\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/account.js",
+ "groupTitle": "Account",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/account/invite"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/account/self",
+ "title": "get information about own account",
+ "name": "self",
+ "group": "Account",
+ "version": "0.0.8",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Account object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Account found by user email\", \n \"data\": {\n \t\"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Account not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/account.js",
+ "groupTitle": "Account",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/account/self"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/account/:id",
+ "title": "update an account's information",
+ "name": "updateOneUser",
+ "group": "Account",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "firstName",
+ "description": "First name of the account creator.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "lastName",
+ "description": "Last name of the account creator.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "pronoun",
+ "description": "The pronoun of the account creator.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "email",
+ "description": "Email of the account.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "gender",
+ "description": "Gender of the account creator.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "birthDate",
+ "description": "A Date parsable string.
"
+ },
+ {
+ "group": "body",
+ "type": "Number",
+ "optional": true,
+ "field": "phoneNumber",
+ "description": "The user's phone number, represented as a string.
"
+ },
+ {
+ "group": "body",
+ "type": "String[]",
+ "optional": true,
+ "field": "dietaryRestrictions",
+ "description": "Any dietary restrictions for the user. 'None' if there are no restrictions
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Request-Example:",
+ "content": "{ \"gender\": \"Male\" }",
+ "type": "json"
+ }
+ ]
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Account object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Account update successful.\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\": \"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while updating account\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/account.js",
+ "groupTitle": "Account",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/account/:id"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/auth/password/change",
+ "title": "change password for logged in user",
+ "name": "changePassword",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "Parameter": [
+ {
+ "group": "Parameter",
+ "type": "String",
+ "optional": false,
+ "field": "oldPassword",
+ "description": "The current password of the user
"
+ },
+ {
+ "group": "Parameter",
+ "type": "String",
+ "optional": false,
+ "field": "newPassword",
+ "description": "The new password of the user
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Request-Example:",
+ "content": "{\n \"oldPassword\": \"password12345\",\n \"newPassword\": \"password123456\"\n}",
+ "type": "json"
+ }
+ ]
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\"message\": \"Successfully reset password\", \"data\": {}}",
+ "type": "json"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": ": Must be logged in"
+ }
+ ],
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/password/change"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/auth/confirm/:token",
+ "title": "confirm account using the JWT in :token",
+ "name": "confirmAccount",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "Parameter": [
+ {
+ "group": "Parameter",
+ "type": "String",
+ "optional": false,
+ "field": "JWT",
+ "description": "for confirming the account
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\"message\": \"Successfully confirmed account\", \"data\": {}}",
+ "type": "json"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response:",
+ "content": "{\"message\": \"Invalid token for confirming account, \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/confirm/:token"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/auth/password/forgot",
+ "title": "forgot password route",
+ "name": "forgotPassword",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "Parameter": [
+ {
+ "group": "Parameter",
+ "type": "String",
+ "optional": false,
+ "field": "email",
+ "description": "the email address of the account
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Request-Example:",
+ "content": "{ \"email\": \"myemail@mchacks.ca\" }",
+ "type": "json"
+ }
+ ]
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\"message\": \"Sent reset email\", \"data\": {}}",
+ "type": "json"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": ": public"
+ }
+ ],
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/password/forgot"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/auth/rolebindings/:id",
+ "title": "retrieve rolebindings for a user given by their user id :id",
+ "name": "getRoleBindings",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "ObjectId",
+ "optional": false,
+ "field": "id",
+ "description": "MongoId of an account
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Rolebindings object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Role Bindings not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/rolebindings/:id"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/auth/roles",
+ "title": "get roles",
+ "name": "getRoles",
+ "description": "get all roles that exist in the database
",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\"message\": \"Sucessfully retrieved all roles\", \"data\":\n[{name: \"GodStaff\", routes: Array(27), id: \"5bee20ef3ca9dd4754382880\"},\n {name: \"Hacker\", routes: Array(10), id: \"5bee20ef3ca9dd4754382881\"},\n {name: \"Volunteer\", routes: Array(4), id: \"5bee20ef3ca9dd4754382882\"}]",
+ "type": "json"
+ }
+ ]
+ },
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/roles"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/auth/login",
+ "title": "login to the service",
+ "name": "login",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "Parameter": [
+ {
+ "group": "Parameter",
+ "type": "string",
+ "optional": false,
+ "field": "email",
+ "description": "Account email
"
+ },
+ {
+ "group": "Parameter",
+ "type": "string",
+ "optional": false,
+ "field": "password",
+ "description": "Account password
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\"message\": \"Successfully logged in\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Invalid Authentication\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": ": public"
+ }
+ ],
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/login"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/auth/logout",
+ "title": "logout of service",
+ "name": "logout",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\"message\": \"Successfully logged out\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": ": public"
+ }
+ ],
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/logout"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/auth/confirm/resend",
+ "title": "resend confirmation token",
+ "name": "resendConfirmAccount",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\"message\": \"Successfully resent confirmation email\", \"data\": {}}",
+ "type": "json"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response:",
+ "content": " HTTP/1.1 422\n{\"message\": \"Account already confirmed\", \"data\": {}}",
+ "type": "json"
+ },
+ {
+ "title": "Error-Response:",
+ "content": " HTTP/1.1 428\n{\"message\": \"Account confirmation token does not exist\", \"data\": {}}",
+ "type": "json"
+ }
+ ]
+ },
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/confirm/resend"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/auth/password/reset",
+ "title": "reset password",
+ "name": "resetPassword",
+ "group": "Authentication",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "Parameter": [
+ {
+ "group": "Parameter",
+ "type": "String",
+ "optional": false,
+ "field": "password",
+ "description": "the password of the account
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Request-Example:",
+ "content": "{ \"password\": \"hunter2\" }",
+ "type": "json"
+ }
+ ]
+ },
+ "header": {
+ "fields": {
+ "Header": [
+ {
+ "group": "Header",
+ "type": "String",
+ "optional": false,
+ "field": "Authentication",
+ "description": "the token that was provided in the reset password email
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Header-Example:",
+ "content": "{\n \"X-Reset-Token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n}",
+ "type": "json"
+ }
+ ]
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\"message\": \"Successfully reset password\", \"data\": {}}",
+ "type": "json"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": ": must have authentication token"
+ }
+ ],
+ "filename": "routes/api/auth.js",
+ "groupTitle": "Authentication",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/auth/password/reset"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/hacker/batchAccept/",
+ "title": "accept array of Hackers",
+ "name": "acceptHacker",
+ "group": "Hacker",
+ "version": "3.0.0",
+ "parameter": {
+ "fields": {
+ "body) {{ids: ObjectId[]}} Array of id(s": [
+ {
+ "group": "body) {{ids: ObjectId[]}} Array of id(s",
+ "optional": false,
+ "field": "that",
+ "description": "needed to be accepted
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "success_ids array and errors array. Errors array will contain a detailed error for why the batch update for a given ID did not work
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Hacker batch update successful.\",\n \"data\": {\n \"success_ids\": [\"id1\", \"id2\"]\n \"errors\": [{status: 404, message: \"ACCOUNT_NOT_FOUND\", account: null, hacker_id: \"id3\"}]\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/batchAccept/"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/hacker/acceptEmail/:email",
+ "title": "accept a Hacker by email",
+ "name": "acceptHacker",
+ "group": "Hacker",
+ "version": "2.0.0",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/acceptEmail/:email"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/hacker/accept/:id",
+ "title": "accept a Hacker",
+ "name": "acceptHacker",
+ "group": "Hacker",
+ "version": "2.0.0",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/accept/:id"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/hacker/checkin/:id",
+ "title": "update a hacker's status to be 'Checked-in'. Note that the Hacker must eitehr be Accepted or Confirmed.",
+ "name": "checkinHacker",
+ "group": "Hacker",
+ "version": "0.0.9",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "string",
+ "optional": true,
+ "field": "status",
+ "description": "Check-in status. "Checked-in"
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Checked-in\"\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ },
+ {
+ "name": "Volunteer"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/checkin/:id"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/hacker/",
+ "title": "create a new hacker",
+ "name": "createHacker",
+ "group": "Hacker",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "MongoID",
+ "optional": false,
+ "field": "accountId",
+ "description": "ObjectID of the respective account
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "school",
+ "description": "Name of the school the hacker goes to
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "gender",
+ "description": "Gender of the hacker
"
+ },
+ {
+ "group": "body",
+ "type": "Number",
+ "optional": false,
+ "field": "travel",
+ "description": "Whether the hacker requires a bus for transportation
"
+ },
+ {
+ "group": "body",
+ "type": "String[]",
+ "optional": false,
+ "field": "ethnicity",
+ "description": "the ethnicities of the hacker
"
+ },
+ {
+ "group": "body",
+ "type": "String[]",
+ "optional": false,
+ "field": "major",
+ "description": "the major of the hacker
"
+ },
+ {
+ "group": "body",
+ "type": "Number",
+ "optional": false,
+ "field": "graduationYear",
+ "description": "the graduation year of the hacker
"
+ },
+ {
+ "group": "body",
+ "type": "Boolean",
+ "optional": false,
+ "field": "codeOfConduct",
+ "description": "acceptance of the code of conduct
"
+ },
+ {
+ "group": "body",
+ "type": "Json",
+ "optional": false,
+ "field": "application",
+ "description": "The hacker's application. Resume and jobInterest fields are required.
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "application: ",
+ "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n}",
+ "type": "Json"
+ }
+ ]
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Hacker creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while creating hacker\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/hacker/:id",
+ "title": "get a hacker's information",
+ "name": "getHacker",
+ "group": "Hacker",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "String",
+ "optional": false,
+ "field": "id",
+ "description": "a hacker's unique mongoID
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Hacker not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/:id"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/hacker/email/:email",
+ "title": "get a hacker's information",
+ "name": "getHacker",
+ "group": "Hacker",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "String",
+ "optional": false,
+ "field": "email",
+ "description": "a hacker's unique email
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Hacker not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/email/:email"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/hacker/resume:id",
+ "title": "get the resume for a hacker.",
+ "name": "getHackerResume",
+ "group": "Hacker",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "ObjectId",
+ "optional": false,
+ "field": "id",
+ "description": "Hacker id
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "HTTP/1.1 200 OK\n{\n message: \"Downloaded resume\",\n data: {\n id: \"507f191e810c19729de860ea\",\n resume: [Buffer]\n }\n}",
+ "type": "json"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": ""Resume does not exist"
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response:",
+ "content": "HTTP/1.1 404\n{\n message: \"Resume not found\",\n data: {}\n}",
+ "type": "json"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Must be logged in, and the account id must be linked to the hacker."
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker"
+ },
+ {
+ "type": "get",
+ "url": "/hacker/stats",
+ "title": "Gets the stats of all of the hackers who have applied.",
+ "name": "getHackerStats",
+ "group": "Hacker",
+ "version": "0.0.9",
+ "parameter": {
+ "fields": {
+ "query": [
+ {
+ "group": "query",
+ "type": "String",
+ "optional": false,
+ "field": "model",
+ "description": "the model to be searched (Only hacker supported)
"
+ },
+ {
+ "group": "query",
+ "type": "Array",
+ "optional": false,
+ "field": "q",
+ "description": "the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Retrieved stats\",\n \"data\": {\n \"stats\" : {\n \"total\": 10,\n \"status\": { \"Applied\": 10 },\n \"school\": { \"McGill University\": 3, \"Harvard University\": 7 },\n degree: { \"Undergraduate\": 10 },\n gender: { \"Male\": 1, \"Female\": 9 },\n travel: { \"true\": 7, \"false\": 3 },\n ethnicity: { \"White\": 10, },\n jobInterest: { \"Internship\": 10 },\n major: { \"Computer Science\": 10 },\n graduationYear: { \"2019\": 10 },\n dietaryRestrictions: { \"None\": 10 },\n shirtSize: { \"M\": 3, \"XL\": 7 },\n age: { \"22\": 10 }\n }\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/stats"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/hacker/:id",
+ "title": "update a hacker's information.",
+ "description": "This route only contains the ability to update a subset of a hacker's information. If you want to update a status, you must have Admin priviledges and use PATCH /hacker/status/:id.
",
+ "name": "patchHacker",
+ "group": "Hacker",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "school",
+ "description": "Name of the school the hacker goes to
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "gender",
+ "description": "Gender of the hacker
"
+ },
+ {
+ "group": "body",
+ "type": "Number",
+ "optional": true,
+ "field": "travel",
+ "description": "How much the hacker requires a bus for transportation
"
+ },
+ {
+ "group": "body",
+ "type": "String[]",
+ "optional": true,
+ "field": "ethnicity",
+ "description": "the ethnicities of the hacker
"
+ },
+ {
+ "group": "body",
+ "type": "String[]",
+ "optional": true,
+ "field": "major",
+ "description": "the major of the hacker
"
+ },
+ {
+ "group": "body",
+ "type": "Number",
+ "optional": true,
+ "field": "graduationYear",
+ "description": "the graduation year of the hacker
"
+ },
+ {
+ "group": "body",
+ "type": "Json",
+ "optional": true,
+ "field": "application",
+ "description": "The hacker's application
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "application: ",
+ "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }",
+ "type": "Json"
+ }
+ ]
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Changed hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while updating hacker\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/:id"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/hacker/confirmation/:id",
+ "title": "Allows confirmation of hacker attendence if they are accepted. Also allows change from 'confirmed' to 'withdrawn'.",
+ "name": "patchHackerConfirmed",
+ "group": "Hacker",
+ "version": "0.0.9",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "string",
+ "optional": true,
+ "field": "status",
+ "description": "The new status of the hacker. "Accepted", "Confirmed", or "Withdrawn"
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Confirmed\"\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ },
+ {
+ "name": "Hacker"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/confirmation/:id"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/hacker/status/:id",
+ "title": "update a hacker's status",
+ "name": "patchHackerStatus",
+ "group": "Hacker",
+ "version": "0.0.9",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "string",
+ "optional": true,
+ "field": "status",
+ "description": "Status of the hacker's application ("None"|"Applied"|"Accepted"|"Declined"|"Waitlisted"|"Confirmed"|"Withdrawn"|"Checked-in")
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/status/:id"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/hacker/resume/:id",
+ "title": "upload or update resume for a hacker.",
+ "name": "postHackerResume",
+ "group": "Hacker",
+ "version": "0.0.8",
+ "description": "NOTE: This must be sent via multipart/form-data POST request
",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "ObjectId",
+ "optional": false,
+ "field": "id",
+ "description": "Hacker id
"
+ }
+ ],
+ "body": [
+ {
+ "group": "body",
+ "type": "File",
+ "optional": false,
+ "field": "resume",
+ "description": "The uploaded file.
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Location in the bucket that the file was stored.
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "HTTP/1.1 200 OK\n{\n message: \"Uploaded resume\",\n data: {\n filename: \"resumes/1535032624768-507f191e810c19729de860ea\"\n }\n}",
+ "type": "json"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Must be logged in, and the account id must be linked to the hacker."
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/resume/:id"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/hacker/email/dayOf/:id",
+ "title": "",
+ "description": "Sends a hacker the day-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.
",
+ "name": "postHackerSendDayOfEmail",
+ "group": "Hacker",
+ "version": "0.0.9",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "string",
+ "optional": true,
+ "field": "status",
+ "description": "The hacker ID
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Hacker day-of email sent.\",\n \"data\": {}\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/email/dayOf/:id"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/hacker/email/weekOf/:id",
+ "title": "",
+ "description": "Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.
",
+ "name": "postHackerSendWeekOfEmail",
+ "group": "Hacker",
+ "version": "0.0.9",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "string",
+ "optional": true,
+ "field": "status",
+ "description": "The hacker ID
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/hacker/email/weekOf/:id",
+ "title": "",
+ "description": "Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.
",
+ "name": "postHackerSendWeekOfEmail",
+ "group": "Hacker",
+ "version": "0.0.9",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "string",
+ "optional": true,
+ "field": "status",
+ "description": "The hacker ID
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/sponsor/self",
+ "title": "get information about logged in sponsor",
+ "name": "self",
+ "group": "Hacker",
+ "version": "1.4.1",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Sponsor object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Sponsor not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": ": Sponsor"
+ }
+ ],
+ "filename": "routes/api/sponsor.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/sponsor/self"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/hacker/self",
+ "title": "get information about own hacker",
+ "name": "self",
+ "group": "Hacker",
+ "version": "0.0.8",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Hacker object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Hacker found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":[\"Accounting\"],\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n } \n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Hacker not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/hacker.js",
+ "groupTitle": "Hacker",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/hacker/self"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/",
+ "title": "version",
+ "version": "0.0.8",
+ "name": "index",
+ "group": "Index",
+ "permission": [
+ {
+ "name": "public"
+ }
+ ],
+ "filename": "routes/index.js",
+ "groupTitle": "Index",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/api/role/",
+ "title": "create a new role",
+ "name": "createRole",
+ "group": "Role",
+ "version": "1.1.1",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "name",
+ "description": "Name of the route
"
+ },
+ {
+ "group": "body",
+ "type": "Route[]",
+ "optional": false,
+ "field": "routes",
+ "description": "The routes that this role gives access to
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "application: ",
+ "content": "{\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n}",
+ "type": "Json"
+ }
+ ]
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Role object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Role creation successful\", \n \"data\": {\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while creating role\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/role.js",
+ "groupTitle": "Role",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/api/role/"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/search/",
+ "title": "provide a specific query for any defined model",
+ "name": "search",
+ "group": "Search",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "query": [
+ {
+ "group": "query",
+ "type": "String",
+ "optional": false,
+ "field": "model",
+ "description": "the model to be searched
"
+ },
+ {
+ "group": "query",
+ "type": "Array",
+ "optional": false,
+ "field": "q",
+ "description": "the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/
"
+ },
+ {
+ "group": "query",
+ "type": "String",
+ "optional": false,
+ "field": "sort",
+ "description": "either "asc" or "desc"
"
+ },
+ {
+ "group": "query",
+ "type": "number",
+ "optional": false,
+ "field": "page",
+ "description": "the page number that you would like
"
+ },
+ {
+ "group": "query",
+ "type": "number",
+ "optional": false,
+ "field": "limit",
+ "description": "the maximum number of results that you would like returned
"
+ },
+ {
+ "group": "query",
+ "type": "any",
+ "optional": false,
+ "field": "sort_by",
+ "description": "any parameter you want to sort the results by
"
+ },
+ {
+ "group": "query",
+ "type": "boolean",
+ "optional": false,
+ "field": "expand",
+ "description": "whether you want to expand sub documents within the results
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Results
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Successfully executed query, returning all results\",\n \"data\": [\n {...}\n ]\n }",
+ "type": "object"
},
- permission: [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"No results found.\",\n \"data\": {}\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response:",
+ "content": "{\"message\": \"Validation failed\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/search.js",
+ "groupTitle": "Search",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/search/"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/settings/",
+ "title": "Get the settings for the current hackathon",
+ "name": "getSettings",
+ "group": "Settings",
+ "version": "1.1.1",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Settings Object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Settings creation successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\"\n }\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "public"
+ }
+ ],
+ "filename": "routes/api/settings.js",
+ "groupTitle": "Settings",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/settings/"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/settings/",
+ "title": "Patch the settings for the current hackathon",
+ "name": "patchSettings",
+ "group": "Settings",
+ "version": "1.1.1",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "Date",
+ "optional": true,
+ "field": "openTime",
+ "description": "The opening time for the hackathon.
"
+ },
+ {
+ "group": "body",
+ "type": "Date",
+ "optional": true,
+ "field": "closeTime",
+ "description": "The closing time for the hackathon.
"
+ },
+ {
+ "group": "body",
+ "type": "Date",
+ "optional": true,
+ "field": "confirmTime",
+ "description": "The deadline for confirmation for the hackathon.
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Settings Object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Settings patch successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\"\n }\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrators"
+ }
+ ],
+ "filename": "routes/api/settings.js",
+ "groupTitle": "Settings",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/settings/"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/sponsor/",
+ "title": "create a new sponsor",
+ "name": "createSponsor",
+ "group": "Sponsor",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "MongoID",
+ "optional": false,
+ "field": "accountId",
+ "description": "ObjectID of the respective account.
"
+ },
+ {
+ "group": "body",
+ "type": "Number",
+ "optional": false,
+ "field": "tier",
+ "description": "Tier of the sponsor, from 0 to 5. 0 is lowest tier, and 5 is the custom tier.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "company",
+ "description": "Name of the company.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "contractURL",
+ "description": "URL link to the contract with the company.
"
+ },
+ {
+ "group": "body",
+ "type": "MongoID[]",
+ "optional": false,
+ "field": "nominees",
+ "description": "Array of accounts that the company wish to nominate as hackers.
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Sponsor object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Sponsor creation successful\", \n \"data\": {...}\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while creating sponsor\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/sponsor.js",
+ "groupTitle": "Sponsor",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/sponsor/"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/sponsor/:id",
+ "title": "get a sponsor's information",
+ "name": "getSponsor",
+ "group": "Sponsor",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "string",
+ "optional": false,
+ "field": "id",
+ "description": "a sponsor's unique mongoID
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Sponsor object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
{
- name: "Administrator"
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Sponsor not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/sponsor.js",
+ "groupTitle": "Sponsor",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/sponsor/:id"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/sponsor/",
+ "title": "update a sponsor",
+ "name": "patchSponsor",
+ "group": "Sponsor",
+ "version": "1.3.0",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "ObjectId",
+ "optional": false,
+ "field": "id",
+ "description": "ObjectID of the sponsor
"
}
],
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/accept/:id"
- }
- ]
- },
- {
- type: "patch",
- url: "/hacker/confirmation/:id",
- title:
- "Allows confirmation of hacker attendence if they are accepted. Also allows change from 'confirmed' to 'withdrawn'.",
- name: "patchHackerConfirmed",
- group: "Hacker",
- version: "0.0.9",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "string",
- optional: true,
- field: "status",
- description:
- "The new status of the hacker. "Accepted", "Confirmed", or "Withdrawn"
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Changed hacker information", \n "data": {\n "status": "Confirmed"\n }\n}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: "Administrator"
- },
- {
- name: "Hacker"
- }
- ],
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/confirmation/:id"
- }
- ]
- },
- {
- type: "patch",
- url: "/hacker/status/:id",
- title: "update a hacker's status",
- name: "patchHackerStatus",
- group: "Hacker",
- version: "0.0.9",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "string",
- optional: true,
- field: "status",
- description:
- "Status of the hacker's application ("None"|"Applied"|"Waitlisted"|"Declined"|"Confirmed"|"Withdrawn"|"Checked-in")
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Changed hacker information", \n "data": {\n "status": "Accepted"\n }\n}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: "Administrator"
- }
- ],
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/status/:id"
- }
- ]
- },
- {
- type: "post",
- url: "/hacker/resume/:id",
- title: "upload or update resume for a hacker.",
- name: "postHackerResume",
- group: "Hacker",
- version: "0.0.8",
- description:
- "NOTE: This must be sent via multipart/form-data POST request
",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "ObjectId",
- optional: false,
- field: "id",
- description: "Hacker id
"
- }
- ],
- body: [
- {
- group: "body",
- type: "File",
- optional: false,
- field: "resume",
- description: "The uploaded file.
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description:
- "Location in the bucket that the file was stored.
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- 'HTTP/1.1 200 OK\n{\n message: "Uploaded resume", \n data: {\n filename: "resumes/1535032624768-507f191e810c19729de860ea"\n }\n}',
- type: "json"
- }
- ]
- },
- permission: [
- {
- name:
- "Must be logged in, and the account id must be linked to the hacker."
- }
- ],
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/resume/:id"
- }
- ]
- },
- {
- type: "post",
- url: "/hacker/email/weekOf/:id",
- title: "",
- description:
- "Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.
",
- name: "postHackerSendWeekOfEmail",
- group: "Hacker",
- version: "0.0.9",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "string",
- optional: true,
- field: "status",
- description: "The hacker ID
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Hacker week-of email sent.", \n "data": {}\n}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: "Administrator"
- }
- ],
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/email/weekOf/:id"
- }
- ]
- },
- {
- type: "post",
- url: "/hacker/email/weekOf/:id",
- title: "",
- description:
- "Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.
",
- name: "postHackerSendWeekOfEmail",
- group: "Hacker",
- version: "0.0.9",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "string",
- optional: true,
- field: "status",
- description: "The hacker ID
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Hacker week-of email sent.", \n "data": {}\n}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: "Administrator"
- }
- ],
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/email/weekOf/:id"
- }
- ]
- },
- {
- type: "get",
- url: "/sponsor/self",
- title: "get information about logged in sponsor",
- name: "self",
- group: "Hacker",
- version: "1.4.1",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Sponsor object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Successfully retrieved sponsor information", \n "data": {\n "id": "5bff4d736f86be0a41badb91",\n "accountId": "5bff4d736f86be0a41badb99",\n "tier": 3,\n "company": "companyName",\n "contractURL": "https://www.contractHere.com",\n "nominees": ["5bff4d736f86be0a41badb93","5bff4d736f86be0a41badb94"]\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content: '{"message": "Sponsor not found", "data": {}}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: ": Sponsor"
- }
- ],
- filename: "routes/api/sponsor.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/sponsor/self"
- }
- ]
- },
- {
- type: "get",
- url: "/hacker/self",
- title: "get information about own hacker",
- name: "self",
- group: "Hacker",
- version: "0.0.8",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Hacker object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Hacker found by logged in account id", \n "data": {\n "id":"5bff4d736f86be0a41badb91",\n "application":{\n "portfolioURL":{\n "resume":"resumes/1543458163426-5bff4d736f86be0a41badb91",\n "github":"https://github.com/abcd",\n "dropler":"https://dribbble.com/abcd",\n "personal":"https://www.hi.com/",\n "linkedIn":"https://linkedin.com/in/abcd",\n "other":"https://github.com/hackmcgill/hackerAPI/issues/168"\n },\n "jobInterest":"Internship",\n "skills":["Javascript","Typescript"],\n "comments":"hi!",\n "essay":"Pls accept me"\n },\n "status":"Applied",\n "ethnicity":["White or Caucasian"," Asian or Pacific Islander"],\n "accountId":"5bff2a35e533b0f6562b4998",\n "school":"McPherson College",\n "gender":"Female",\n "travel":0,\n "major":["Accounting"],\n "graduationYear":2019,\n "codeOfConduct":true,\n } \n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content: '{"message": "Hacker not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/hacker.js",
- groupTitle: "Hacker",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/hacker/self"
- }
- ]
- },
- {
- type: "get",
- url: "/",
- title: "version",
- version: "0.0.8",
- name: "index",
- group: "Index",
- permission: [
- {
- name: "public"
- }
- ],
- filename: "routes/index.js",
- groupTitle: "Index",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/"
- }
- ]
- },
- {
- type: "post",
- url: "/api/role/",
- title: "create a new role",
- name: "createRole",
- group: "Role",
- version: "1.1.1",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "String",
- optional: false,
- field: "name",
- description: "Name of the route
"
- },
- {
- group: "body",
- type: "Route[]",
- optional: false,
- field: "routes",
- description:
- "The routes that this role gives access to
"
- }
- ]
- },
- examples: [
- {
- title: "application: ",
- content:
- '{\n "name": "routename",\n "routes": [\n {\n uri: "/api/hacker/"\n requestType: "POST"\n }\n ]\n}',
- type: "Json"
- }
- ]
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Role object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Role creation successful", \n "data": {\n "name": "routename",\n "routes": [\n {\n uri: "/api/hacker/"\n requestType: "POST"\n }\n ]\n }\n}',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Error while creating role", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/role.js",
- groupTitle: "Role",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/api/role/"
- }
- ]
- },
- {
- type: "get",
- url: "/search/",
- title: "provide a specific query for any defined model",
- name: "search",
- group: "Search",
- version: "0.0.8",
- parameter: {
- fields: {
- query: [
- {
- group: "query",
- type: "String",
- optional: false,
- field: "model",
- description: "the model to be searched
"
- },
- {
- group: "query",
- type: "Array",
- optional: false,
- field: "q",
- description:
- "the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/
"
- },
- {
- group: "query",
- type: "String",
- optional: false,
- field: "sort",
- description:
- "either "asc" or "desc"
"
- },
- {
- group: "query",
- type: "number",
- optional: false,
- field: "page",
- description:
- "the page number that you would like
"
- },
- {
- group: "query",
- type: "number",
- optional: false,
- field: "limit",
- description:
- "the maximum number of results that you would like returned
"
- },
- {
- group: "query",
- type: "any",
- optional: false,
- field: "sort_by",
- description:
- "any parameter you want to sort the results by
"
- },
- {
- group: "query",
- type: "boolean",
- optional: false,
- field: "expand",
- description:
- "whether you want to expand sub documents within the results
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Results
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response:",
- content:
- '{\n "message": "Successfully executed query, returning all results",\n "data": [\n {...}\n ]\n }',
- type: "object"
- },
- {
- title: "Success-Response:",
- content:
- '{\n "message": "No results found.",\n "data": {}\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response:",
- content: '{"message": "Validation failed", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/search.js",
- groupTitle: "Search",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/search/"
- }
- ]
- },
- {
- type: "get",
- url: "/settings/",
- title: "Get the settings for the current hackathon",
- name: "getSettings",
- group: "Settings",
- version: "1.1.1",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Settings Object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Settings creation successful.", \n "data": {\n "settings": {\n openTime: "Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)",\n closeTime: "Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)",\n confirmTime: "Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)"\n }\n }\n}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: "public"
- }
- ],
- filename: "routes/api/settings.js",
- groupTitle: "Settings",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/settings/"
- }
- ]
- },
- {
- type: "patch",
- url: "/settings/",
- title: "Patch the settings for the current hackathon",
- name: "patchSettings",
- group: "Settings",
- version: "1.1.1",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "Date",
- optional: true,
- field: "openTime",
- description:
- "The opening time for the hackathon.
"
- },
- {
- group: "body",
- type: "Date",
- optional: true,
- field: "closeTime",
- description:
- "The closing time for the hackathon.
"
- },
- {
- group: "body",
- type: "Date",
- optional: true,
- field: "confirmTime",
- description:
- "The deadline for confirmation for the hackathon.
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Settings Object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Settings patch successful.", \n "data": {\n "settings": {\n openTime: "Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)",\n closeTime: "Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)",\n confirmTime: "Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)"\n }\n }\n}',
- type: "object"
- }
- ]
- },
- permission: [
- {
- name: "Administrators"
- }
- ],
- filename: "routes/api/settings.js",
- groupTitle: "Settings",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/settings/"
- }
- ]
- },
- {
- type: "post",
- url: "/sponsor/",
- title: "create a new sponsor",
- name: "createSponsor",
- group: "Sponsor",
- version: "0.0.8",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "MongoID",
- optional: false,
- field: "accountId",
- description:
- "ObjectID of the respective account.
"
- },
- {
- group: "body",
- type: "Number",
- optional: false,
- field: "tier",
- description:
- "Tier of the sponsor, from 0 to 5. 0 is lowest tier, and 5 is the custom tier.
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "company",
- description: "Name of the company.
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "contractURL",
- description:
- "URL link to the contract with the company.
"
- },
- {
- group: "body",
- type: "MongoID[]",
- optional: false,
- field: "nominees",
- description:
- "Array of accounts that the company wish to nominate as hackers.
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Sponsor object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Sponsor creation successful", \n "data": {...}\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Error while creating sponsor", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/sponsor.js",
- groupTitle: "Sponsor",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/sponsor/"
- }
- ]
- },
- {
- type: "get",
- url: "/sponsor/:id",
- title: "get a sponsor's information",
- name: "getSponsor",
- group: "Sponsor",
- version: "0.0.8",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "string",
- optional: false,
- field: "id",
- description: "a sponsor's unique mongoID
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Sponsor object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Successfully retrieved sponsor information", \n "data": {\n "id": "5bff4d736f86be0a41badb91",\n "accountId": "5bff4d736f86be0a41badb99",\n "tier": 3,\n "company": "companyName",\n "contractURL": "https://www.contractHere.com",\n "nominees": ["5bff4d736f86be0a41badb93","5bff4d736f86be0a41badb94"]\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content: '{"message": "Sponsor not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/sponsor.js",
- groupTitle: "Sponsor",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/sponsor/:id"
- }
- ]
- },
- {
- type: "patch",
- url: "/sponsor/",
- title: "update a sponsor",
- name: "patchSponsor",
- group: "Sponsor",
- version: "1.3.0",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "ObjectId",
- optional: false,
- field: "id",
- description: "ObjectID of the sponsor
"
- }
- ],
- body: [
- {
- group: "body",
- type: "String",
- optional: false,
- field: "company",
- description: "Name of the company.
"
- },
- {
- group: "body",
- type: "String",
- optional: false,
- field: "contractURL",
- description:
- "URL link to the contract with the company.
"
- },
- {
- group: "body",
- type: "ObjectId[]",
- optional: false,
- field: "nominees",
- description:
- "Array of accounts that the company wish to nominate as hackers.
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Sponsor object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Sponsor update successful", \n "data": {...}\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Error while updating sponsor", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/sponsor.js",
- groupTitle: "Sponsor",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/sponsor/"
- }
- ]
- },
- {
- type: "post",
- url: "/team/",
- title: "create a new team consisting of only the logged in user",
- name: "createTeam",
- group: "Team",
- version: "0.0.8",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "String",
- optional: false,
- field: "name",
- description: "Name of the team.
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "devpostURL",
- description:
- "Devpost link to hack. Once the link is sent, the hack will be considered to be submitted.
"
- },
- {
- group: "body",
- type: "String",
- optional: true,
- field: "projectName",
- description: "Name of the team.
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Team object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Team creation successful", \n "data": {...}\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Error while creating team", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/team.js",
- groupTitle: "Team",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/team/"
- }
- ]
- },
- {
- type: "patch",
- url: "/team/leave/",
- title: "Allows a logged in hacker to leave current team",
- name: "deleteSelfFromTeam",
- group: "Team",
- version: "1.1.1",
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "{}
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Removal from team successful.", \n "data": {}\n}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/team.js",
- groupTitle: "Team",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/team/leave/"
- }
- ]
- },
- {
- type: "get",
- url: "/team/:id",
- title: "get a team's information",
- name: "getTeam",
- group: "Team",
- version: "0.0.8",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "ObjectId",
- optional: false,
- field: "id",
- description: "MongoId of the team
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Team object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Team retrieval successful", \n "data": { \n "team": {\n "name":"foo",\n "members": [\n ObjectId(\'...\')\n ],\n "devpostURL": "www.devpost.com/foo",\n "projectName": "fooey"\n },\n "members": [\n {\n "firstName": "John",\n "lastName": "Doe"\n }\n ],\n }\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content: '{"message": "Team not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/team.js",
- groupTitle: "Team",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/team/:id"
- }
- ]
- },
- {
- type: "patch",
- url: "/team/join/",
- title: "Allows a logged in hacker to join a team by name",
- name: "patchJoinTeam",
- group: "Team",
- version: "1.1.1",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "string",
- optional: true,
- field: "name",
- description: "Name of the team to join
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "{}
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Team join successful.", \n "data": {}\n}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/team.js",
- groupTitle: "Team",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/team/join/"
- }
- ]
- },
- {
- type: "patch",
- url: "/team/:hackerId",
- title:
- "Update a team's information. The team is specified by the hacker belonging to it.",
- name: "patchTeam",
- group: "Team",
- version: "0.0.8",
- description:
- "We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId
",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "ObjectId",
- optional: false,
- field: "hackerId",
- description: "a hacker's unique Id
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Team object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Team update successful.", \n "data": {...}\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description:
- "Query input that caused the error.
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Team not found", "data": {teamId}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/team.js",
- groupTitle: "Team",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/team/:hackerId"
- }
- ]
- },
- {
- type: "post",
- url: "/volunteer/",
- title: "create a new volunteer",
- name: "createVolunteer",
- group: "Volunteer",
- version: "0.0.8",
- parameter: {
- fields: {
- body: [
- {
- group: "body",
- type: "MongoID",
- optional: false,
- field: "accountId",
- description:
- "MongoID of the account of the volunteer
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "string",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "object",
- optional: false,
- field: "data",
- description: "Volunteer object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Volunteer creation successful", \n "data": {...}\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "string",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Error while creating volunteer", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/volunteer.js",
- groupTitle: "Volunteer",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/volunteer/"
- }
- ]
- },
- {
- type: "get",
- url: "/volunteer/:id",
- title: "get a volunteer's information",
- name: "getVolunteer",
- group: "Volunteer",
- version: "1.3.0",
- parameter: {
- fields: {
- param: [
- {
- group: "param",
- type: "ObjectId",
- optional: false,
- field: "id",
- description: "a volunteer's unique mongoID
"
- }
- ]
- }
- },
- success: {
- fields: {
- "Success 200": [
- {
- group: "Success 200",
- type: "String",
- optional: false,
- field: "message",
- description: "Success message
"
- },
- {
- group: "Success 200",
- type: "Object",
- optional: false,
- field: "data",
- description: "Volunteer object
"
- }
- ]
- },
- examples: [
- {
- title: "Success-Response: ",
- content:
- '{\n "message": "Successfully retrieved volunteer information", \n "data": {...}\n }',
- type: "object"
- }
- ]
- },
- error: {
- fields: {
- "Error 4xx": [
- {
- group: "Error 4xx",
- type: "String",
- optional: false,
- field: "message",
- description: "Error message
"
- },
- {
- group: "Error 4xx",
- type: "Object",
- optional: false,
- field: "data",
- description: "empty
"
- }
- ]
- },
- examples: [
- {
- title: "Error-Response: ",
- content:
- '{"message": "Volunteer not found", "data": {}}',
- type: "object"
- }
- ]
- },
- filename: "routes/api/volunteer.js",
- groupTitle: "Volunteer",
- sampleRequest: [
- {
- url: "https://api.mchacks.ca/api/volunteer/:id"
- }
- ]
- }
- ]
-});
+ "body": [
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "company",
+ "description": "Name of the company.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "contractURL",
+ "description": "URL link to the contract with the company.
"
+ },
+ {
+ "group": "body",
+ "type": "ObjectId[]",
+ "optional": false,
+ "field": "nominees",
+ "description": "Array of accounts that the company wish to nominate as hackers.
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Sponsor object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Sponsor update successful\", \n \"data\": {...}\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while updating sponsor\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/sponsor.js",
+ "groupTitle": "Sponsor",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/sponsor/"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/team/",
+ "title": "create a new team consisting of only the logged in user",
+ "name": "createTeam",
+ "group": "Team",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "String",
+ "optional": false,
+ "field": "name",
+ "description": "Name of the team.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "devpostURL",
+ "description": "Devpost link to hack. Once the link is sent, the hack will be considered to be submitted.
"
+ },
+ {
+ "group": "body",
+ "type": "String",
+ "optional": true,
+ "field": "projectName",
+ "description": "Name of the team.
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Team object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Team creation successful\", \n \"data\": {...}\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while creating team\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/team.js",
+ "groupTitle": "Team",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/team/"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/team/leave/",
+ "title": "Allows a logged in hacker to leave current team",
+ "name": "deleteSelfFromTeam",
+ "group": "Team",
+ "version": "1.1.1",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "{}
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Removal from team successful.\",\n \"data\": {}\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/team.js",
+ "groupTitle": "Team",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/team/leave/"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/team/:id",
+ "title": "get a team's information",
+ "name": "getTeam",
+ "group": "Team",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "ObjectId",
+ "optional": false,
+ "field": "id",
+ "description": "MongoId of the team
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Team object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Team retrieval successful\", \n \"data\": { \n \"team\": {\n \"name\":\"foo\",\n \"members\": [\n ObjectId('...')\n ],\n \"devpostURL\": \"www.devpost.com/foo\",\n \"projectName\": \"fooey\"\n },\n \"members\": [\n {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\"\n }\n ],\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Team not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/team.js",
+ "groupTitle": "Team",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/team/:id"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/team/join/",
+ "title": "Allows a logged in hacker to join a team by name",
+ "name": "patchJoinTeam",
+ "group": "Team",
+ "version": "1.1.1",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "string",
+ "optional": true,
+ "field": "name",
+ "description": "Name of the team to join
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "{}
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Team join successful.\",\n \"data\": {}\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/team.js",
+ "groupTitle": "Team",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/team/join/"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/team/:hackerId",
+ "title": "Update a team's information. The team is specified by the hacker belonging to it.",
+ "name": "patchTeam",
+ "group": "Team",
+ "version": "0.0.8",
+ "description": "We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId
",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "ObjectId",
+ "optional": false,
+ "field": "hackerId",
+ "description": "a hacker's unique Id
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Team object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Team update successful.\", \n \"data\": {...}\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Query input that caused the error.
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Team not found\", \"data\": {teamId}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/team.js",
+ "groupTitle": "Team",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/team/:hackerId"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/travel/",
+ "title": "create a new travel",
+ "name": "createTravel",
+ "group": "Travel",
+ "version": "2.0.1",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "MongoID",
+ "optional": false,
+ "field": "accountId",
+ "description": "ObjectID of the respective account
"
+ },
+ {
+ "group": "body",
+ "type": "MongoID",
+ "optional": false,
+ "field": "hackerId",
+ "description": "ObjectID of the respective hacker
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Travel object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Travel creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"None\",\n \"request\": 50,\n \"offer\": 0\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while creating travel\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/travel.js",
+ "groupTitle": "Travel",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/travel/"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/travel/email/:email",
+ "title": "get a travel's information",
+ "name": "getTravel",
+ "group": "Travel",
+ "version": "2.0.1",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "String",
+ "optional": false,
+ "field": "email",
+ "description": "a travel's unique email
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Travel object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Travel not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/travel.js",
+ "groupTitle": "Travel",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/travel/email/:email"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/travel/:id",
+ "title": "get a traveler's information",
+ "name": "getTravel",
+ "group": "Travel",
+ "version": "2.0.1",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "String",
+ "optional": false,
+ "field": "id",
+ "description": "a travel's unique mongoID
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Travel object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Travel not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/travel.js",
+ "groupTitle": "Travel",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/travel/:id"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/travel/offer/:id",
+ "title": "update a traveler's offer",
+ "name": "patchTravelOffer",
+ "group": "Travel",
+ "version": "2.0.1",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "number",
+ "optional": true,
+ "field": "offer",
+ "description": "Amount of money offered for travel
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Travel object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"offer\": 75\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/travel.js",
+ "groupTitle": "Travel",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/travel/offer/:id"
+ }
+ ]
+ },
+ {
+ "type": "patch",
+ "url": "/travel/status/:id",
+ "title": "update a traveler's status",
+ "name": "patchTravelStatus",
+ "group": "Travel",
+ "version": "2.0.1",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "string",
+ "optional": true,
+ "field": "status",
+ "description": "Status of the travel's reimbursement ("None"|"Bus"|"Offered"|"Valid"|"Invalid"|"Claimed")
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Travel object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response:",
+ "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
+ "type": "object"
+ }
+ ]
+ },
+ "permission": [
+ {
+ "name": "Administrator"
+ }
+ ],
+ "filename": "routes/api/travel.js",
+ "groupTitle": "Travel",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/travel/status/:id"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/travel/self",
+ "title": "get information about own hacker's travel",
+ "name": "self",
+ "group": "Travel",
+ "version": "2.0.1",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Travel object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Travel found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Claimed\"\n \"request\": 90,\n \"offer\": 80\n } \n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Travel not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/travel.js",
+ "groupTitle": "Travel",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/travel/self"
+ }
+ ]
+ },
+ {
+ "type": "post",
+ "url": "/volunteer/",
+ "title": "create a new volunteer",
+ "name": "createVolunteer",
+ "group": "Volunteer",
+ "version": "0.0.8",
+ "parameter": {
+ "fields": {
+ "body": [
+ {
+ "group": "body",
+ "type": "MongoID",
+ "optional": false,
+ "field": "accountId",
+ "description": "MongoID of the account of the volunteer
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "Volunteer object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Volunteer creation successful\", \n \"data\": {...}\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "string",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Error while creating volunteer\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/volunteer.js",
+ "groupTitle": "Volunteer",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/volunteer/"
+ }
+ ]
+ },
+ {
+ "type": "get",
+ "url": "/volunteer/:id",
+ "title": "get a volunteer's information",
+ "name": "getVolunteer",
+ "group": "Volunteer",
+ "version": "1.3.0",
+ "parameter": {
+ "fields": {
+ "param": [
+ {
+ "group": "param",
+ "type": "ObjectId",
+ "optional": false,
+ "field": "id",
+ "description": "a volunteer's unique mongoID
"
+ }
+ ]
+ }
+ },
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Success message
"
+ },
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "Volunteer object
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Success-Response: ",
+ "content": "{\n \"message\": \"Successfully retrieved volunteer information\", \n \"data\": {...}\n }",
+ "type": "object"
+ }
+ ]
+ },
+ "error": {
+ "fields": {
+ "Error 4xx": [
+ {
+ "group": "Error 4xx",
+ "type": "String",
+ "optional": false,
+ "field": "message",
+ "description": "Error message
"
+ },
+ {
+ "group": "Error 4xx",
+ "type": "Object",
+ "optional": false,
+ "field": "data",
+ "description": "empty
"
+ }
+ ]
+ },
+ "examples": [
+ {
+ "title": "Error-Response: ",
+ "content": "{\"message\": \"Volunteer not found\", \"data\": {}}",
+ "type": "object"
+ }
+ ]
+ },
+ "filename": "routes/api/volunteer.js",
+ "groupTitle": "Volunteer",
+ "sampleRequest": [
+ {
+ "url": "https://api.mchacks.ca/api/volunteer/:id"
+ }
+ ]
+ }
+] });
diff --git a/docs/api/api_data.json b/docs/api/api_data.json
index 7f69476a..5f0a8c21 100644
--- a/docs/api/api_data.json
+++ b/docs/api/api_data.json
@@ -1,3595 +1 @@
-[
- {
- "type": "post",
- "url": "/account/",
- "title": "create a new account",
- "name": "create",
- "group": "Account",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "firstName",
- "description": "First name of the account creator.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "lastName",
- "description": "Last name of the account creator.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "pronoun",
- "description": "the pronoun of the account creator.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "email",
- "description": "Email of the account.
"
- },
- {
- "group": "body",
- "type": "String[]",
- "optional": false,
- "field": "dietaryRestrictions",
- "description": "Any dietary restrictions for the user. 'None' if there are no restrictions
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "gender",
- "description": "Gender of the account creator.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "password",
- "description": "The password of the account.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "birthDate",
- "description": "a Date parsable string.
"
- },
- {
- "group": "body",
- "type": "Number",
- "optional": false,
- "field": "phoneNumber",
- "description": "the user's phone number, represented as a string.
"
- }
- ],
- "header": [
- {
- "group": "header",
- "type": "JWT",
- "optional": true,
- "field": "token",
- "description": "the user's invite token.
"
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example:",
- "content": "{ \n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"password\":\"hunter2\",\n \"dietaryRestrictions\":[\"Halal\"],\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":\"10/30/1997\"\n}",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Account object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Account creation successful\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"dietaryRestrictions\":[\"Halal\"],\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\n \"message\": \"Account already exists\", \n \"data\": {\n \"route\": \"/\"\n }\n}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/account.js",
- "groupTitle": "Account",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/account/"
- }
- ]
- },
- {
- "type": "get",
- "url": "/account/:id",
- "title": "gets information from an account with mongoid ':id'",
- "name": "getAccount",
- "group": "Account",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "ObjectId",
- "optional": false,
- "field": "id",
- "description": "MongoId of an account
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Account object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Account found by user id\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"dietaryRestrictions\":[\"Halal\"],\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Account not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/account.js",
- "groupTitle": "Account",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/account/:id"
- }
- ]
- },
- {
- "type": "get",
- "url": "/account/invite",
- "title": "Get all of the invites.",
- "name": "getAllInvites",
- "group": "Account",
- "version": "0.0.8",
- "description": "Get all of the invites that currently exist in the database.
",
- "success": {
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Invite retrieval successful.\", \n \"data\": [{\n \"email\":\"abc@def.com\",\n \"accountType\":\"Hacker\"\n }]\n }",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/account.js",
- "groupTitle": "Account",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/account/invite"
- }
- ]
- },
- {
- "type": "post",
- "url": "/account/invite",
- "title": "invites a user to create an account with the specified accountType",
- "name": "inviteAccount",
- "group": "Account",
- "version": "0.0.8",
- "description": "sends link with token to be used with the account/create route
",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "email",
- "description": "email of the account to be created and where to send the link
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "accountType",
- "description": "the type of the account which the user can create, for sponsor this should specify tier as well
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Account object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Successfully invited user\", \n \"data\": {}\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Error object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response:",
- "content": "{\n \"message\": \"Invalid Authentication\",\n \"data\": {\n \"route\": \"/invite\"\n }\n }",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/account.js",
- "groupTitle": "Account",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/account/invite"
- }
- ]
- },
- {
- "type": "get",
- "url": "/account/self",
- "title": "get information about own account",
- "name": "self",
- "group": "Account",
- "version": "0.0.8",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Account object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Account found by user email\", \n \"data\": {\n \t\"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"dietaryRestrictions\":[\"Halal\"],\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Account not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/account.js",
- "groupTitle": "Account",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/account/self"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/account/:id",
- "title": "update an account's information",
- "name": "updateOneUser",
- "group": "Account",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "firstName",
- "description": "First name of the account creator.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "lastName",
- "description": "Last name of the account creator.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "pronoun",
- "description": "The pronoun of the account creator.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "email",
- "description": "Email of the account.
"
- },
- {
- "group": "body",
- "type": "String[]",
- "optional": true,
- "field": "dietaryRestrictions",
- "description": "Any dietary restrictions for the user. 'None' if there are no restrictions
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "gender",
- "description": "Gender of the account creator.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "birthDate",
- "description": "A Date parsable string.
"
- },
- {
- "group": "body",
- "type": "Number",
- "optional": true,
- "field": "phoneNumber",
- "description": "The user's phone number, represented as a string.
"
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example:",
- "content": "{ \"gender\": \"Male\" }",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Account object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Account update successful.\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"dietaryRestrictions\":[\"Halal\"],\n \"phoneNumber\":1234567890,\n \t\"gender\": \"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Error while updating account\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/account.js",
- "groupTitle": "Account",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/account/:id"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/auth/password/change",
- "title": "change password for logged in user",
- "name": "changePassword",
- "group": "Authentication",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "String",
- "optional": false,
- "field": "oldPassword",
- "description": "The current password of the user
"
- },
- {
- "group": "Parameter",
- "type": "String",
- "optional": false,
- "field": "newPassword",
- "description": "The new password of the user
"
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example:",
- "content": "{\n \"oldPassword\": \"password12345\",\n \"newPassword\": \"password123456\"\n}",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\"message\": \"Successfully reset password\", \"data\": {}}",
- "type": "json"
- }
- ]
- },
- "permission": [
- {
- "name": ": Must be logged in"
- }
- ],
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/password/change"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/hacker/accept/:id",
- "title": "accept a Hacker",
- "name": "acceptHacker",
- "group": "Hacker",
- "version": "0.0.9",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "Administrator"
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/accept/:id"
- }
- ]
- },
- {
- "type": "post",
- "url": "/auth/confirm/:token",
- "title": "confirm account using the JWT in :token",
- "name": "confirmAccount",
- "group": "Authentication",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "String",
- "optional": false,
- "field": "JWT",
- "description": "for confirming the account
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\"message\": \"Successfully confirmed account\", \"data\": {}}",
- "type": "json"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response:",
- "content": "{\"message\": \"Invalid token for confirming account, \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/confirm/:token"
- }
- ]
- },
- {
- "type": "post",
- "url": "/auth/password/forgot",
- "title": "forgot password route",
- "name": "forgotPassword",
- "group": "Authentication",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "String",
- "optional": false,
- "field": "email",
- "description": "the email address of the account
"
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example:",
- "content": "{ \"email\": \"myemail@mchacks.ca\" }",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\"message\": \"Sent reset email\", \"data\": {}}",
- "type": "json"
- }
- ]
- },
- "permission": [
- {
- "name": ": public"
- }
- ],
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/password/forgot"
- }
- ]
- },
- {
- "type": "get",
- "url": "/auth/rolebindings/:id",
- "title": "retrieve rolebindings for a user given by their user id :id",
- "name": "getRoleBindings",
- "group": "Authentication",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "ObjectId",
- "optional": false,
- "field": "id",
- "description": "MongoId of an account
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Rolebindings object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Role Bindings not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/rolebindings/:id"
- }
- ]
- },
- {
- "type": "get",
- "url": "/auth/roles",
- "title": "get roles",
- "name": "getRoles",
- "description": "get all roles that exist in the database
",
- "group": "Authentication",
- "version": "0.0.8",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\"message\": \"Sucessfully retrieved all roles\", \"data\":\n[{name: \"GodStaff\", routes: Array(27), id: \"5bee20ef3ca9dd4754382880\"},\n {name: \"Hacker\", routes: Array(10), id: \"5bee20ef3ca9dd4754382881\"},\n {name: \"Volunteer\", routes: Array(4), id: \"5bee20ef3ca9dd4754382882\"}]",
- "type": "json"
- }
- ]
- },
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/roles"
- }
- ]
- },
- {
- "type": "post",
- "url": "/auth/login",
- "title": "login to the service",
- "name": "login",
- "group": "Authentication",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "string",
- "optional": false,
- "field": "email",
- "description": "Account email
"
- },
- {
- "group": "Parameter",
- "type": "string",
- "optional": false,
- "field": "password",
- "description": "Account password
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\"message\": \"Successfully logged in\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Invalid Authentication\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": ": public"
- }
- ],
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/login"
- }
- ]
- },
- {
- "type": "get",
- "url": "/auth/logout",
- "title": "logout of service",
- "name": "logout",
- "group": "Authentication",
- "version": "0.0.8",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\"message\": \"Successfully logged out\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": ": public"
- }
- ],
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/logout"
- }
- ]
- },
- {
- "type": "get",
- "url": "/auth/confirm/resend",
- "title": "resend confirmation token",
- "name": "resendConfirmAccount",
- "group": "Authentication",
- "version": "0.0.8",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\"message\": \"Successfully resent confirmation email\", \"data\": {}}",
- "type": "json"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response:",
- "content": " HTTP/1.1 422\n{\"message\": \"Account already confirmed\", \"data\": {}}",
- "type": "json"
- },
- {
- "title": "Error-Response:",
- "content": " HTTP/1.1 428\n{\"message\": \"Account confirmation token does not exist\", \"data\": {}}",
- "type": "json"
- }
- ]
- },
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/confirm/resend"
- }
- ]
- },
- {
- "type": "post",
- "url": "/auth/password/reset",
- "title": "reset password",
- "name": "resetPassword",
- "group": "Authentication",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "String",
- "optional": false,
- "field": "password",
- "description": "the password of the account
"
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example:",
- "content": "{ \"password\": \"hunter2\" }",
- "type": "json"
- }
- ]
- },
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authentication",
- "description": "the token that was provided in the reset password email
"
- }
- ]
- },
- "examples": [
- {
- "title": "Header-Example:",
- "content": "{\n \"X-Reset-Token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n}",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\"message\": \"Successfully reset password\", \"data\": {}}",
- "type": "json"
- }
- ]
- },
- "permission": [
- {
- "name": ": must have authentication token"
- }
- ],
- "filename": "routes/api/auth.js",
- "groupTitle": "Authentication",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/auth/password/reset"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/hacker/checkin/:id",
- "title": "update a hacker's status to be 'Checked-in'. Note that the Hacker must eitehr be Accepted or Confirmed.",
- "name": "checkinHacker",
- "group": "Hacker",
- "version": "0.0.9",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "string",
- "optional": true,
- "field": "status",
- "description": "Check-in status. "Checked-in"
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Checked-in\"\n }\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "Administrator"
- },
- {
- "name": "Volunteer"
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/checkin/:id"
- }
- ]
- },
- {
- "type": "post",
- "url": "/hacker/",
- "title": "create a new hacker",
- "name": "createHacker",
- "group": "Hacker",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "MongoID",
- "optional": false,
- "field": "accountId",
- "description": "ObjectID of the respective account
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "school",
- "description": "Name of the school the hacker goes to
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "gender",
- "description": "Gender of the hacker
"
- },
- {
- "group": "body",
- "type": "Boolean",
- "optional": false,
- "field": "travel",
- "description": "Whether the hacker requires a bus for transportation
"
- },
- {
- "group": "body",
- "type": "String[]",
- "optional": false,
- "field": "ethnicity",
- "description": "the ethnicities of the hacker
"
- },
- {
- "group": "body",
- "type": "String[]",
- "optional": false,
- "field": "major",
- "description": "the major of the hacker
"
- },
- {
- "group": "body",
- "type": "Number",
- "optional": false,
- "field": "graduationYear",
- "description": "the graduation year of the hacker
"
- },
- {
- "group": "body",
- "type": "Boolean",
- "optional": false,
- "field": "codeOfConduct",
- "description": "acceptance of the code of conduct
"
- },
- {
- "group": "body",
- "type": "Json",
- "optional": false,
- "field": "application",
- "description": "The hacker's application. Resume and jobInterest fields are required.
"
- }
- ]
- },
- "examples": [
- {
- "title": "application: ",
- "content": "{\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n}",
- "type": "Json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Hacker creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":\"Accounting\",\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n }\n}",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Error while creating hacker\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/"
- }
- ]
- },
- {
- "type": "get",
- "url": "/hacker/:id",
- "title": "get a hacker's information",
- "name": "getHacker",
- "group": "Hacker",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "String",
- "optional": false,
- "field": "id",
- "description": "a hacker's unique mongoID
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":\"Accounting\",\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Hacker not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/:id"
- }
- ]
- },
- {
- "type": "get",
- "url": "/hacker/email/:email",
- "title": "get a hacker's information",
- "name": "getHacker",
- "group": "Hacker",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "String",
- "optional": false,
- "field": "email",
- "description": "a hacker's unique email
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":\"Accounting\",\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Hacker not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/email/:email"
- }
- ]
- },
- {
- "type": "get",
- "url": "/hacker/resume:id",
- "title": "get the resume for a hacker.",
- "name": "getHackerResume",
- "group": "Hacker",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "ObjectId",
- "optional": false,
- "field": "id",
- "description": "Hacker id
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n message: \"Downloaded resume\",\n data: {\n id: \"507f191e810c19729de860ea\",\n resume: [Buffer]\n }\n}",
- "type": "json"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": ""Resume does not exist"
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response:",
- "content": "HTTP/1.1 404\n{\n message: \"Resume not found\",\n data: {}\n}",
- "type": "json"
- }
- ]
- },
- "permission": [
- {
- "name": "Must be logged in, and the account id must be linked to the hacker."
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker"
- },
- {
- "type": "get",
- "url": "/hacker/stats",
- "title": "Gets the stats of all of the hackers who have applied.",
- "name": "getHackerStats",
- "group": "Hacker",
- "version": "0.0.9",
- "parameter": {
- "fields": {
- "query": [
- {
- "group": "query",
- "type": "String",
- "optional": false,
- "field": "model",
- "description": "the model to be searched (Only hacker supported)
"
- },
- {
- "group": "query",
- "type": "Array",
- "optional": false,
- "field": "q",
- "description": "the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Retrieved stats\",\n \"data\": {\n \"stats\" : {\n \"total\": 10,\n \"status\": { \"Applied\": 10 },\n \"school\": { \"McGill University\": 3, \"Harvard University\": 7 },\n degree: { \"Undergraduate\": 10 },\n gender: { \"Male\": 1, \"Female\": 9 },\n travel: { \"7\": 7, \"0\": 3 },\n ethnicity: { \"White\": 10, },\n jobInterest: { \"Internship\": 10 },\n major: { \"Computer Science\": 10 },\n graduationYear: { \"2019\": 10 },\n dietaryRestrictions: { \"None\": 10 },\n shirtSize: { \"M\": 3, \"XL\": 7 },\n age: { \"22\": 10 }\n }\n }\n}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/stats"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/hacker/:id",
- "title": "update a hacker's information.",
- "description": "This route only contains the ability to update a subset of a hacker's information. If you want to update a status, you must have Admin priviledges and use PATCH /hacker/status/:id.
",
- "name": "patchHacker",
- "group": "Hacker",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "school",
- "description": "Name of the school the hacker goes to
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "gender",
- "description": "Gender of the hacker
"
- },
- {
- "group": "body",
- "type": "Boolean",
- "optional": true,
- "field": "travel",
- "description": "Whether the hacker requires a bus for transportation
"
- },
- {
- "group": "body",
- "type": "String[]",
- "optional": true,
- "field": "ethnicity",
- "description": "the ethnicities of the hacker
"
- },
- {
- "group": "body",
- "type": "String[]",
- "optional": true,
- "field": "major",
- "description": "the major of the hacker
"
- },
- {
- "group": "body",
- "type": "Number",
- "optional": true,
- "field": "graduationYear",
- "description": "the graduation year of the hacker
"
- },
- {
- "group": "body",
- "type": "Json",
- "optional": true,
- "field": "application",
- "description": "The hacker's application
"
- }
- ]
- },
- "examples": [
- {
- "title": "application: ",
- "content": "{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n }",
- "type": "Json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Changed hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":\"Accounting\",\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n}",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Error while updating hacker\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/:id"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/hacker/confirmation/:id",
- "title": "Allows confirmation of hacker attendence if they are accepted. Also allows change from 'confirmed' to 'withdrawn'.",
- "name": "patchHackerConfirmed",
- "group": "Hacker",
- "version": "0.0.9",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "string",
- "optional": true,
- "field": "status",
- "description": "The new status of the hacker. "Accepted", "Confirmed", or "Cancelled"
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Confirmed\"\n }\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "Administrator"
- },
- {
- "name": "Hacker"
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/confirmation/:id"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/hacker/status/:id",
- "title": "update a hacker's status",
- "name": "patchHackerStatus",
- "group": "Hacker",
- "version": "0.0.9",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "string",
- "optional": true,
- "field": "status",
- "description": "Status of the hacker's application ("None"|"Applied"|"Accepted"|"Declined"|"Waitlisted"|"Confirmed"|"Withdrawn"|"Checked-in")
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "Administrator"
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/status/:id"
- }
- ]
- },
- {
- "type": "post",
- "url": "/hacker/resume/:id",
- "title": "upload or update resume for a hacker.",
- "name": "postHackerResume",
- "group": "Hacker",
- "version": "0.0.8",
- "description": "NOTE: This must be sent via multipart/form-data POST request
",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "ObjectId",
- "optional": false,
- "field": "id",
- "description": "Hacker id
"
- }
- ],
- "body": [
- {
- "group": "body",
- "type": "File",
- "optional": false,
- "field": "resume",
- "description": "The uploaded file.
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Location in the bucket that the file was stored.
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n message: \"Uploaded resume\",\n data: {\n filename: \"resumes/1535032624768-507f191e810c19729de860ea\"\n }\n}",
- "type": "json"
- }
- ]
- },
- "permission": [
- {
- "name": "Must be logged in, and the account id must be linked to the hacker."
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/resume/:id"
- }
- ]
- },
- {
- "type": "post",
- "url": "/hacker/email/dayOf/:id",
- "title": "",
- "description": "Sends a hacker the day-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.
",
- "name": "postHackerSendDayOfEmail",
- "group": "Hacker",
- "version": "0.0.9",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "string",
- "optional": true,
- "field": "status",
- "description": "The hacker ID
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Hacker day-of email sent.\",\n \"data\": {}\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "Administrator"
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/email/dayOf/:id"
- }
- ]
- },
- {
- "type": "post",
- "url": "/hacker/email/weekOf/:id",
- "title": "",
- "description": "Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.
",
- "name": "postHackerSendWeekOfEmail",
- "group": "Hacker",
- "version": "0.0.9",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "string",
- "optional": true,
- "field": "status",
- "description": "The hacker ID
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "Administrator"
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id"
- }
- ]
- },
- {
- "type": "post",
- "url": "/hacker/email/weekOf/:id",
- "title": "",
- "description": "Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.
",
- "name": "postHackerSendWeekOfEmail",
- "group": "Hacker",
- "version": "0.0.9",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "string",
- "optional": true,
- "field": "status",
- "description": "The hacker ID
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Hacker week-of email sent.\", \n \"data\": {}\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "Administrator"
- }
- ],
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id"
- }
- ]
- },
- {
- "type": "get",
- "url": "/sponsor/self",
- "title": "get information about logged in sponsor",
- "name": "self",
- "group": "Hacker",
- "version": "1.4.1",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Sponsor object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Sponsor not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": ": Sponsor"
- }
- ],
- "filename": "routes/api/sponsor.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/sponsor/self"
- }
- ]
- },
- {
- "type": "get",
- "url": "/hacker/self",
- "title": "get information about own hacker",
- "name": "self",
- "group": "Hacker",
- "version": "0.0.8",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Hacker object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Hacker found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":[\"Accounting\"],\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n } \n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Hacker not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/hacker.js",
- "groupTitle": "Hacker",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/hacker/self"
- }
- ]
- },
- {
- "type": "get",
- "url": "/",
- "title": "version",
- "version": "0.0.8",
- "name": "index",
- "group": "Index",
- "permission": [
- {
- "name": "public"
- }
- ],
- "filename": "routes/index.js",
- "groupTitle": "Index",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/"
- }
- ]
- },
- {
- "type": "post",
- "url": "/api/role/",
- "title": "create a new role",
- "name": "createRole",
- "group": "Role",
- "version": "1.1.1",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "name",
- "description": "Name of the route
"
- },
- {
- "group": "body",
- "type": "Route[]",
- "optional": false,
- "field": "routes",
- "description": "The routes that this role gives access to
"
- }
- ]
- },
- "examples": [
- {
- "title": "application: ",
- "content": "{\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n}",
- "type": "Json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Role object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Role creation successful\", \n \"data\": {\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n }\n}",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Error while creating role\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/role.js",
- "groupTitle": "Role",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/api/role/"
- }
- ]
- },
- {
- "type": "get",
- "url": "/search/",
- "title": "provide a specific query for any defined model",
- "name": "search",
- "group": "Search",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "query": [
- {
- "group": "query",
- "type": "String",
- "optional": false,
- "field": "model",
- "description": "the model to be searched
"
- },
- {
- "group": "query",
- "type": "Array",
- "optional": false,
- "field": "q",
- "description": "the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/
"
- },
- {
- "group": "query",
- "type": "String",
- "optional": false,
- "field": "sort",
- "description": "either "asc" or "desc"
"
- },
- {
- "group": "query",
- "type": "number",
- "optional": false,
- "field": "page",
- "description": "the page number that you would like
"
- },
- {
- "group": "query",
- "type": "number",
- "optional": false,
- "field": "limit",
- "description": "the maximum number of results that you would like returned
"
- },
- {
- "group": "query",
- "type": "any",
- "optional": false,
- "field": "sort_by",
- "description": "any parameter you want to sort the results by
"
- },
- {
- "group": "query",
- "type": "boolean",
- "optional": false,
- "field": "expand",
- "description": "whether you want to expand sub documents within the results
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Results
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Successfully executed query, returning all results\",\n \"data\": [\n {...}\n ]\n }",
- "type": "object"
- },
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"No results found.\",\n \"data\": {}\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response:",
- "content": "{\"message\": \"Validation failed\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/search.js",
- "groupTitle": "Search",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/search/"
- }
- ]
- },
- {
- "type": "get",
- "url": "/settings/",
- "title": "Get the settings for the current hackathon",
- "name": "getSettings",
- "group": "Settings",
- "version": "1.1.1",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Settings Object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Settings creation successful.\", \n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\"\n }\n }\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "public"
- }
- ],
- "filename": "routes/api/settings.js",
- "groupTitle": "Settings",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/settings/"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/settings/",
- "title": "Patch the settings for the current hackathon",
- "name": "patchSettings",
- "group": "Settings",
- "version": "1.1.1",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "Date",
- "optional": true,
- "field": "openTime",
- "description": "The opening time for the hackathon.
"
- },
- {
- "group": "body",
- "type": "Date",
- "optional": true,
- "field": "closeTime",
- "description": "The closing time for the hackathon.
"
- },
- {
- "group": "body",
- "type": "Date",
- "optional": true,
- "field": "confirmTime",
- "description": "The deadline for confirmation for the hackathon.
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Settings Object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Settings patch successful.\", \n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\"\n }\n }\n}",
- "type": "object"
- }
- ]
- },
- "permission": [
- {
- "name": "Administrators"
- }
- ],
- "filename": "routes/api/settings.js",
- "groupTitle": "Settings",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/settings/"
- }
- ]
- },
- {
- "type": "post",
- "url": "/sponsor/",
- "title": "create a new sponsor",
- "name": "createSponsor",
- "group": "Sponsor",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "MongoID",
- "optional": false,
- "field": "accountId",
- "description": "ObjectID of the respective account.
"
- },
- {
- "group": "body",
- "type": "Number",
- "optional": false,
- "field": "tier",
- "description": "Tier of the sponsor, from 0 to 5. 0 is lowest tier, and 5 is the custom tier.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "company",
- "description": "Name of the company.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "contractURL",
- "description": "URL link to the contract with the company.
"
- },
- {
- "group": "body",
- "type": "MongoID[]",
- "optional": false,
- "field": "nominees",
- "description": "Array of accounts that the company wish to nominate as hackers.
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Sponsor object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Sponsor creation successful\", \n \"data\": {...}\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Error while creating sponsor\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/sponsor.js",
- "groupTitle": "Sponsor",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/sponsor/"
- }
- ]
- },
- {
- "type": "get",
- "url": "/sponsor/:id",
- "title": "get a sponsor's information",
- "name": "getSponsor",
- "group": "Sponsor",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "string",
- "optional": false,
- "field": "id",
- "description": "a sponsor's unique mongoID
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Sponsor object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Sponsor not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/sponsor.js",
- "groupTitle": "Sponsor",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/sponsor/:id"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/sponsor/",
- "title": "update a sponsor",
- "name": "patchSponsor",
- "group": "Sponsor",
- "version": "1.3.0",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "ObjectId",
- "optional": false,
- "field": "id",
- "description": "ObjectID of the sponsor
"
- }
- ],
- "body": [
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "company",
- "description": "Name of the company.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "contractURL",
- "description": "URL link to the contract with the company.
"
- },
- {
- "group": "body",
- "type": "ObjectId[]",
- "optional": false,
- "field": "nominees",
- "description": "Array of accounts that the company wish to nominate as hackers.
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Sponsor object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Sponsor update successful\", \n \"data\": {...}\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Error while updating sponsor\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/sponsor.js",
- "groupTitle": "Sponsor",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/sponsor/"
- }
- ]
- },
- {
- "type": "post",
- "url": "/team/",
- "title": "create a new team consisting of only the logged in user",
- "name": "createTeam",
- "group": "Team",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "String",
- "optional": false,
- "field": "name",
- "description": "Name of the team.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "devpostURL",
- "description": "Devpost link to hack. Once the link is sent, the hack will be considered to be submitted.
"
- },
- {
- "group": "body",
- "type": "String",
- "optional": true,
- "field": "projectName",
- "description": "Name of the team.
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Team object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Team creation successful\", \n \"data\": {...}\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Error while creating team\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/team.js",
- "groupTitle": "Team",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/team/"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/team/leave/",
- "title": "Allows a logged in hacker to leave current team",
- "name": "deleteSelfFromTeam",
- "group": "Team",
- "version": "1.1.1",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "{}
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Removal from team successful.\",\n \"data\": {}\n}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/team.js",
- "groupTitle": "Team",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/team/leave/"
- }
- ]
- },
- {
- "type": "get",
- "url": "/team/:id",
- "title": "get a team's information",
- "name": "getTeam",
- "group": "Team",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "ObjectId",
- "optional": false,
- "field": "id",
- "description": "MongoId of the team
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Team object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Team retrieval successful\", \n \"data\": { \n \"team\": {\n \"name\":\"foo\",\n \"members\": [\n ObjectId('...')\n ],\n \"devpostURL\": \"www.devpost.com/foo\",\n \"projectName\": \"fooey\"\n },\n \"members\": [\n {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\"\n }\n ],\n }\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Team not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/team.js",
- "groupTitle": "Team",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/team/:id"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/team/join/",
- "title": "Allows a logged in hacker to join a team by name",
- "name": "patchJoinTeam",
- "group": "Team",
- "version": "1.1.1",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "string",
- "optional": true,
- "field": "name",
- "description": "Name of the team to join
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "{}
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "{\n \"message\": \"Team join successful.\",\n \"data\": {}\n}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/team.js",
- "groupTitle": "Team",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/team/join/"
- }
- ]
- },
- {
- "type": "patch",
- "url": "/team/:hackerId",
- "title": "Update a team's information. The team is specified by the hacker belonging to it.",
- "name": "patchTeam",
- "group": "Team",
- "version": "0.0.8",
- "description": "We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId
",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "ObjectId",
- "optional": false,
- "field": "hackerId",
- "description": "a hacker's unique Id
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Team object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Team update successful.\", \n \"data\": {...}\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Query input that caused the error.
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Team not found\", \"data\": {teamId}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/team.js",
- "groupTitle": "Team",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/team/:hackerId"
- }
- ]
- },
- {
- "type": "post",
- "url": "/volunteer/",
- "title": "create a new volunteer",
- "name": "createVolunteer",
- "group": "Volunteer",
- "version": "0.0.8",
- "parameter": {
- "fields": {
- "body": [
- {
- "group": "body",
- "type": "MongoID",
- "optional": false,
- "field": "accountId",
- "description": "MongoID of the account of the volunteer
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "Volunteer object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Volunteer creation successful\", \n \"data\": {...}\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "string",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Error while creating volunteer\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/volunteer.js",
- "groupTitle": "Volunteer",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/volunteer/"
- }
- ]
- },
- {
- "type": "get",
- "url": "/volunteer/:id",
- "title": "get a volunteer's information",
- "name": "getVolunteer",
- "group": "Volunteer",
- "version": "1.3.0",
- "parameter": {
- "fields": {
- "param": [
- {
- "group": "param",
- "type": "ObjectId",
- "optional": false,
- "field": "id",
- "description": "a volunteer's unique mongoID
"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Success message
"
- },
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "Volunteer object
"
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response: ",
- "content": "{\n \"message\": \"Successfully retrieved volunteer information\", \n \"data\": {...}\n }",
- "type": "object"
- }
- ]
- },
- "error": {
- "fields": {
- "Error 4xx": [
- {
- "group": "Error 4xx",
- "type": "String",
- "optional": false,
- "field": "message",
- "description": "Error message
"
- },
- {
- "group": "Error 4xx",
- "type": "Object",
- "optional": false,
- "field": "data",
- "description": "empty
"
- }
- ]
- },
- "examples": [
- {
- "title": "Error-Response: ",
- "content": "{\"message\": \"Volunteer not found\", \"data\": {}}",
- "type": "object"
- }
- ]
- },
- "filename": "routes/api/volunteer.js",
- "groupTitle": "Volunteer",
- "sampleRequest": [
- {
- "url": "https://api.mchacks.ca/api/volunteer/:id"
- }
- ]
- }
-]
+[
{
"type": "post",
"url": "/account/",
"title": "create a new account",
"name": "create",
"group": "Account",
"version": "0.0.8",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "String",
"optional": false,
"field": "firstName",
"description": "First name of the account creator.
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "lastName",
"description": "Last name of the account creator.
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "pronoun",
"description": "the pronoun of the account creator.
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "email",
"description": "Email of the account.
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "gender",
"description": "Gender of the account creator.
"
},
{
"group": "body",
"type": "String[]",
"optional": false,
"field": "dietaryRestrictions",
"description": "Any dietary restrictions for the user. 'None' if there are no restrictions
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "password",
"description": "The password of the account.
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "birthDate",
"description": "a Date parsable string.
"
},
{
"group": "body",
"type": "Number",
"optional": false,
"field": "phoneNumber",
"description": "the user's phone number, represented as a string.
"
}
],
"header": [
{
"group": "header",
"type": "JWT",
"optional": true,
"field": "token",
"description": "the user's invite token.
"
}
]
},
"examples": [
{
"title": "Request-Example:",
"content": "{ \n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"password\":\"hunter2\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":\"10/30/1997\"\n}",
"type": "json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Account object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Account creation successful\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\n \"message\": \"Account already exists\", \n \"data\": {\n \"route\": \"/\"\n }\n}",
"type": "object"
}
]
},
"filename": "routes/api/account.js",
"groupTitle": "Account",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/account/"
}
]
},
{
"type": "get",
"url": "/account/:id",
"title": "gets information from an account with mongoid ':id'",
"name": "getAccount",
"group": "Account",
"version": "0.0.8",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "ObjectId",
"optional": false,
"field": "id",
"description": "MongoId of an account
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Account object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Account found by user id\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Account not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/account.js",
"groupTitle": "Account",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/account/:id"
}
]
},
{
"type": "get",
"url": "/account/invite",
"title": "Get all of the invites.",
"name": "getAllInvites",
"group": "Account",
"version": "0.0.8",
"description": "Get all of the invites that currently exist in the database.
",
"success": {
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Invite retrieval successful.\", \n \"data\": [{\n \"email\":\"abc@def.com\",\n \"accountType\":\"Hacker\"\n }]\n }",
"type": "object"
}
]
},
"filename": "routes/api/account.js",
"groupTitle": "Account",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/account/invite"
}
]
},
{
"type": "post",
"url": "/account/invite",
"title": "invites a user to create an account with the specified accountType",
"name": "inviteAccount",
"group": "Account",
"version": "0.0.8",
"description": "sends link with token to be used with the account/create route
",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "String",
"optional": true,
"field": "email",
"description": "email of the account to be created and where to send the link
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "accountType",
"description": "the type of the account which the user can create, for sponsor this should specify tier as well
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Account object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully invited user\", \n \"data\": {}\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "Error object
"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "{\n \"message\": \"Invalid Authentication\",\n \"data\": {\n \"route\": \"/invite\"\n }\n }",
"type": "object"
}
]
},
"filename": "routes/api/account.js",
"groupTitle": "Account",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/account/invite"
}
]
},
{
"type": "get",
"url": "/account/self",
"title": "get information about own account",
"name": "self",
"group": "Account",
"version": "0.0.8",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Account object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Account found by user email\", \n \"data\": {\n \t\"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty object
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Account not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/account.js",
"groupTitle": "Account",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/account/self"
}
]
},
{
"type": "patch",
"url": "/account/:id",
"title": "update an account's information",
"name": "updateOneUser",
"group": "Account",
"version": "0.0.8",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "String",
"optional": true,
"field": "firstName",
"description": "First name of the account creator.
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "lastName",
"description": "Last name of the account creator.
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "pronoun",
"description": "The pronoun of the account creator.
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "email",
"description": "Email of the account.
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "gender",
"description": "Gender of the account creator.
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "birthDate",
"description": "A Date parsable string.
"
},
{
"group": "body",
"type": "Number",
"optional": true,
"field": "phoneNumber",
"description": "The user's phone number, represented as a string.
"
},
{
"group": "body",
"type": "String[]",
"optional": true,
"field": "dietaryRestrictions",
"description": "Any dietary restrictions for the user. 'None' if there are no restrictions
"
}
]
},
"examples": [
{
"title": "Request-Example:",
"content": "{ \"gender\": \"Male\" }",
"type": "json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Account object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Account update successful.\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\": \"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while updating account\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/account.js",
"groupTitle": "Account",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/account/:id"
}
]
},
{
"type": "patch",
"url": "/auth/password/change",
"title": "change password for logged in user",
"name": "changePassword",
"group": "Authentication",
"version": "0.0.8",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "oldPassword",
"description": "The current password of the user
"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "newPassword",
"description": "The new password of the user
"
}
]
},
"examples": [
{
"title": "Request-Example:",
"content": "{\n \"oldPassword\": \"password12345\",\n \"newPassword\": \"password123456\"\n}",
"type": "json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\"message\": \"Successfully reset password\", \"data\": {}}",
"type": "json"
}
]
},
"permission": [
{
"name": ": Must be logged in"
}
],
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/password/change"
}
]
},
{
"type": "post",
"url": "/auth/confirm/:token",
"title": "confirm account using the JWT in :token",
"name": "confirmAccount",
"group": "Authentication",
"version": "0.0.8",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "JWT",
"description": "for confirming the account
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\"message\": \"Successfully confirmed account\", \"data\": {}}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "{\"message\": \"Invalid token for confirming account, \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/confirm/:token"
}
]
},
{
"type": "post",
"url": "/auth/password/forgot",
"title": "forgot password route",
"name": "forgotPassword",
"group": "Authentication",
"version": "0.0.8",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "email",
"description": "the email address of the account
"
}
]
},
"examples": [
{
"title": "Request-Example:",
"content": "{ \"email\": \"myemail@mchacks.ca\" }",
"type": "json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\"message\": \"Sent reset email\", \"data\": {}}",
"type": "json"
}
]
},
"permission": [
{
"name": ": public"
}
],
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/password/forgot"
}
]
},
{
"type": "get",
"url": "/auth/rolebindings/:id",
"title": "retrieve rolebindings for a user given by their user id :id",
"name": "getRoleBindings",
"group": "Authentication",
"version": "0.0.8",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "ObjectId",
"optional": false,
"field": "id",
"description": "MongoId of an account
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Rolebindings object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Role Bindings not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/rolebindings/:id"
}
]
},
{
"type": "get",
"url": "/auth/roles",
"title": "get roles",
"name": "getRoles",
"description": "get all roles that exist in the database
",
"group": "Authentication",
"version": "0.0.8",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\"message\": \"Sucessfully retrieved all roles\", \"data\":\n[{name: \"GodStaff\", routes: Array(27), id: \"5bee20ef3ca9dd4754382880\"},\n {name: \"Hacker\", routes: Array(10), id: \"5bee20ef3ca9dd4754382881\"},\n {name: \"Volunteer\", routes: Array(4), id: \"5bee20ef3ca9dd4754382882\"}]",
"type": "json"
}
]
},
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/roles"
}
]
},
{
"type": "post",
"url": "/auth/login",
"title": "login to the service",
"name": "login",
"group": "Authentication",
"version": "0.0.8",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "email",
"description": "Account email
"
},
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "password",
"description": "Account password
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\"message\": \"Successfully logged in\", \"data\": {}}",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Invalid Authentication\", \"data\": {}}",
"type": "object"
}
]
},
"permission": [
{
"name": ": public"
}
],
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/login"
}
]
},
{
"type": "get",
"url": "/auth/logout",
"title": "logout of service",
"name": "logout",
"group": "Authentication",
"version": "0.0.8",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\"message\": \"Successfully logged out\", \"data\": {}}",
"type": "object"
}
]
},
"permission": [
{
"name": ": public"
}
],
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/logout"
}
]
},
{
"type": "get",
"url": "/auth/confirm/resend",
"title": "resend confirmation token",
"name": "resendConfirmAccount",
"group": "Authentication",
"version": "0.0.8",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\"message\": \"Successfully resent confirmation email\", \"data\": {}}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": " HTTP/1.1 422\n{\"message\": \"Account already confirmed\", \"data\": {}}",
"type": "json"
},
{
"title": "Error-Response:",
"content": " HTTP/1.1 428\n{\"message\": \"Account confirmation token does not exist\", \"data\": {}}",
"type": "json"
}
]
},
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/confirm/resend"
}
]
},
{
"type": "post",
"url": "/auth/password/reset",
"title": "reset password",
"name": "resetPassword",
"group": "Authentication",
"version": "0.0.8",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "the password of the account
"
}
]
},
"examples": [
{
"title": "Request-Example:",
"content": "{ \"password\": \"hunter2\" }",
"type": "json"
}
]
},
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "Authentication",
"description": "the token that was provided in the reset password email
"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Reset-Token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n}",
"type": "json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\"message\": \"Successfully reset password\", \"data\": {}}",
"type": "json"
}
]
},
"permission": [
{
"name": ": must have authentication token"
}
],
"filename": "routes/api/auth.js",
"groupTitle": "Authentication",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/auth/password/reset"
}
]
},
{
"type": "patch",
"url": "/hacker/batchAccept/",
"title": "accept array of Hackers",
"name": "acceptHacker",
"group": "Hacker",
"version": "3.0.0",
"parameter": {
"fields": {
"body) {{ids: ObjectId[]}} Array of id(s": [
{
"group": "body) {{ids: ObjectId[]}} Array of id(s",
"optional": false,
"field": "that",
"description": "needed to be accepted
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "success_ids array and errors array. Errors array will contain a detailed error for why the batch update for a given ID did not work
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Hacker batch update successful.\",\n \"data\": {\n \"success_ids\": [\"id1\", \"id2\"]\n \"errors\": [{status: 404, message: \"ACCOUNT_NOT_FOUND\", account: null, hacker_id: \"id3\"}]\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/batchAccept/"
}
]
},
{
"type": "patch",
"url": "/hacker/acceptEmail/:email",
"title": "accept a Hacker by email",
"name": "acceptHacker",
"group": "Hacker",
"version": "2.0.0",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/acceptEmail/:email"
}
]
},
{
"type": "patch",
"url": "/hacker/accept/:id",
"title": "accept a Hacker",
"name": "acceptHacker",
"group": "Hacker",
"version": "2.0.0",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/accept/:id"
}
]
},
{
"type": "patch",
"url": "/hacker/checkin/:id",
"title": "update a hacker's status to be 'Checked-in'. Note that the Hacker must eitehr be Accepted or Confirmed.",
"name": "checkinHacker",
"group": "Hacker",
"version": "0.0.9",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "string",
"optional": true,
"field": "status",
"description": "Check-in status. "Checked-in"
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Checked-in\"\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
},
{
"name": "Volunteer"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/checkin/:id"
}
]
},
{
"type": "post",
"url": "/hacker/",
"title": "create a new hacker",
"name": "createHacker",
"group": "Hacker",
"version": "0.0.8",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "MongoID",
"optional": false,
"field": "accountId",
"description": "ObjectID of the respective account
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "school",
"description": "Name of the school the hacker goes to
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "gender",
"description": "Gender of the hacker
"
},
{
"group": "body",
"type": "Number",
"optional": false,
"field": "travel",
"description": "Whether the hacker requires a bus for transportation
"
},
{
"group": "body",
"type": "String[]",
"optional": false,
"field": "ethnicity",
"description": "the ethnicities of the hacker
"
},
{
"group": "body",
"type": "String[]",
"optional": false,
"field": "major",
"description": "the major of the hacker
"
},
{
"group": "body",
"type": "Number",
"optional": false,
"field": "graduationYear",
"description": "the graduation year of the hacker
"
},
{
"group": "body",
"type": "Boolean",
"optional": false,
"field": "codeOfConduct",
"description": "acceptance of the code of conduct
"
},
{
"group": "body",
"type": "Json",
"optional": false,
"field": "application",
"description": "The hacker's application. Resume and jobInterest fields are required.
"
}
]
},
"examples": [
{
"title": "application: ",
"content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n}",
"type": "Json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Hacker creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n}",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while creating hacker\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/"
}
]
},
{
"type": "get",
"url": "/hacker/:id",
"title": "get a hacker's information",
"name": "getHacker",
"group": "Hacker",
"version": "0.0.8",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "String",
"optional": false,
"field": "id",
"description": "a hacker's unique mongoID
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Hacker not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/:id"
}
]
},
{
"type": "get",
"url": "/hacker/email/:email",
"title": "get a hacker's information",
"name": "getHacker",
"group": "Hacker",
"version": "0.0.8",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "String",
"optional": false,
"field": "email",
"description": "a hacker's unique email
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Hacker not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/email/:email"
}
]
},
{
"type": "get",
"url": "/hacker/resume:id",
"title": "get the resume for a hacker.",
"name": "getHackerResume",
"group": "Hacker",
"version": "0.0.8",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "ObjectId",
"optional": false,
"field": "id",
"description": "Hacker id
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n message: \"Downloaded resume\",\n data: {\n id: \"507f191e810c19729de860ea\",\n resume: [Buffer]\n }\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": ""Resume does not exist"
"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 404\n{\n message: \"Resume not found\",\n data: {}\n}",
"type": "json"
}
]
},
"permission": [
{
"name": "Must be logged in, and the account id must be linked to the hacker."
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker"
},
{
"type": "get",
"url": "/hacker/stats",
"title": "Gets the stats of all of the hackers who have applied.",
"name": "getHackerStats",
"group": "Hacker",
"version": "0.0.9",
"parameter": {
"fields": {
"query": [
{
"group": "query",
"type": "String",
"optional": false,
"field": "model",
"description": "the model to be searched (Only hacker supported)
"
},
{
"group": "query",
"type": "Array",
"optional": false,
"field": "q",
"description": "the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Retrieved stats\",\n \"data\": {\n \"stats\" : {\n \"total\": 10,\n \"status\": { \"Applied\": 10 },\n \"school\": { \"McGill University\": 3, \"Harvard University\": 7 },\n degree: { \"Undergraduate\": 10 },\n gender: { \"Male\": 1, \"Female\": 9 },\n travel: { \"true\": 7, \"false\": 3 },\n ethnicity: { \"White\": 10, },\n jobInterest: { \"Internship\": 10 },\n major: { \"Computer Science\": 10 },\n graduationYear: { \"2019\": 10 },\n dietaryRestrictions: { \"None\": 10 },\n shirtSize: { \"M\": 3, \"XL\": 7 },\n age: { \"22\": 10 }\n }\n }\n}",
"type": "object"
}
]
},
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/stats"
}
]
},
{
"type": "patch",
"url": "/hacker/:id",
"title": "update a hacker's information.",
"description": "This route only contains the ability to update a subset of a hacker's information. If you want to update a status, you must have Admin priviledges and use PATCH /hacker/status/:id.
",
"name": "patchHacker",
"group": "Hacker",
"version": "0.0.8",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "String",
"optional": true,
"field": "school",
"description": "Name of the school the hacker goes to
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "gender",
"description": "Gender of the hacker
"
},
{
"group": "body",
"type": "Number",
"optional": true,
"field": "travel",
"description": "How much the hacker requires a bus for transportation
"
},
{
"group": "body",
"type": "String[]",
"optional": true,
"field": "ethnicity",
"description": "the ethnicities of the hacker
"
},
{
"group": "body",
"type": "String[]",
"optional": true,
"field": "major",
"description": "the major of the hacker
"
},
{
"group": "body",
"type": "Number",
"optional": true,
"field": "graduationYear",
"description": "the graduation year of the hacker
"
},
{
"group": "body",
"type": "Json",
"optional": true,
"field": "application",
"description": "The hacker's application
"
}
]
},
"examples": [
{
"title": "application: ",
"content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }",
"type": "Json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Changed hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n}",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while updating hacker\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/:id"
}
]
},
{
"type": "patch",
"url": "/hacker/confirmation/:id",
"title": "Allows confirmation of hacker attendence if they are accepted. Also allows change from 'confirmed' to 'withdrawn'.",
"name": "patchHackerConfirmed",
"group": "Hacker",
"version": "0.0.9",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "string",
"optional": true,
"field": "status",
"description": "The new status of the hacker. "Accepted", "Confirmed", or "Withdrawn"
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Confirmed\"\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
},
{
"name": "Hacker"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/confirmation/:id"
}
]
},
{
"type": "patch",
"url": "/hacker/status/:id",
"title": "update a hacker's status",
"name": "patchHackerStatus",
"group": "Hacker",
"version": "0.0.9",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "string",
"optional": true,
"field": "status",
"description": "Status of the hacker's application ("None"|"Applied"|"Accepted"|"Declined"|"Waitlisted"|"Confirmed"|"Withdrawn"|"Checked-in")
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/status/:id"
}
]
},
{
"type": "post",
"url": "/hacker/resume/:id",
"title": "upload or update resume for a hacker.",
"name": "postHackerResume",
"group": "Hacker",
"version": "0.0.8",
"description": "NOTE: This must be sent via multipart/form-data POST request
",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "ObjectId",
"optional": false,
"field": "id",
"description": "Hacker id
"
}
],
"body": [
{
"group": "body",
"type": "File",
"optional": false,
"field": "resume",
"description": "The uploaded file.
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Location in the bucket that the file was stored.
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n message: \"Uploaded resume\",\n data: {\n filename: \"resumes/1535032624768-507f191e810c19729de860ea\"\n }\n}",
"type": "json"
}
]
},
"permission": [
{
"name": "Must be logged in, and the account id must be linked to the hacker."
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/resume/:id"
}
]
},
{
"type": "post",
"url": "/hacker/email/dayOf/:id",
"title": "",
"description": "Sends a hacker the day-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.
",
"name": "postHackerSendDayOfEmail",
"group": "Hacker",
"version": "0.0.9",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "string",
"optional": true,
"field": "status",
"description": "The hacker ID
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Hacker day-of email sent.\",\n \"data\": {}\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/email/dayOf/:id"
}
]
},
{
"type": "post",
"url": "/hacker/email/weekOf/:id",
"title": "",
"description": "Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.
",
"name": "postHackerSendWeekOfEmail",
"group": "Hacker",
"version": "0.0.9",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "string",
"optional": true,
"field": "status",
"description": "The hacker ID
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id"
}
]
},
{
"type": "post",
"url": "/hacker/email/weekOf/:id",
"title": "",
"description": "Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.
",
"name": "postHackerSendWeekOfEmail",
"group": "Hacker",
"version": "0.0.9",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "string",
"optional": true,
"field": "status",
"description": "The hacker ID
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id"
}
]
},
{
"type": "get",
"url": "/sponsor/self",
"title": "get information about logged in sponsor",
"name": "self",
"group": "Hacker",
"version": "1.4.1",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Sponsor object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Sponsor not found\", \"data\": {}}",
"type": "object"
}
]
},
"permission": [
{
"name": ": Sponsor"
}
],
"filename": "routes/api/sponsor.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/sponsor/self"
}
]
},
{
"type": "get",
"url": "/hacker/self",
"title": "get information about own hacker",
"name": "self",
"group": "Hacker",
"version": "0.0.8",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Hacker object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Hacker found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":[\"Accounting\"],\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n } \n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Hacker not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/hacker.js",
"groupTitle": "Hacker",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/hacker/self"
}
]
},
{
"type": "get",
"url": "/",
"title": "version",
"version": "0.0.8",
"name": "index",
"group": "Index",
"permission": [
{
"name": "public"
}
],
"filename": "routes/index.js",
"groupTitle": "Index",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/"
}
]
},
{
"type": "post",
"url": "/api/role/",
"title": "create a new role",
"name": "createRole",
"group": "Role",
"version": "1.1.1",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "String",
"optional": false,
"field": "name",
"description": "Name of the route
"
},
{
"group": "body",
"type": "Route[]",
"optional": false,
"field": "routes",
"description": "The routes that this role gives access to
"
}
]
},
"examples": [
{
"title": "application: ",
"content": "{\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n}",
"type": "Json"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Role object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Role creation successful\", \n \"data\": {\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n }\n}",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while creating role\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/role.js",
"groupTitle": "Role",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/api/role/"
}
]
},
{
"type": "get",
"url": "/search/",
"title": "provide a specific query for any defined model",
"name": "search",
"group": "Search",
"version": "0.0.8",
"parameter": {
"fields": {
"query": [
{
"group": "query",
"type": "String",
"optional": false,
"field": "model",
"description": "the model to be searched
"
},
{
"group": "query",
"type": "Array",
"optional": false,
"field": "q",
"description": "the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/
"
},
{
"group": "query",
"type": "String",
"optional": false,
"field": "sort",
"description": "either "asc" or "desc"
"
},
{
"group": "query",
"type": "number",
"optional": false,
"field": "page",
"description": "the page number that you would like
"
},
{
"group": "query",
"type": "number",
"optional": false,
"field": "limit",
"description": "the maximum number of results that you would like returned
"
},
{
"group": "query",
"type": "any",
"optional": false,
"field": "sort_by",
"description": "any parameter you want to sort the results by
"
},
{
"group": "query",
"type": "boolean",
"optional": false,
"field": "expand",
"description": "whether you want to expand sub documents within the results
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Results
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Successfully executed query, returning all results\",\n \"data\": [\n {...}\n ]\n }",
"type": "object"
},
{
"title": "Success-Response:",
"content": "{\n \"message\": \"No results found.\",\n \"data\": {}\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "{\"message\": \"Validation failed\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/search.js",
"groupTitle": "Search",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/search/"
}
]
},
{
"type": "get",
"url": "/settings/",
"title": "Get the settings for the current hackathon",
"name": "getSettings",
"group": "Settings",
"version": "1.1.1",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Settings Object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Settings creation successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\"\n }\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "public"
}
],
"filename": "routes/api/settings.js",
"groupTitle": "Settings",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/settings/"
}
]
},
{
"type": "patch",
"url": "/settings/",
"title": "Patch the settings for the current hackathon",
"name": "patchSettings",
"group": "Settings",
"version": "1.1.1",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "Date",
"optional": true,
"field": "openTime",
"description": "The opening time for the hackathon.
"
},
{
"group": "body",
"type": "Date",
"optional": true,
"field": "closeTime",
"description": "The closing time for the hackathon.
"
},
{
"group": "body",
"type": "Date",
"optional": true,
"field": "confirmTime",
"description": "The deadline for confirmation for the hackathon.
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Settings Object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Settings patch successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\"\n }\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrators"
}
],
"filename": "routes/api/settings.js",
"groupTitle": "Settings",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/settings/"
}
]
},
{
"type": "post",
"url": "/sponsor/",
"title": "create a new sponsor",
"name": "createSponsor",
"group": "Sponsor",
"version": "0.0.8",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "MongoID",
"optional": false,
"field": "accountId",
"description": "ObjectID of the respective account.
"
},
{
"group": "body",
"type": "Number",
"optional": false,
"field": "tier",
"description": "Tier of the sponsor, from 0 to 5. 0 is lowest tier, and 5 is the custom tier.
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "company",
"description": "Name of the company.
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "contractURL",
"description": "URL link to the contract with the company.
"
},
{
"group": "body",
"type": "MongoID[]",
"optional": false,
"field": "nominees",
"description": "Array of accounts that the company wish to nominate as hackers.
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Sponsor object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Sponsor creation successful\", \n \"data\": {...}\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while creating sponsor\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/sponsor.js",
"groupTitle": "Sponsor",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/sponsor/"
}
]
},
{
"type": "get",
"url": "/sponsor/:id",
"title": "get a sponsor's information",
"name": "getSponsor",
"group": "Sponsor",
"version": "0.0.8",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "string",
"optional": false,
"field": "id",
"description": "a sponsor's unique mongoID
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Sponsor object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Sponsor not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/sponsor.js",
"groupTitle": "Sponsor",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/sponsor/:id"
}
]
},
{
"type": "patch",
"url": "/sponsor/",
"title": "update a sponsor",
"name": "patchSponsor",
"group": "Sponsor",
"version": "1.3.0",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "ObjectId",
"optional": false,
"field": "id",
"description": "ObjectID of the sponsor
"
}
],
"body": [
{
"group": "body",
"type": "String",
"optional": false,
"field": "company",
"description": "Name of the company.
"
},
{
"group": "body",
"type": "String",
"optional": false,
"field": "contractURL",
"description": "URL link to the contract with the company.
"
},
{
"group": "body",
"type": "ObjectId[]",
"optional": false,
"field": "nominees",
"description": "Array of accounts that the company wish to nominate as hackers.
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Sponsor object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Sponsor update successful\", \n \"data\": {...}\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while updating sponsor\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/sponsor.js",
"groupTitle": "Sponsor",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/sponsor/"
}
]
},
{
"type": "post",
"url": "/team/",
"title": "create a new team consisting of only the logged in user",
"name": "createTeam",
"group": "Team",
"version": "0.0.8",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "String",
"optional": false,
"field": "name",
"description": "Name of the team.
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "devpostURL",
"description": "Devpost link to hack. Once the link is sent, the hack will be considered to be submitted.
"
},
{
"group": "body",
"type": "String",
"optional": true,
"field": "projectName",
"description": "Name of the team.
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Team object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Team creation successful\", \n \"data\": {...}\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while creating team\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/team.js",
"groupTitle": "Team",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/team/"
}
]
},
{
"type": "patch",
"url": "/team/leave/",
"title": "Allows a logged in hacker to leave current team",
"name": "deleteSelfFromTeam",
"group": "Team",
"version": "1.1.1",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "{}
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Removal from team successful.\",\n \"data\": {}\n}",
"type": "object"
}
]
},
"filename": "routes/api/team.js",
"groupTitle": "Team",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/team/leave/"
}
]
},
{
"type": "get",
"url": "/team/:id",
"title": "get a team's information",
"name": "getTeam",
"group": "Team",
"version": "0.0.8",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "ObjectId",
"optional": false,
"field": "id",
"description": "MongoId of the team
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Team object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Team retrieval successful\", \n \"data\": { \n \"team\": {\n \"name\":\"foo\",\n \"members\": [\n ObjectId('...')\n ],\n \"devpostURL\": \"www.devpost.com/foo\",\n \"projectName\": \"fooey\"\n },\n \"members\": [\n {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\"\n }\n ],\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Team not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/team.js",
"groupTitle": "Team",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/team/:id"
}
]
},
{
"type": "patch",
"url": "/team/join/",
"title": "Allows a logged in hacker to join a team by name",
"name": "patchJoinTeam",
"group": "Team",
"version": "1.1.1",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "string",
"optional": true,
"field": "name",
"description": "Name of the team to join
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "{}
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Team join successful.\",\n \"data\": {}\n}",
"type": "object"
}
]
},
"filename": "routes/api/team.js",
"groupTitle": "Team",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/team/join/"
}
]
},
{
"type": "patch",
"url": "/team/:hackerId",
"title": "Update a team's information. The team is specified by the hacker belonging to it.",
"name": "patchTeam",
"group": "Team",
"version": "0.0.8",
"description": "We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId
",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "ObjectId",
"optional": false,
"field": "hackerId",
"description": "a hacker's unique Id
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Team object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Team update successful.\", \n \"data\": {...}\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "Query input that caused the error.
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Team not found\", \"data\": {teamId}}",
"type": "object"
}
]
},
"filename": "routes/api/team.js",
"groupTitle": "Team",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/team/:hackerId"
}
]
},
{
"type": "post",
"url": "/travel/",
"title": "create a new travel",
"name": "createTravel",
"group": "Travel",
"version": "2.0.1",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "MongoID",
"optional": false,
"field": "accountId",
"description": "ObjectID of the respective account
"
},
{
"group": "body",
"type": "MongoID",
"optional": false,
"field": "hackerId",
"description": "ObjectID of the respective hacker
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Travel object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Travel creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"None\",\n \"request\": 50,\n \"offer\": 0\n }\n}",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while creating travel\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/travel.js",
"groupTitle": "Travel",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/travel/"
}
]
},
{
"type": "get",
"url": "/travel/email/:email",
"title": "get a travel's information",
"name": "getTravel",
"group": "Travel",
"version": "2.0.1",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "String",
"optional": false,
"field": "email",
"description": "a travel's unique email
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Travel object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Travel not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/travel.js",
"groupTitle": "Travel",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/travel/email/:email"
}
]
},
{
"type": "get",
"url": "/travel/:id",
"title": "get a traveler's information",
"name": "getTravel",
"group": "Travel",
"version": "2.0.1",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "String",
"optional": false,
"field": "id",
"description": "a travel's unique mongoID
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Travel object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Travel not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/travel.js",
"groupTitle": "Travel",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/travel/:id"
}
]
},
{
"type": "patch",
"url": "/travel/offer/:id",
"title": "update a traveler's offer",
"name": "patchTravelOffer",
"group": "Travel",
"version": "2.0.1",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "number",
"optional": true,
"field": "offer",
"description": "Amount of money offered for travel
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Travel object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"offer\": 75\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/travel.js",
"groupTitle": "Travel",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/travel/offer/:id"
}
]
},
{
"type": "patch",
"url": "/travel/status/:id",
"title": "update a traveler's status",
"name": "patchTravelStatus",
"group": "Travel",
"version": "2.0.1",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "string",
"optional": true,
"field": "status",
"description": "Status of the travel's reimbursement ("None"|"Bus"|"Offered"|"Valid"|"Invalid"|"Claimed")
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Travel object
"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}",
"type": "object"
}
]
},
"permission": [
{
"name": "Administrator"
}
],
"filename": "routes/api/travel.js",
"groupTitle": "Travel",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/travel/status/:id"
}
]
},
{
"type": "get",
"url": "/travel/self",
"title": "get information about own hacker's travel",
"name": "self",
"group": "Travel",
"version": "2.0.1",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Travel object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Travel found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Claimed\"\n \"request\": 90,\n \"offer\": 80\n } \n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Travel not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/travel.js",
"groupTitle": "Travel",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/travel/self"
}
]
},
{
"type": "post",
"url": "/volunteer/",
"title": "create a new volunteer",
"name": "createVolunteer",
"group": "Volunteer",
"version": "0.0.8",
"parameter": {
"fields": {
"body": [
{
"group": "body",
"type": "MongoID",
"optional": false,
"field": "accountId",
"description": "MongoID of the account of the volunteer
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "object",
"optional": false,
"field": "data",
"description": "Volunteer object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Volunteer creation successful\", \n \"data\": {...}\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "string",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Error while creating volunteer\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/volunteer.js",
"groupTitle": "Volunteer",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/volunteer/"
}
]
},
{
"type": "get",
"url": "/volunteer/:id",
"title": "get a volunteer's information",
"name": "getVolunteer",
"group": "Volunteer",
"version": "1.3.0",
"parameter": {
"fields": {
"param": [
{
"group": "param",
"type": "ObjectId",
"optional": false,
"field": "id",
"description": "a volunteer's unique mongoID
"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "Success message
"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "Volunteer object
"
}
]
},
"examples": [
{
"title": "Success-Response: ",
"content": "{\n \"message\": \"Successfully retrieved volunteer information\", \n \"data\": {...}\n }",
"type": "object"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "message",
"description": "Error message
"
},
{
"group": "Error 4xx",
"type": "Object",
"optional": false,
"field": "data",
"description": "empty
"
}
]
},
"examples": [
{
"title": "Error-Response: ",
"content": "{\"message\": \"Volunteer not found\", \"data\": {}}",
"type": "object"
}
]
},
"filename": "routes/api/volunteer.js",
"groupTitle": "Volunteer",
"sampleRequest": [
{
"url": "https://api.mchacks.ca/api/volunteer/:id"
}
]
}
]
diff --git a/docs/api/api_project.js b/docs/api/api_project.js
index 36fe0e2c..811161fb 100644
--- a/docs/api/api_project.js
+++ b/docs/api/api_project.js
@@ -1,16 +1 @@
-define({
- name: "hackerAPI",
- version: "0.0.8",
- description: "Documentation for the API used for mchacks",
- defaultVersion: "0.0.8",
- title: "hackerAPI documentation",
- url: "https://api.mchacks.ca/api",
- sampleUrl: "https://api.mchacks.ca/api",
- apidoc: "0.3.0",
- generator: {
- name: "apidoc",
- time: "2019-05-06T17:36:31.903Z",
- url: "http://apidocjs.com",
- version: "0.17.7"
- }
-});
+define({
"name": "hackerAPI",
"version": "0.0.8",
"description": "Documentation for the API used for mchacks",
"defaultVersion": "0.0.8",
"title": "hackerAPI documentation",
"url": "https://api.mchacks.ca/api",
"sampleUrl": "https://api.mchacks.ca/api",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2020-07-31T04:35:04.323Z",
"url": "http://apidocjs.com",
"version": "0.17.7"
}
});
diff --git a/docs/api/api_project.json b/docs/api/api_project.json
index 64bcaa10..c23048a0 100644
--- a/docs/api/api_project.json
+++ b/docs/api/api_project.json
@@ -1,16 +1 @@
-{
- "name": "hackerAPI",
- "version": "0.0.8",
- "description": "Documentation for the API used for mchacks",
- "defaultVersion": "0.0.8",
- "title": "hackerAPI documentation",
- "url": "https://api.mchacks.ca/api",
- "sampleUrl": "https://api.mchacks.ca/api",
- "apidoc": "0.3.0",
- "generator": {
- "name": "apidoc",
- "time": "2019-12-08T15:51:57.438Z",
- "url": "http://apidocjs.com",
- "version": "0.17.7"
- }
-}
+{
"name": "hackerAPI",
"version": "0.0.8",
"description": "Documentation for the API used for mchacks",
"defaultVersion": "0.0.8",
"title": "hackerAPI documentation",
"url": "https://api.mchacks.ca/api",
"sampleUrl": "https://api.mchacks.ca/api",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2020-07-31T04:35:04.323Z",
"url": "http://apidocjs.com",
"version": "0.17.7"
}
}
diff --git a/docs/api/locales/ca.js b/docs/api/locales/ca.js
index c63484e5..65af5df2 100644
--- a/docs/api/locales/ca.js
+++ b/docs/api/locales/ca.js
@@ -1,25 +1,25 @@
define({
ca: {
- "Allowed values:": "Valors permesos:",
- "Compare all with predecessor": "Comparar tot amb versió anterior",
- "compare changes to:": "comparar canvis amb:",
- "compared to": "comparat amb",
- "Default value:": "Valor per defecte:",
- Description: "Descripció",
- Field: "Camp",
- General: "General",
- "Generated with": "Generat amb",
- Name: "Nom",
- "No response values.": "Sense valors en la resposta.",
- optional: "opcional",
- Parameter: "Paràmetre",
- "Permission:": "Permisos:",
- Response: "Resposta",
- Send: "Enviar",
- "Send a Sample Request": "Enviar una petició d'exemple",
- "show up to version:": "mostrar versió:",
- "Size range:": "Tamany de rang:",
- Type: "Tipus",
- url: "url"
+ 'Allowed values:' : 'Valors permesos:',
+ 'Compare all with predecessor': 'Comparar tot amb versió anterior',
+ 'compare changes to:' : 'comparar canvis amb:',
+ 'compared to' : 'comparat amb',
+ 'Default value:' : 'Valor per defecte:',
+ 'Description' : 'Descripció',
+ 'Field' : 'Camp',
+ 'General' : 'General',
+ 'Generated with' : 'Generat amb',
+ 'Name' : 'Nom',
+ 'No response values.' : 'Sense valors en la resposta.',
+ 'optional' : 'opcional',
+ 'Parameter' : 'Paràmetre',
+ 'Permission:' : 'Permisos:',
+ 'Response' : 'Resposta',
+ 'Send' : 'Enviar',
+ 'Send a Sample Request' : 'Enviar una petició d\'exemple',
+ 'show up to version:' : 'mostrar versió:',
+ 'Size range:' : 'Tamany de rang:',
+ 'Type' : 'Tipus',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/cs.js b/docs/api/locales/cs.js
index 368c69e7..b7796d8f 100644
--- a/docs/api/locales/cs.js
+++ b/docs/api/locales/cs.js
@@ -1,25 +1,25 @@
define({
cs: {
- "Allowed values:": "Povolené hodnoty:",
- "Compare all with predecessor": "Porovnat vše s předchozími verzemi",
- "compare changes to:": "porovnat změny s:",
- "compared to": "porovnat s",
- "Default value:": "Výchozí hodnota:",
- Description: "Popis",
- Field: "Pole",
- General: "Obecné",
- "Generated with": "Vygenerováno pomocí",
- Name: "Název",
- "No response values.": "Nebyly vráceny žádné hodnoty.",
- optional: "volitelné",
- Parameter: "Parametr",
- "Permission:": "Oprávnění:",
- Response: "Odpověď",
- Send: "Odeslat",
- "Send a Sample Request": "Odeslat ukázkový požadavek",
- "show up to version:": "zobrazit po verzi:",
- "Size range:": "Rozsah velikosti:",
- Type: "Typ",
- url: "url"
+ 'Allowed values:' : 'Povolené hodnoty:',
+ 'Compare all with predecessor': 'Porovnat vše s předchozími verzemi',
+ 'compare changes to:' : 'porovnat změny s:',
+ 'compared to' : 'porovnat s',
+ 'Default value:' : 'Výchozí hodnota:',
+ 'Description' : 'Popis',
+ 'Field' : 'Pole',
+ 'General' : 'Obecné',
+ 'Generated with' : 'Vygenerováno pomocí',
+ 'Name' : 'Název',
+ 'No response values.' : 'Nebyly vráceny žádné hodnoty.',
+ 'optional' : 'volitelné',
+ 'Parameter' : 'Parametr',
+ 'Permission:' : 'Oprávnění:',
+ 'Response' : 'Odpověď',
+ 'Send' : 'Odeslat',
+ 'Send a Sample Request' : 'Odeslat ukázkový požadavek',
+ 'show up to version:' : 'zobrazit po verzi:',
+ 'Size range:' : 'Rozsah velikosti:',
+ 'Type' : 'Typ',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/de.js b/docs/api/locales/de.js
index f238d855..f66420d0 100644
--- a/docs/api/locales/de.js
+++ b/docs/api/locales/de.js
@@ -1,25 +1,25 @@
define({
de: {
- "Allowed values:": "Erlaubte Werte:",
- "Compare all with predecessor": "Vergleiche alle mit ihren Vorgängern",
- "compare changes to:": "vergleiche Änderungen mit:",
- "compared to": "verglichen mit",
- "Default value:": "Standardwert:",
- Description: "Beschreibung",
- Field: "Feld",
- General: "Allgemein",
- "Generated with": "Erstellt mit",
- Name: "Name",
- "No response values.": "Keine Rückgabewerte.",
- optional: "optional",
- Parameter: "Parameter",
- "Permission:": "Berechtigung:",
- Response: "Antwort",
- Send: "Senden",
- "Send a Sample Request": "Eine Beispielanfrage senden",
- "show up to version:": "zeige bis zur Version:",
- "Size range:": "Größenbereich:",
- Type: "Typ",
- url: "url"
+ 'Allowed values:' : 'Erlaubte Werte:',
+ 'Compare all with predecessor': 'Vergleiche alle mit ihren Vorgängern',
+ 'compare changes to:' : 'vergleiche Änderungen mit:',
+ 'compared to' : 'verglichen mit',
+ 'Default value:' : 'Standardwert:',
+ 'Description' : 'Beschreibung',
+ 'Field' : 'Feld',
+ 'General' : 'Allgemein',
+ 'Generated with' : 'Erstellt mit',
+ 'Name' : 'Name',
+ 'No response values.' : 'Keine Rückgabewerte.',
+ 'optional' : 'optional',
+ 'Parameter' : 'Parameter',
+ 'Permission:' : 'Berechtigung:',
+ 'Response' : 'Antwort',
+ 'Send' : 'Senden',
+ 'Send a Sample Request' : 'Eine Beispielanfrage senden',
+ 'show up to version:' : 'zeige bis zur Version:',
+ 'Size range:' : 'Größenbereich:',
+ 'Type' : 'Typ',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/es.js b/docs/api/locales/es.js
index ecb729ef..3d47e800 100644
--- a/docs/api/locales/es.js
+++ b/docs/api/locales/es.js
@@ -1,25 +1,25 @@
define({
es: {
- "Allowed values:": "Valores permitidos:",
- "Compare all with predecessor": "Comparar todo con versión anterior",
- "compare changes to:": "comparar cambios con:",
- "compared to": "comparado con",
- "Default value:": "Valor por defecto:",
- Description: "Descripción",
- Field: "Campo",
- General: "General",
- "Generated with": "Generado con",
- Name: "Nombre",
- "No response values.": "Sin valores en la respuesta.",
- optional: "opcional",
- Parameter: "Parámetro",
- "Permission:": "Permisos:",
- Response: "Respuesta",
- Send: "Enviar",
- "Send a Sample Request": "Enviar una petición de ejemplo",
- "show up to version:": "mostrar a versión:",
- "Size range:": "Tamaño de rango:",
- Type: "Tipo",
- url: "url"
+ 'Allowed values:' : 'Valores permitidos:',
+ 'Compare all with predecessor': 'Comparar todo con versión anterior',
+ 'compare changes to:' : 'comparar cambios con:',
+ 'compared to' : 'comparado con',
+ 'Default value:' : 'Valor por defecto:',
+ 'Description' : 'Descripción',
+ 'Field' : 'Campo',
+ 'General' : 'General',
+ 'Generated with' : 'Generado con',
+ 'Name' : 'Nombre',
+ 'No response values.' : 'Sin valores en la respuesta.',
+ 'optional' : 'opcional',
+ 'Parameter' : 'Parámetro',
+ 'Permission:' : 'Permisos:',
+ 'Response' : 'Respuesta',
+ 'Send' : 'Enviar',
+ 'Send a Sample Request' : 'Enviar una petición de ejemplo',
+ 'show up to version:' : 'mostrar a versión:',
+ 'Size range:' : 'Tamaño de rango:',
+ 'Type' : 'Tipo',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/fr.js b/docs/api/locales/fr.js
index 27ac480f..100a6429 100644
--- a/docs/api/locales/fr.js
+++ b/docs/api/locales/fr.js
@@ -1,25 +1,25 @@
define({
fr: {
- "Allowed values:": "Valeurs autorisées :",
- "Compare all with predecessor": "Tout comparer avec ...",
- "compare changes to:": "comparer les changements à :",
- "compared to": "comparer à",
- "Default value:": "Valeur par défaut :",
- Description: "Description",
- Field: "Champ",
- General: "Général",
- "Generated with": "Généré avec",
- Name: "Nom",
- "No response values.": "Aucune valeur de réponse.",
- optional: "optionnel",
- Parameter: "Paramètre",
- "Permission:": "Permission :",
- Response: "Réponse",
- Send: "Envoyer",
- "Send a Sample Request": "Envoyer une requête représentative",
- "show up to version:": "Montrer à partir de la version :",
- "Size range:": "Ordre de grandeur :",
- Type: "Type",
- url: "url"
+ 'Allowed values:' : 'Valeurs autorisées :',
+ 'Compare all with predecessor': 'Tout comparer avec ...',
+ 'compare changes to:' : 'comparer les changements à :',
+ 'compared to' : 'comparer à',
+ 'Default value:' : 'Valeur par défaut :',
+ 'Description' : 'Description',
+ 'Field' : 'Champ',
+ 'General' : 'Général',
+ 'Generated with' : 'Généré avec',
+ 'Name' : 'Nom',
+ 'No response values.' : 'Aucune valeur de réponse.',
+ 'optional' : 'optionnel',
+ 'Parameter' : 'Paramètre',
+ 'Permission:' : 'Permission :',
+ 'Response' : 'Réponse',
+ 'Send' : 'Envoyer',
+ 'Send a Sample Request' : 'Envoyer une requête représentative',
+ 'show up to version:' : 'Montrer à partir de la version :',
+ 'Size range:' : 'Ordre de grandeur :',
+ 'Type' : 'Type',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/it.js b/docs/api/locales/it.js
index 15053923..8117108c 100644
--- a/docs/api/locales/it.js
+++ b/docs/api/locales/it.js
@@ -1,26 +1,25 @@
define({
it: {
- "Allowed values:": "Valori permessi:",
- "Compare all with predecessor":
- "Confronta tutto con versioni precedenti",
- "compare changes to:": "confronta modifiche con:",
- "compared to": "confrontato con",
- "Default value:": "Valore predefinito:",
- Description: "Descrizione",
- Field: "Campo",
- General: "Generale",
- "Generated with": "Creato con",
- Name: "Nome",
- "No response values.": "Nessun valore di risposta.",
- optional: "opzionale",
- Parameter: "Parametro",
- "Permission:": "Permessi:",
- Response: "Risposta",
- Send: "Invia",
- "Send a Sample Request": "Invia una richiesta di esempio",
- "show up to version:": "mostra alla versione:",
- "Size range:": "Intervallo dimensione:",
- Type: "Tipo",
- url: "url"
+ 'Allowed values:' : 'Valori permessi:',
+ 'Compare all with predecessor': 'Confronta tutto con versioni precedenti',
+ 'compare changes to:' : 'confronta modifiche con:',
+ 'compared to' : 'confrontato con',
+ 'Default value:' : 'Valore predefinito:',
+ 'Description' : 'Descrizione',
+ 'Field' : 'Campo',
+ 'General' : 'Generale',
+ 'Generated with' : 'Creato con',
+ 'Name' : 'Nome',
+ 'No response values.' : 'Nessun valore di risposta.',
+ 'optional' : 'opzionale',
+ 'Parameter' : 'Parametro',
+ 'Permission:' : 'Permessi:',
+ 'Response' : 'Risposta',
+ 'Send' : 'Invia',
+ 'Send a Sample Request' : 'Invia una richiesta di esempio',
+ 'show up to version:' : 'mostra alla versione:',
+ 'Size range:' : 'Intervallo dimensione:',
+ 'Type' : 'Tipo',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/locale.js b/docs/api/locales/locale.js
index 3bd9f9e8..3530705e 100644
--- a/docs/api/locales/locale.js
+++ b/docs/api/locales/locale.js
@@ -1,23 +1,21 @@
define([
- "./locales/ca.js",
- "./locales/cs.js",
- "./locales/de.js",
- "./locales/es.js",
- "./locales/fr.js",
- "./locales/it.js",
- "./locales/nl.js",
- "./locales/pl.js",
- "./locales/pt_br.js",
- "./locales/ro.js",
- "./locales/ru.js",
- "./locales/tr.js",
- "./locales/vi.js",
- "./locales/zh.js",
- "./locales/zh_cn.js"
+ './locales/ca.js',
+ './locales/cs.js',
+ './locales/de.js',
+ './locales/es.js',
+ './locales/fr.js',
+ './locales/it.js',
+ './locales/nl.js',
+ './locales/pl.js',
+ './locales/pt_br.js',
+ './locales/ro.js',
+ './locales/ru.js',
+ './locales/tr.js',
+ './locales/vi.js',
+ './locales/zh.js',
+ './locales/zh_cn.js'
], function() {
- var langId = (navigator.language || navigator.userLanguage)
- .toLowerCase()
- .replace("-", "_");
+ var langId = (navigator.language || navigator.userLanguage).toLowerCase().replace('-', '_');
var language = langId.substr(0, 2);
var locales = {};
@@ -25,18 +23,20 @@ define([
for (property in arguments[index])
locales[property] = arguments[index][property];
}
+ if ( ! locales['en'])
+ locales['en'] = {};
- if (!locales["en"]) locales["en"] = {};
+ if ( ! locales[langId] && ! locales[language])
+ language = 'en';
- if (!locales[langId] && !locales[language]) language = "en";
-
- var locale = locales[langId] ? locales[langId] : locales[language];
+ var locale = (locales[langId] ? locales[langId] : locales[language]);
function __(text) {
var index = locale[text];
- if (index === undefined) return text;
+ if (index === undefined)
+ return text;
return index;
- }
+ };
function setLanguage(language) {
locale = locales[language];
diff --git a/docs/api/locales/nl.js b/docs/api/locales/nl.js
index c64b6d06..bddfeeb1 100644
--- a/docs/api/locales/nl.js
+++ b/docs/api/locales/nl.js
@@ -1,25 +1,25 @@
define({
nl: {
- "Allowed values:": "Toegestane waarden:",
- "Compare all with predecessor": "Vergelijk alle met voorgaande versie",
- "compare changes to:": "vergelijk veranderingen met:",
- "compared to": "vergelijk met",
- "Default value:": "Standaard waarde:",
- Description: "Omschrijving",
- Field: "Veld",
- General: "Algemeen",
- "Generated with": "Gegenereerd met",
- Name: "Naam",
- "No response values.": "Geen response waardes.",
- optional: "optioneel",
- Parameter: "Parameter",
- "Permission:": "Permissie:",
- Response: "Antwoorden",
- Send: "Sturen",
- "Send a Sample Request": "Stuur een sample aanvragen",
- "show up to version:": "toon tot en met versie:",
- "Size range:": "Maatbereik:",
- Type: "Type",
- url: "url"
+ 'Allowed values:' : 'Toegestane waarden:',
+ 'Compare all with predecessor': 'Vergelijk alle met voorgaande versie',
+ 'compare changes to:' : 'vergelijk veranderingen met:',
+ 'compared to' : 'vergelijk met',
+ 'Default value:' : 'Standaard waarde:',
+ 'Description' : 'Omschrijving',
+ 'Field' : 'Veld',
+ 'General' : 'Algemeen',
+ 'Generated with' : 'Gegenereerd met',
+ 'Name' : 'Naam',
+ 'No response values.' : 'Geen response waardes.',
+ 'optional' : 'optioneel',
+ 'Parameter' : 'Parameter',
+ 'Permission:' : 'Permissie:',
+ 'Response' : 'Antwoorden',
+ 'Send' : 'Sturen',
+ 'Send a Sample Request' : 'Stuur een sample aanvragen',
+ 'show up to version:' : 'toon tot en met versie:',
+ 'Size range:' : 'Maatbereik:',
+ 'Type' : 'Type',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/pl.js b/docs/api/locales/pl.js
index bb7e69fc..db645ee1 100644
--- a/docs/api/locales/pl.js
+++ b/docs/api/locales/pl.js
@@ -1,25 +1,25 @@
define({
pl: {
- "Allowed values:": "Dozwolone wartości:",
- "Compare all with predecessor": "Porównaj z poprzednimi wersjami",
- "compare changes to:": "porównaj zmiany do:",
- "compared to": "porównaj do:",
- "Default value:": "Wartość domyślna:",
- Description: "Opis",
- Field: "Pole",
- General: "Generalnie",
- "Generated with": "Wygenerowano z",
- Name: "Nazwa",
- "No response values.": "Brak odpowiedzi.",
- optional: "opcjonalny",
- Parameter: "Parametr",
- "Permission:": "Uprawnienia:",
- Response: "Odpowiedź",
- Send: "Wyślij",
- "Send a Sample Request": "Wyślij przykładowe żądanie",
- "show up to version:": "pokaż do wersji:",
- "Size range:": "Zakres rozmiaru:",
- Type: "Typ",
- url: "url"
+ 'Allowed values:' : 'Dozwolone wartości:',
+ 'Compare all with predecessor': 'Porównaj z poprzednimi wersjami',
+ 'compare changes to:' : 'porównaj zmiany do:',
+ 'compared to' : 'porównaj do:',
+ 'Default value:' : 'Wartość domyślna:',
+ 'Description' : 'Opis',
+ 'Field' : 'Pole',
+ 'General' : 'Generalnie',
+ 'Generated with' : 'Wygenerowano z',
+ 'Name' : 'Nazwa',
+ 'No response values.' : 'Brak odpowiedzi.',
+ 'optional' : 'opcjonalny',
+ 'Parameter' : 'Parametr',
+ 'Permission:' : 'Uprawnienia:',
+ 'Response' : 'Odpowiedź',
+ 'Send' : 'Wyślij',
+ 'Send a Sample Request' : 'Wyślij przykładowe żądanie',
+ 'show up to version:' : 'pokaż do wersji:',
+ 'Size range:' : 'Zakres rozmiaru:',
+ 'Type' : 'Typ',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/pt_br.js b/docs/api/locales/pt_br.js
index 30bd0f3d..2bd78b0d 100644
--- a/docs/api/locales/pt_br.js
+++ b/docs/api/locales/pt_br.js
@@ -1,25 +1,25 @@
define({
- pt_br: {
- "Allowed values:": "Valores permitidos:",
- "Compare all with predecessor": "Compare todos com antecessores",
- "compare changes to:": "comparar alterações com:",
- "compared to": "comparado com",
- "Default value:": "Valor padrão:",
- Description: "Descrição",
- Field: "Campo",
- General: "Geral",
- "Generated with": "Gerado com",
- Name: "Nome",
- "No response values.": "Sem valores de resposta.",
- optional: "opcional",
- Parameter: "Parâmetro",
- "Permission:": "Permissão:",
- Response: "Resposta",
- Send: "Enviar",
- "Send a Sample Request": "Enviar um Exemplo de Pedido",
- "show up to version:": "aparecer para a versão:",
- "Size range:": "Faixa de tamanho:",
- Type: "Tipo",
- url: "url"
+ 'pt_br': {
+ 'Allowed values:' : 'Valores permitidos:',
+ 'Compare all with predecessor': 'Compare todos com antecessores',
+ 'compare changes to:' : 'comparar alterações com:',
+ 'compared to' : 'comparado com',
+ 'Default value:' : 'Valor padrão:',
+ 'Description' : 'Descrição',
+ 'Field' : 'Campo',
+ 'General' : 'Geral',
+ 'Generated with' : 'Gerado com',
+ 'Name' : 'Nome',
+ 'No response values.' : 'Sem valores de resposta.',
+ 'optional' : 'opcional',
+ 'Parameter' : 'Parâmetro',
+ 'Permission:' : 'Permissão:',
+ 'Response' : 'Resposta',
+ 'Send' : 'Enviar',
+ 'Send a Sample Request' : 'Enviar um Exemplo de Pedido',
+ 'show up to version:' : 'aparecer para a versão:',
+ 'Size range:' : 'Faixa de tamanho:',
+ 'Type' : 'Tipo',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/ro.js b/docs/api/locales/ro.js
index 0039c00d..8d4e4ed8 100644
--- a/docs/api/locales/ro.js
+++ b/docs/api/locales/ro.js
@@ -1,25 +1,25 @@
define({
ro: {
- "Allowed values:": "Valori permise:",
- "Compare all with predecessor": "Compară toate cu versiunea precedentă",
- "compare changes to:": "compară cu versiunea:",
- "compared to": "comparat cu",
- "Default value:": "Valoare implicită:",
- Description: "Descriere",
- Field: "Câmp",
- General: "General",
- "Generated with": "Generat cu",
- Name: "Nume",
- "No response values.": "Nici o valoare returnată.",
- optional: "opțional",
- Parameter: "Parametru",
- "Permission:": "Permisiune:",
- Response: "Răspuns",
- Send: "Trimite",
- "Send a Sample Request": "Trimite o cerere de probă",
- "show up to version:": "arată până la versiunea:",
- "Size range:": "Interval permis:",
- Type: "Tip",
- url: "url"
+ 'Allowed values:' : 'Valori permise:',
+ 'Compare all with predecessor': 'Compară toate cu versiunea precedentă',
+ 'compare changes to:' : 'compară cu versiunea:',
+ 'compared to' : 'comparat cu',
+ 'Default value:' : 'Valoare implicită:',
+ 'Description' : 'Descriere',
+ 'Field' : 'Câmp',
+ 'General' : 'General',
+ 'Generated with' : 'Generat cu',
+ 'Name' : 'Nume',
+ 'No response values.' : 'Nici o valoare returnată.',
+ 'optional' : 'opțional',
+ 'Parameter' : 'Parametru',
+ 'Permission:' : 'Permisiune:',
+ 'Response' : 'Răspuns',
+ 'Send' : 'Trimite',
+ 'Send a Sample Request' : 'Trimite o cerere de probă',
+ 'show up to version:' : 'arată până la versiunea:',
+ 'Size range:' : 'Interval permis:',
+ 'Type' : 'Tip',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/ru.js b/docs/api/locales/ru.js
index fd87310a..c5f33821 100644
--- a/docs/api/locales/ru.js
+++ b/docs/api/locales/ru.js
@@ -1,25 +1,25 @@
define({
ru: {
- "Allowed values:": "Допустимые значения:",
- "Compare all with predecessor": "Сравнить с предыдущей версией",
- "compare changes to:": "сравнить с:",
- "compared to": "в сравнении с",
- "Default value:": "По умолчанию:",
- Description: "Описание",
- Field: "Название",
- General: "Общая информация",
- "Generated with": "Сгенерировано с помощью",
- Name: "Название",
- "No response values.": "Нет значений для ответа.",
- optional: "необязательный",
- Parameter: "Параметр",
- "Permission:": "Разрешено:",
- Response: "Ответ",
- Send: "Отправить",
- "Send a Sample Request": "Отправить тестовый запрос",
- "show up to version:": "показать версию:",
- "Size range:": "Ограничения:",
- Type: "Тип",
- url: "URL"
+ 'Allowed values:' : 'Допустимые значения:',
+ 'Compare all with predecessor': 'Сравнить с предыдущей версией',
+ 'compare changes to:' : 'сравнить с:',
+ 'compared to' : 'в сравнении с',
+ 'Default value:' : 'По умолчанию:',
+ 'Description' : 'Описание',
+ 'Field' : 'Название',
+ 'General' : 'Общая информация',
+ 'Generated with' : 'Сгенерировано с помощью',
+ 'Name' : 'Название',
+ 'No response values.' : 'Нет значений для ответа.',
+ 'optional' : 'необязательный',
+ 'Parameter' : 'Параметр',
+ 'Permission:' : 'Разрешено:',
+ 'Response' : 'Ответ',
+ 'Send' : 'Отправить',
+ 'Send a Sample Request' : 'Отправить тестовый запрос',
+ 'show up to version:' : 'показать версию:',
+ 'Size range:' : 'Ограничения:',
+ 'Type' : 'Тип',
+ 'url' : 'URL'
}
});
diff --git a/docs/api/locales/tr.js b/docs/api/locales/tr.js
index 5b89388b..5c64e52d 100644
--- a/docs/api/locales/tr.js
+++ b/docs/api/locales/tr.js
@@ -1,25 +1,25 @@
define({
tr: {
- "Allowed values:": "İzin verilen değerler:",
- "Compare all with predecessor": "Tümünü öncekiler ile karşılaştır",
- "compare changes to:": "değişiklikleri karşılaştır:",
- "compared to": "karşılaştır",
- "Default value:": "Varsayılan değer:",
- Description: "Açıklama",
- Field: "Alan",
- General: "Genel",
- "Generated with": "Oluşturan",
- Name: "İsim",
- "No response values.": "Dönüş verisi yok.",
- optional: "opsiyonel",
- Parameter: "Parametre",
- "Permission:": "İzin:",
- Response: "Dönüş",
- Send: "Gönder",
- "Send a Sample Request": "Örnek istek gönder",
- "show up to version:": "bu versiyona kadar göster:",
- "Size range:": "Boyut aralığı:",
- Type: "Tip",
- url: "url"
+ 'Allowed values:' : 'İzin verilen değerler:',
+ 'Compare all with predecessor': 'Tümünü öncekiler ile karşılaştır',
+ 'compare changes to:' : 'değişiklikleri karşılaştır:',
+ 'compared to' : 'karşılaştır',
+ 'Default value:' : 'Varsayılan değer:',
+ 'Description' : 'Açıklama',
+ 'Field' : 'Alan',
+ 'General' : 'Genel',
+ 'Generated with' : 'Oluşturan',
+ 'Name' : 'İsim',
+ 'No response values.' : 'Dönüş verisi yok.',
+ 'optional' : 'opsiyonel',
+ 'Parameter' : 'Parametre',
+ 'Permission:' : 'İzin:',
+ 'Response' : 'Dönüş',
+ 'Send' : 'Gönder',
+ 'Send a Sample Request' : 'Örnek istek gönder',
+ 'show up to version:' : 'bu versiyona kadar göster:',
+ 'Size range:' : 'Boyut aralığı:',
+ 'Type' : 'Tip',
+ 'url' : 'url'
}
});
diff --git a/docs/api/locales/vi.js b/docs/api/locales/vi.js
index cddc87a1..7ce77050 100644
--- a/docs/api/locales/vi.js
+++ b/docs/api/locales/vi.js
@@ -1,25 +1,25 @@
define({
vi: {
- "Allowed values:": "Giá trị chấp nhận:",
- "Compare all with predecessor": "So sánh với tất cả phiên bản trước",
- "compare changes to:": "so sánh sự thay đổi với:",
- "compared to": "so sánh với",
- "Default value:": "Giá trị mặc định:",
- Description: "Chú thích",
- Field: "Trường dữ liệu",
- General: "Tổng quan",
- "Generated with": "Được tạo bởi",
- Name: "Tên",
- "No response values.": "Không có kết quả trả về.",
- optional: "Tùy chọn",
- Parameter: "Tham số",
- "Permission:": "Quyền hạn:",
- Response: "Kết quả",
- Send: "Gửi",
- "Send a Sample Request": "Gửi một yêu cầu mẫu",
- "show up to version:": "hiển thị phiên bản:",
- "Size range:": "Kích cỡ:",
- Type: "Kiểu",
- url: "liên kết"
+ 'Allowed values:' : 'Giá trị chấp nhận:',
+ 'Compare all with predecessor': 'So sánh với tất cả phiên bản trước',
+ 'compare changes to:' : 'so sánh sự thay đổi với:',
+ 'compared to' : 'so sánh với',
+ 'Default value:' : 'Giá trị mặc định:',
+ 'Description' : 'Chú thích',
+ 'Field' : 'Trường dữ liệu',
+ 'General' : 'Tổng quan',
+ 'Generated with' : 'Được tạo bởi',
+ 'Name' : 'Tên',
+ 'No response values.' : 'Không có kết quả trả về.',
+ 'optional' : 'Tùy chọn',
+ 'Parameter' : 'Tham số',
+ 'Permission:' : 'Quyền hạn:',
+ 'Response' : 'Kết quả',
+ 'Send' : 'Gửi',
+ 'Send a Sample Request' : 'Gửi một yêu cầu mẫu',
+ 'show up to version:' : 'hiển thị phiên bản:',
+ 'Size range:' : 'Kích cỡ:',
+ 'Type' : 'Kiểu',
+ 'url' : 'liên kết'
}
});
diff --git a/docs/api/locales/zh.js b/docs/api/locales/zh.js
index 1ecb496d..66522067 100644
--- a/docs/api/locales/zh.js
+++ b/docs/api/locales/zh.js
@@ -1,25 +1,25 @@
define({
zh: {
- "Allowed values:": "允許值:",
- "Compare all with predecessor": "預先比較所有",
- "compare changes to:": "比較變更:",
- "compared to": "對比",
- "Default value:": "默認值:",
- Description: "描述",
- Field: "字段",
- General: "概括",
- "Generated with": "生成工具",
- Name: "名稱",
- "No response values.": "無對應資料.",
- optional: "選項",
- Parameter: "參數",
- "Permission:": "允許:",
- Response: "回應",
- Send: "發送",
- "Send a Sample Request": "發送試用需求",
- "show up to version:": "顯示到版本:",
- "Size range:": "尺寸範圍:",
- Type: "類型",
- url: "網址"
+ 'Allowed values:' : '允許值:',
+ 'Compare all with predecessor': '預先比較所有',
+ 'compare changes to:' : '比較變更:',
+ 'compared to' : '對比',
+ 'Default value:' : '默認值:',
+ 'Description' : '描述',
+ 'Field' : '字段',
+ 'General' : '概括',
+ 'Generated with' : '生成工具',
+ 'Name' : '名稱',
+ 'No response values.' : '無對應資料.',
+ 'optional' : '選項',
+ 'Parameter' : '參數',
+ 'Permission:' : '允許:',
+ 'Response' : '回應',
+ 'Send' : '發送',
+ 'Send a Sample Request' : '發送試用需求',
+ 'show up to version:' : '顯示到版本:',
+ 'Size range:' : '尺寸範圍:',
+ 'Type' : '類型',
+ 'url' : '網址'
}
});
diff --git a/docs/api/locales/zh_cn.js b/docs/api/locales/zh_cn.js
index fc6e1fc8..1938ca18 100644
--- a/docs/api/locales/zh_cn.js
+++ b/docs/api/locales/zh_cn.js
@@ -1,25 +1,25 @@
define({
- zh_cn: {
- "Allowed values:": "允许值:",
- "Compare all with predecessor": "与所有较早的比较",
- "compare changes to:": "将当前版本与指定版本比较:",
- "compared to": "相比于",
- "Default value:": "默认值:",
- Description: "描述",
- Field: "字段",
- General: "概要",
- "Generated with": "基于",
- Name: "名称",
- "No response values.": "无返回值.",
- optional: "可选",
- Parameter: "参数",
- "Permission:": "权限:",
- Response: "返回",
- Send: "发送",
- "Send a Sample Request": "发送示例请求",
- "show up to version:": "显示到指定版本:",
- "Size range:": "取值范围:",
- Type: "类型",
- url: "网址"
+ 'zh_cn': {
+ 'Allowed values:' : '允许值:',
+ 'Compare all with predecessor': '与所有较早的比较',
+ 'compare changes to:' : '将当前版本与指定版本比较:',
+ 'compared to' : '相比于',
+ 'Default value:' : '默认值:',
+ 'Description' : '描述',
+ 'Field' : '字段',
+ 'General' : '概要',
+ 'Generated with' : '基于',
+ 'Name' : '名称',
+ 'No response values.' : '无返回值.',
+ 'optional' : '可选',
+ 'Parameter' : '参数',
+ 'Permission:' : '权限:',
+ 'Response' : '返回',
+ 'Send' : '发送',
+ 'Send a Sample Request' : '发送示例请求',
+ 'show up to version:' : '显示到指定版本:',
+ 'Size range:' : '取值范围:',
+ 'Type' : '类型',
+ 'url' : '网址'
}
});
diff --git a/docs/api/main.js b/docs/api/main.js
index 1cd9e952..9d31fa5f 100644
--- a/docs/api/main.js
+++ b/docs/api/main.js
@@ -1,67 +1,57 @@
require.config({
paths: {
- bootstrap: "./vendor/bootstrap.min",
- diffMatchPatch: "./vendor/diff_match_patch.min",
- handlebars: "./vendor/handlebars.min",
- handlebarsExtended: "./utils/handlebars_helper",
- jquery: "./vendor/jquery.min",
- locales: "./locales/locale",
- lodash: "./vendor/lodash.custom.min",
- pathToRegexp: "./vendor/path-to-regexp/index",
- prettify: "./vendor/prettify/prettify",
- semver: "./vendor/semver.min",
- utilsSampleRequest: "./utils/send_sample_request",
- webfontloader: "./vendor/webfontloader",
- list: "./vendor/list.min"
+ bootstrap: './vendor/bootstrap.min',
+ diffMatchPatch: './vendor/diff_match_patch.min',
+ handlebars: './vendor/handlebars.min',
+ handlebarsExtended: './utils/handlebars_helper',
+ jquery: './vendor/jquery.min',
+ locales: './locales/locale',
+ lodash: './vendor/lodash.custom.min',
+ pathToRegexp: './vendor/path-to-regexp/index',
+ prettify: './vendor/prettify/prettify',
+ semver: './vendor/semver.min',
+ utilsSampleRequest: './utils/send_sample_request',
+ webfontloader: './vendor/webfontloader',
+ list: './vendor/list.min'
},
shim: {
bootstrap: {
- deps: ["jquery"]
+ deps: ['jquery']
},
diffMatchPatch: {
- exports: "diff_match_patch"
+ exports: 'diff_match_patch'
},
handlebars: {
- exports: "Handlebars"
+ exports: 'Handlebars'
},
handlebarsExtended: {
- deps: ["jquery", "handlebars"],
- exports: "Handlebars"
+ deps: ['jquery', 'handlebars'],
+ exports: 'Handlebars'
},
prettify: {
- exports: "prettyPrint"
+ exports: 'prettyPrint'
}
},
- urlArgs: "v=" + new Date().getTime(),
+ urlArgs: 'v=' + (new Date()).getTime(),
waitSeconds: 15
});
require([
- "jquery",
- "lodash",
- "locales",
- "handlebarsExtended",
- "./api_project.js",
- "./api_data.js",
- "prettify",
- "utilsSampleRequest",
- "semver",
- "webfontloader",
- "bootstrap",
- "pathToRegexp",
- "list"
-], function(
- $,
- _,
- locale,
- Handlebars,
- apiProject,
- apiData,
- prettyPrint,
- sampleRequest,
- semver,
- WebFont
-) {
+ 'jquery',
+ 'lodash',
+ 'locales',
+ 'handlebarsExtended',
+ './api_project.js',
+ './api_data.js',
+ 'prettify',
+ 'utilsSampleRequest',
+ 'semver',
+ 'webfontloader',
+ 'bootstrap',
+ 'pathToRegexp',
+ 'list'
+], function($, _, locale, Handlebars, apiProject, apiData, prettyPrint, sampleRequest, semver, WebFont) {
+
// load google web fonts
loadGoogleFontCss();
@@ -70,21 +60,20 @@ require([
//
// Templates
//
- var templateHeader = Handlebars.compile($("#template-header").html());
- var templateFooter = Handlebars.compile($("#template-footer").html());
- var templateArticle = Handlebars.compile($("#template-article").html());
- var templateCompareArticle = Handlebars.compile(
- $("#template-compare-article").html()
- );
- var templateGenerator = Handlebars.compile($("#template-generator").html());
- var templateProject = Handlebars.compile($("#template-project").html());
- var templateSections = Handlebars.compile($("#template-sections").html());
- var templateSidenav = Handlebars.compile($("#template-sidenav").html());
+ var templateHeader = Handlebars.compile( $('#template-header').html() );
+ var templateFooter = Handlebars.compile( $('#template-footer').html() );
+ var templateArticle = Handlebars.compile( $('#template-article').html() );
+ var templateCompareArticle = Handlebars.compile( $('#template-compare-article').html() );
+ var templateGenerator = Handlebars.compile( $('#template-generator').html() );
+ var templateProject = Handlebars.compile( $('#template-project').html() );
+ var templateSections = Handlebars.compile( $('#template-sections').html() );
+ var templateSidenav = Handlebars.compile( $('#template-sidenav').html() );
//
// apiProject defaults
//
- if (!apiProject.template) apiProject.template = {};
+ if ( ! apiProject.template)
+ apiProject.template = {};
if (apiProject.template.withCompare == null)
apiProject.template.withCompare = true;
@@ -118,17 +107,15 @@ require([
// sort api within a group by title ASC and custom order
//
var newList = [];
- var umlauts = { ä: "ae", ü: "ue", ö: "oe", ß: "ss" }; // TODO: remove in version 1.0
- $.each(apiByGroupAndName, function(index, groupEntries) {
+ var umlauts = { 'ä': 'ae', 'ü': 'ue', 'ö': 'oe', 'ß': 'ss' }; // TODO: remove in version 1.0
+ $.each (apiByGroupAndName, function(index, groupEntries) {
// get titles from the first entry of group[].name[] (name has versioning)
var titles = [];
- $.each(groupEntries, function(titleName, entries) {
+ $.each (groupEntries, function(titleName, entries) {
var title = entries[0].title;
- if (title !== undefined) {
- title.toLowerCase().replace(/[äöüß]/g, function($0) {
- return umlauts[$0];
- });
- titles.push(title + "#~#" + titleName); // '#~#' keep reference to titleName after sorting
+ if(title !== undefined) {
+ title.toLowerCase().replace(/[äöüß]/g, function($0) { return umlauts[$0]; });
+ titles.push(title + '#~#' + titleName); // '#~#' keep reference to titleName after sorting
}
});
// sort by name ASC
@@ -136,11 +123,11 @@ require([
// custom order
if (apiProject.order)
- titles = sortByOrder(titles, apiProject.order, "#~#");
+ titles = sortByOrder(titles, apiProject.order, '#~#');
// add single elements to the new list
titles.forEach(function(name) {
- var values = name.split("#~#");
+ var values = name.split('#~#');
var key = values[1];
groupEntries[key].forEach(function(entry) {
newList.push(entry);
@@ -169,7 +156,8 @@ require([
apiGroups.sort();
// custom order
- if (apiProject.order) apiGroups = sortByOrder(apiGroups, apiProject.order);
+ if (apiProject.order)
+ apiGroups = sortByOrder(apiGroups, apiProject.order);
// sort versions DESC
apiVersions = Object.keys(apiVersions);
@@ -189,7 +177,7 @@ require([
});
// Submenu
- var oldName = "";
+ var oldName = '';
api.forEach(function(entry) {
if (entry.group === group) {
if (oldName !== entry.name) {
@@ -224,39 +212,39 @@ require([
*/
function add_nav(nav, content, index) {
var found_level1 = false;
- if (!content) {
- return found_level1;
+ if ( ! content) {
+ return found_level1;
}
var topics = content.match(/(.+?)<\/h(1|2)>/gi);
- if (topics) {
- topics.forEach(function(entry) {
- var level = entry.substring(2, 3);
- var title = entry.replace(/<.+?>/g, ""); // Remove all HTML tags for the title
- var entry_tags = entry.match(/id="api-([^\-]+)(?:-(.+))?"/); // Find the group and name in the id property
- var group = entry_tags ? entry_tags[1] : null;
- var name = entry_tags ? entry_tags[2] : null;
- if (level == 1 && title && group) {
- nav.splice(index, 0, {
- group: group,
- isHeader: true,
- title: title,
- isFixed: true
- });
- index++;
- found_level1 = true;
- }
- if (level == 2 && title && group && name) {
- nav.splice(index, 0, {
- group: group,
- name: name,
- isHeader: false,
- title: title,
- isFixed: false,
- version: "1.0"
- });
- index++;
- }
- });
+ if ( topics ) {
+ topics.forEach(function(entry) {
+ var level = entry.substring(2,3);
+ var title = entry.replace(/<.+?>/g, ''); // Remove all HTML tags for the title
+ var entry_tags = entry.match(/id="api-([^\-]+)(?:-(.+))?"/); // Find the group and name in the id property
+ var group = (entry_tags ? entry_tags[1] : null);
+ var name = (entry_tags ? entry_tags[2] : null);
+ if (level==1 && title && group) {
+ nav.splice(index, 0, {
+ group: group,
+ isHeader: true,
+ title: title,
+ isFixed: true
+ });
+ index++;
+ found_level1 = true;
+ }
+ if (level==2 && title && group && name) {
+ nav.splice(index, 0, {
+ group: group,
+ name: name,
+ isHeader: false,
+ title: title,
+ isFixed: false,
+ version: '1.0'
+ });
+ index++;
+ }
+ });
}
return found_level1;
}
@@ -264,15 +252,11 @@ require([
// Mainmenu Header entry
if (apiProject.header) {
var found_level1 = add_nav(nav, apiProject.header.content, 0); // Add level 1 and 2 titles
- if (!found_level1) {
- // If no Level 1 tags were found, make a title
+ if (!found_level1) { // If no Level 1 tags were found, make a title
nav.unshift({
- group: "_",
+ group: '_',
isHeader: true,
- title:
- apiProject.header.title == null
- ? locale.__("General")
- : apiProject.header.title,
+ title: (apiProject.header.title == null) ? locale.__('General') : apiProject.header.title,
isFixed: true
});
}
@@ -282,10 +266,9 @@ require([
if (apiProject.footer) {
var last_nav_index = nav.length;
var found_level1 = add_nav(nav, apiProject.footer.content, nav.length); // Add level 1 and 2 titles
- if (!found_level1 && apiProject.footer.title != null) {
- // If no Level 1 tags were found, make a title
+ if (!found_level1 && apiProject.footer.title != null) { // If no Level 1 tags were found, make a title
nav.splice(last_nav_index, 0, {
- group: "_footer",
+ group: '_footer',
isHeader: true,
title: apiProject.footer.title,
isFixed: true
@@ -294,67 +277,56 @@ require([
}
// render pagetitle
- var title = apiProject.title
- ? apiProject.title
- : "apiDoc: " + apiProject.name + " - " + apiProject.version;
- $(document).attr("title", title);
+ var title = apiProject.title ? apiProject.title : 'apiDoc: ' + apiProject.name + ' - ' + apiProject.version;
+ $(document).attr('title', title);
// remove loader
- $("#loader").remove();
+ $('#loader').remove();
// render sidenav
var fields = {
nav: nav
};
- $("#sidenav").append(templateSidenav(fields));
+ $('#sidenav').append( templateSidenav(fields) );
// render Generator
- $("#generator").append(templateGenerator(apiProject));
+ $('#generator').append( templateGenerator(apiProject) );
// render Project
- _.extend(apiProject, { versions: apiVersions });
- $("#project").append(templateProject(apiProject));
+ _.extend(apiProject, { versions: apiVersions});
+ $('#project').append( templateProject(apiProject) );
// render apiDoc, header/footer documentation
if (apiProject.header)
- $("#header").append(templateHeader(apiProject.header));
+ $('#header').append( templateHeader(apiProject.header) );
if (apiProject.footer)
- $("#footer").append(templateFooter(apiProject.footer));
+ $('#footer').append( templateFooter(apiProject.footer) );
//
// Render Sections and Articles
//
var articleVersions = {};
- var content = "";
+ var content = '';
apiGroups.forEach(function(groupEntry) {
var articles = [];
- var oldName = "";
+ var oldName = '';
var fields = {};
var title = groupEntry;
- var description = "";
+ var description = '';
articleVersions[groupEntry] = {};
// render all articles of a group
api.forEach(function(entry) {
- if (groupEntry === entry.group) {
+ if(groupEntry === entry.group) {
if (oldName !== entry.name) {
// determine versions
api.forEach(function(versionEntry) {
- if (
- groupEntry === versionEntry.group &&
- entry.name === versionEntry.name
- ) {
- if (
- !articleVersions[entry.group].hasOwnProperty(
- entry.name
- )
- ) {
+ if (groupEntry === versionEntry.group && entry.name === versionEntry.name) {
+ if ( ! articleVersions[entry.group].hasOwnProperty(entry.name) ) {
articleVersions[entry.group][entry.name] = [];
}
- articleVersions[entry.group][entry.name].push(
- versionEntry.version
- );
+ articleVersions[entry.group][entry.name].push(versionEntry.version);
}
});
fields = {
@@ -375,7 +347,8 @@ require([
addArticleSettings(fields, entry);
- if (entry.groupTitle) title = entry.groupTitle;
+ if (entry.groupTitle)
+ title = entry.groupTitle;
// TODO: make groupDescription compareable with older versions (not important for the moment)
if (entry.groupDescription)
@@ -399,33 +372,25 @@ require([
};
content += templateSections(fields);
});
- $("#sections").append(content);
+ $('#sections').append( content );
// Bootstrap Scrollspy
- $(this).scrollspy({ target: "#scrollingNav", offset: 18 });
+ $(this).scrollspy({ target: '#scrollingNav', offset: 18 });
// Content-Scroll on Navigation click.
- $(".sidenav")
- .find("a")
- .on("click", function(e) {
- e.preventDefault();
- var id = $(this).attr("href");
- if ($(id).length > 0)
- $("html,body").animate(
- { scrollTop: parseInt($(id).offset().top) },
- 400
- );
- window.location.hash = $(this).attr("href");
- });
+ $('.sidenav').find('a').on('click', function(e) {
+ e.preventDefault();
+ var id = $(this).attr('href');
+ if ($(id).length > 0)
+ $('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 400);
+ window.location.hash = $(this).attr('href');
+ });
// Quickjump on Pageload to hash position.
- if (window.location.hash) {
+ if(window.location.hash) {
var id = window.location.hash;
if ($(id).length > 0)
- $("html,body").animate(
- { scrollTop: parseInt($(id).offset().top) },
- 0
- );
+ $('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 0);
}
/**
@@ -438,11 +403,7 @@ require([
function _hasTypeInFields(fields) {
var result = false;
$.each(fields, function(name) {
- result =
- result ||
- _.some(fields[name], function(item) {
- return item.type;
- });
+ result = result || _.some(fields[name], function(item) { return item.type; });
});
return result;
}
@@ -452,58 +413,39 @@ require([
*/
function initDynamic() {
// Bootstrap popover
- $('button[data-toggle="popover"]')
- .popover()
- .click(function(e) {
- e.preventDefault();
- });
+ $('button[data-toggle="popover"]').popover().click(function(e) {
+ e.preventDefault();
+ });
- var version = $("#version strong").html();
- $("#sidenav li").removeClass("is-new");
+ var version = $('#version strong').html();
+ $('#sidenav li').removeClass('is-new');
if (apiProject.template.withCompare) {
- $("#sidenav li[data-version='" + version + "']").each(function() {
- var group = $(this).data("group");
- var name = $(this).data("name");
- var length = $(
- "#sidenav li[data-group='" +
- group +
- "'][data-name='" +
- name +
- "']"
- ).length;
- var index = $(
- "#sidenav li[data-group='" +
- group +
- "'][data-name='" +
- name +
- "']"
- ).index($(this));
- if (length === 1 || index === length - 1)
- $(this).addClass("is-new");
+ $('#sidenav li[data-version=\'' + version + '\']').each(function(){
+ var group = $(this).data('group');
+ var name = $(this).data('name');
+ var length = $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']').length;
+ var index = $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']').index($(this));
+ if (length === 1 || index === (length - 1))
+ $(this).addClass('is-new');
});
}
// tabs
- $(".nav-tabs-examples a").click(function(e) {
+ $('.nav-tabs-examples a').click(function (e) {
e.preventDefault();
- $(this).tab("show");
+ $(this).tab('show');
});
- $(".nav-tabs-examples")
- .find("a:first")
- .tab("show");
+ $('.nav-tabs-examples').find('a:first').tab('show');
// sample request switch
- $(".sample-request-switch").click(function(e) {
- var name = "." + $(this).attr("name") + "-fields";
- $(name).addClass("hide");
- $(this)
- .parent()
- .next(name)
- .removeClass("hide");
+ $('.sample-request-switch').click(function (e) {
+ var name = '.' + $(this).attr('name') + '-fields';
+ $(name).addClass('hide');
+ $(this).parent().next(name).removeClass('hide');
});
// call scrollspy refresh method
- $(window).scrollspy("refresh");
+ $(window).scrollspy('refresh');
// init modules
sampleRequest.initDynamic();
@@ -517,67 +459,41 @@ require([
// HTML-Template specific jQuery-Functions
//
// Change Main Version
- $("#versions li.version a").on("click", function(e) {
+ $('#versions li.version a').on('click', function(e) {
e.preventDefault();
var selectedVersion = $(this).html();
- $("#version strong").html(selectedVersion);
+ $('#version strong').html(selectedVersion);
// hide all
- $("article").addClass("hide");
- $("#sidenav li:not(.nav-fixed)").addClass("hide");
+ $('article').addClass('hide');
+ $('#sidenav li:not(.nav-fixed)').addClass('hide');
// show 1st equal or lower Version of each entry
- $("article[data-version]").each(function(index) {
- var group = $(this).data("group");
- var name = $(this).data("name");
- var version = $(this).data("version");
+ $('article[data-version]').each(function(index) {
+ var group = $(this).data('group');
+ var name = $(this).data('name');
+ var version = $(this).data('version');
if (semver.lte(version, selectedVersion)) {
- if (
- $(
- "article[data-group='" +
- group +
- "'][data-name='" +
- name +
- "']:visible"
- ).length === 0
- ) {
+ if ($('article[data-group=\'' + group + '\'][data-name=\'' + name + '\']:visible').length === 0) {
// enable Article
- $(
- "article[data-group='" +
- group +
- "'][data-name='" +
- name +
- "'][data-version='" +
- version +
- "']"
- ).removeClass("hide");
+ $('article[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('hide');
// enable Navigation
- $(
- "#sidenav li[data-group='" +
- group +
- "'][data-name='" +
- name +
- "'][data-version='" +
- version +
- "']"
- ).removeClass("hide");
- $(
- "#sidenav li.nav-header[data-group='" + group + "']"
- ).removeClass("hide");
+ $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('hide');
+ $('#sidenav li.nav-header[data-group=\'' + group + '\']').removeClass('hide');
}
}
});
// show 1st equal or lower Version of each entry
- $("article[data-version]").each(function(index) {
- var group = $(this).data("group");
- $("section#api-" + group).removeClass("hide");
- if ($("section#api-" + group + " article:visible").length === 0) {
- $("section#api-" + group).addClass("hide");
+ $('article[data-version]').each(function(index) {
+ var group = $(this).data('group');
+ $('section#api-' + group).removeClass('hide');
+ if ($('section#api-' + group + ' article:visible').length === 0) {
+ $('section#api-' + group).addClass('hide');
} else {
- $("section#api-" + group).removeClass("hide");
+ $('section#api-' + group).removeClass('hide');
}
});
@@ -586,29 +502,24 @@ require([
});
// compare all article with their predecessor
- $("#compareAllWithPredecessor").on("click", changeAllVersionCompareTo);
+ $('#compareAllWithPredecessor').on('click', changeAllVersionCompareTo);
// change version of an article
- $("article .versions li.version a").on("click", changeVersionCompareTo);
+ $('article .versions li.version a').on('click', changeVersionCompareTo);
// compare url-parameter
$.urlParam = function(name) {
- var results = new RegExp("[\\?&]" + name + "=([^&#]*)").exec(
- window.location.href
- );
- return results && results[1] ? results[1] : null;
+ var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
+ return (results && results[1]) ? results[1] : null;
};
- if ($.urlParam("compare")) {
+ if ($.urlParam('compare')) {
// URL Paramter ?compare=1 is set
- $("#compareAllWithPredecessor").trigger("click");
+ $('#compareAllWithPredecessor').trigger('click');
if (window.location.hash) {
var id = window.location.hash;
- $("html,body").animate(
- { scrollTop: parseInt($(id).offset().top) - 18 },
- 0
- );
+ $('html,body').animate({ scrollTop: parseInt($(id).offset().top) - 18 }, 0);
}
}
@@ -616,30 +527,31 @@ require([
* Initialize search
*/
var options = {
- valueNames: ["nav-list-item"]
+ valueNames: [ 'nav-list-item' ]
};
- var endpointsList = new List("scrollingNav", options);
+ var endpointsList = new List('scrollingNav', options);
/**
* Set initial focus to search input
*/
- $("#scrollingNav .sidenav-search input.search").focus();
+ $('#scrollingNav .sidenav-search input.search').focus();
/**
* Detect ESC key to reset search
*/
$(document).keyup(function(e) {
- if (e.keyCode === 27) $("span.search-reset").click();
+ if (e.keyCode === 27) $('span.search-reset').click();
});
/**
* Search reset
*/
- $("span.search-reset").on("click", function() {
- $("#scrollingNav .sidenav-search input.search")
- .val("")
- .focus();
- endpointsList.search();
+ $('span.search-reset').on('click', function() {
+ $('#scrollingNav .sidenav-search input.search')
+ .val("")
+ .focus()
+ ;
+ endpointsList.search();
});
/**
@@ -648,45 +560,37 @@ require([
function changeVersionCompareTo(e) {
e.preventDefault();
- var $root = $(this).parents("article");
+ var $root = $(this).parents('article');
var selectedVersion = $(this).html();
- var $button = $root.find(".version");
- var currentVersion = $button.find("strong").html();
- $button.find("strong").html(selectedVersion);
+ var $button = $root.find('.version');
+ var currentVersion = $button.find('strong').html();
+ $button.find('strong').html(selectedVersion);
- var group = $root.data("group");
- var name = $root.data("name");
- var version = $root.data("version");
+ var group = $root.data('group');
+ var name = $root.data('name');
+ var version = $root.data('version');
- var compareVersion = $root.data("compare-version");
+ var compareVersion = $root.data('compare-version');
- if (compareVersion === selectedVersion) return;
+ if (compareVersion === selectedVersion)
+ return;
- if (!compareVersion && version == selectedVersion) return;
+ if ( ! compareVersion && version == selectedVersion)
+ return;
- if (
- (compareVersion &&
- articleVersions[group][name][0] === selectedVersion) ||
- version === selectedVersion
- ) {
+ if (compareVersion && articleVersions[group][name][0] === selectedVersion || version === selectedVersion) {
// the version of the entry is set to the highest version (reset)
resetArticle(group, name, version);
} else {
- var $compareToArticle = $(
- "article[data-group='" +
- group +
- "'][data-name='" +
- name +
- "'][data-version='" +
- selectedVersion +
- "']"
- );
+ var $compareToArticle = $('article[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + selectedVersion + '\']');
var sourceEntry = {};
var compareEntry = {};
$.each(apiByGroupAndName[group][name], function(index, entry) {
- if (entry.version === version) sourceEntry = entry;
- if (entry.version === selectedVersion) compareEntry = entry;
+ if (entry.version === version)
+ sourceEntry = entry;
+ if (entry.version === selectedVersion)
+ compareEntry = entry;
});
var fields = {
@@ -697,99 +601,47 @@ require([
// add unique id
// TODO: replace all group-name-version in template with id.
- fields.article.id =
- fields.article.group +
- "-" +
- fields.article.name +
- "-" +
- fields.article.version;
- fields.article.id = fields.article.id.replace(/\./g, "_");
-
- fields.compare.id =
- fields.compare.group +
- "-" +
- fields.compare.name +
- "-" +
- fields.compare.version;
- fields.compare.id = fields.compare.id.replace(/\./g, "_");
+ fields.article.id = fields.article.group + '-' + fields.article.name + '-' + fields.article.version;
+ fields.article.id = fields.article.id.replace(/\./g, '_');
+
+ fields.compare.id = fields.compare.group + '-' + fields.compare.name + '-' + fields.compare.version;
+ fields.compare.id = fields.compare.id.replace(/\./g, '_');
var entry = sourceEntry;
if (entry.parameter && entry.parameter.fields)
- fields._hasTypeInParameterFields = _hasTypeInFields(
- entry.parameter.fields
- );
+ fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields);
if (entry.error && entry.error.fields)
- fields._hasTypeInErrorFields = _hasTypeInFields(
- entry.error.fields
- );
+ fields._hasTypeInErrorFields = _hasTypeInFields(entry.error.fields);
if (entry.success && entry.success.fields)
- fields._hasTypeInSuccessFields = _hasTypeInFields(
- entry.success.fields
- );
+ fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields);
if (entry.info && entry.info.fields)
- fields._hasTypeInInfoFields = _hasTypeInFields(
- entry.info.fields
- );
+ fields._hasTypeInInfoFields = _hasTypeInFields(entry.info.fields);
var entry = compareEntry;
- if (
- fields._hasTypeInParameterFields !== true &&
- entry.parameter &&
- entry.parameter.fields
- )
- fields._hasTypeInParameterFields = _hasTypeInFields(
- entry.parameter.fields
- );
-
- if (
- fields._hasTypeInErrorFields !== true &&
- entry.error &&
- entry.error.fields
- )
- fields._hasTypeInErrorFields = _hasTypeInFields(
- entry.error.fields
- );
-
- if (
- fields._hasTypeInSuccessFields !== true &&
- entry.success &&
- entry.success.fields
- )
- fields._hasTypeInSuccessFields = _hasTypeInFields(
- entry.success.fields
- );
-
- if (
- fields._hasTypeInInfoFields !== true &&
- entry.info &&
- entry.info.fields
- )
- fields._hasTypeInInfoFields = _hasTypeInFields(
- entry.info.fields
- );
+ if (fields._hasTypeInParameterFields !== true && entry.parameter && entry.parameter.fields)
+ fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields);
+
+ if (fields._hasTypeInErrorFields !== true && entry.error && entry.error.fields)
+ fields._hasTypeInErrorFields = _hasTypeInFields(entry.error.fields);
+
+ if (fields._hasTypeInSuccessFields !== true && entry.success && entry.success.fields)
+ fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields);
+
+ if (fields._hasTypeInInfoFields !== true && entry.info && entry.info.fields)
+ fields._hasTypeInInfoFields = _hasTypeInFields(entry.info.fields);
var content = templateCompareArticle(fields);
$root.after(content);
var $content = $root.next();
// Event on.click re-assign
- $content
- .find(".versions li.version a")
- .on("click", changeVersionCompareTo);
+ $content.find('.versions li.version a').on('click', changeVersionCompareTo);
// select navigation
- $(
- "#sidenav li[data-group='" +
- group +
- "'][data-name='" +
- name +
- "'][data-version='" +
- currentVersion +
- "']"
- ).addClass("has-modifications");
+ $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + currentVersion + '\']').addClass('has-modifications');
$root.remove();
// TODO: on change main version or select the highest version re-render
@@ -803,19 +655,18 @@ require([
*/
function changeAllVersionCompareTo(e) {
e.preventDefault();
- $("article:visible .versions").each(function() {
- var $root = $(this).parents("article");
- var currentVersion = $root.data("version");
+ $('article:visible .versions').each(function(){
+ var $root = $(this).parents('article');
+ var currentVersion = $root.data('version');
var $foundElement = null;
- $(this)
- .find("li.version a")
- .each(function() {
- var selectVersion = $(this).html();
- if (selectVersion < currentVersion && !$foundElement)
- $foundElement = $(this);
- });
+ $(this).find('li.version a').each(function() {
+ var selectVersion = $(this).html();
+ if (selectVersion < currentVersion && ! $foundElement)
+ $foundElement = $(this);
+ });
- if ($foundElement) $foundElement.trigger("click");
+ if($foundElement)
+ $foundElement.trigger('click');
});
initDynamic();
}
@@ -824,33 +675,24 @@ require([
* Sort the fields.
*/
function sortFields(fields_object) {
- $.each(fields_object, function(key, fields) {
- var reversed = fields.slice().reverse();
+ $.each(fields_object, function (key, fields) {
- var max_dot_count = Math.max.apply(
- null,
- reversed.map(function(item) {
- return item.field.split(".").length - 1;
- })
- );
+ var reversed = fields.slice().reverse()
+
+ var max_dot_count = Math.max.apply(null, reversed.map(function (item) {
+ return item.field.split(".").length - 1;
+ }))
for (var dot_count = 1; dot_count <= max_dot_count; dot_count++) {
- reversed.forEach(function(item, index) {
+ reversed.forEach(function (item, index) {
var parts = item.field.split(".");
if (parts.length - 1 == dot_count) {
- var fields_names = fields.map(function(item) {
- return item.field;
- });
- if (parts.slice(1).length >= 1) {
- var prefix = parts
- .slice(0, parts.length - 1)
- .join(".");
+ var fields_names = fields.map(function (item) { return item.field; });
+ if (parts.slice(1).length >= 1) {
+ var prefix = parts.slice(0, parts.length - 1).join(".");
var prefix_index = fields_names.indexOf(prefix);
if (prefix_index > -1) {
- fields.splice(
- fields_names.indexOf(item.field),
- 1
- );
+ fields.splice(fields_names.indexOf(item.field), 1);
fields.splice(prefix_index + 1, 0, item);
}
}
@@ -866,26 +708,17 @@ require([
function addArticleSettings(fields, entry) {
// add unique id
// TODO: replace all group-name-version in template with id.
- fields.id =
- fields.article.group +
- "-" +
- fields.article.name +
- "-" +
- fields.article.version;
- fields.id = fields.id.replace(/\./g, "_");
+ fields.id = fields.article.group + '-' + fields.article.name + '-' + fields.article.version;
+ fields.id = fields.id.replace(/\./g, '_');
if (entry.header && entry.header.fields) {
sortFields(entry.header.fields);
- fields._hasTypeInHeaderFields = _hasTypeInFields(
- entry.header.fields
- );
+ fields._hasTypeInHeaderFields = _hasTypeInFields(entry.header.fields);
}
if (entry.parameter && entry.parameter.fields) {
sortFields(entry.parameter.fields);
- fields._hasTypeInParameterFields = _hasTypeInFields(
- entry.parameter.fields
- );
+ fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields);
}
if (entry.error && entry.error.fields) {
@@ -895,9 +728,7 @@ require([
if (entry.success && entry.success.fields) {
sortFields(entry.success.fields);
- fields._hasTypeInSuccessFields = _hasTypeInFields(
- entry.success.fields
- );
+ fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields);
}
if (entry.info && entry.info.fields) {
@@ -915,7 +746,8 @@ require([
function renderArticle(group, name, version) {
var entry = {};
$.each(apiByGroupAndName[group][name], function(index, currentEntry) {
- if (currentEntry.version === version) entry = currentEntry;
+ if (currentEntry.version === version)
+ entry = currentEntry;
});
var fields = {
article: entry,
@@ -931,32 +763,16 @@ require([
* Render original Article and remove the current visible Article.
*/
function resetArticle(group, name, version) {
- var $root = $(
- "article[data-group='" +
- group +
- "'][data-name='" +
- name +
- "']:visible"
- );
+ var $root = $('article[data-group=\'' + group + '\'][data-name=\'' + name + '\']:visible');
var content = renderArticle(group, name, version);
$root.after(content);
var $content = $root.next();
// Event on.click muss neu zugewiesen werden (sollte eigentlich mit on automatisch funktionieren... sollte)
- $content
- .find(".versions li.version a")
- .on("click", changeVersionCompareTo);
-
- $(
- "#sidenav li[data-group='" +
- group +
- "'][data-name='" +
- name +
- "'][data-version='" +
- version +
- "']"
- ).removeClass("has-modifications");
+ $content.find('.versions li.version a').on('click', changeVersionCompareTo);
+
+ $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('has-modifications');
$root.remove();
return;
@@ -969,10 +785,10 @@ require([
WebFont.load({
active: function() {
// Update scrollspy
- $(window).scrollspy("refresh");
+ $(window).scrollspy('refresh')
},
google: {
- families: ["Source Code Pro", "Source Sans Pro:n4,n6,n7"]
+ families: ['Source Code Pro', 'Source Sans Pro:n4,n6,n7']
}
});
}
@@ -986,22 +802,26 @@ require([
*/
function sortByOrder(elements, order, splitBy) {
var results = [];
- order.forEach(function(name) {
+ order.forEach (function(name) {
if (splitBy)
- elements.forEach(function(element) {
+ elements.forEach (function(element) {
var parts = element.split(splitBy);
var key = parts[1]; // reference keep for sorting
- if (key == name) results.push(element);
+ if (key == name)
+ results.push(element);
});
else
- elements.forEach(function(key) {
- if (key == name) results.push(name);
+ elements.forEach (function(key) {
+ if (key == name)
+ results.push(name);
});
});
// Append all other entries that ar not defined in order
elements.forEach(function(element) {
- if (results.indexOf(element) === -1) results.push(element);
+ if (results.indexOf(element) === -1)
+ results.push(element);
});
return results;
}
+
});
diff --git a/docs/api/utils/handlebars_helper.js b/docs/api/utils/handlebars_helper.js
index dee3afed..a5d5c4fd 100644
--- a/docs/api/utils/handlebars_helper.js
+++ b/docs/api/utils/handlebars_helper.js
@@ -1,29 +1,22 @@
-define(["locales", "handlebars", "diffMatchPatch"], function(
- locale,
- Handlebars,
- DiffMatchPatch
-) {
+define([
+ 'locales',
+ 'handlebars',
+ 'diffMatchPatch'
+], function(locale, Handlebars, DiffMatchPatch) {
+
/**
* Return a text as markdown.
* Currently only a little helper to replace apidoc-inline Links (#Group:Name).
* Should be replaced with a full markdown lib.
* @param string text
*/
- Handlebars.registerHelper("markdown", function(text) {
- if (!text) {
- return text;
+ Handlebars.registerHelper('markdown', function(text) {
+ if ( ! text ) {
+ return text;
}
- text = text.replace(/((\[(.*?)\])?\(#)((.+?):(.+?))(\))/gm, function(
- match,
- p1,
- p2,
- p3,
- p4,
- p5,
- p6
- ) {
- var link = p3 || p5 + "/" + p6;
- return '' + link + " ";
+ text = text.replace(/((\[(.*?)\])?\(#)((.+?):(.+?))(\))/mg, function(match, p1, p2, p3, p4, p5, p6) {
+ var link = p3 || p5 + '/' + p6;
+ return '' + link + ' ';
});
return text;
});
@@ -32,21 +25,21 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
* start/stop timer for simple performance check.
*/
var timer;
- Handlebars.registerHelper("startTimer", function(text) {
+ Handlebars.registerHelper('startTimer', function(text) {
timer = new Date();
- return "";
+ return '';
});
- Handlebars.registerHelper("stopTimer", function(text) {
+ Handlebars.registerHelper('stopTimer', function(text) {
console.log(new Date() - timer);
- return "";
+ return '';
});
/**
* Return localized Text.
* @param string text
*/
- Handlebars.registerHelper("__", function(text) {
+ Handlebars.registerHelper('__', function(text) {
return locale.__(text);
});
@@ -54,55 +47,50 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
* Console log.
* @param mixed obj
*/
- Handlebars.registerHelper("cl", function(obj) {
+ Handlebars.registerHelper('cl', function(obj) {
console.log(obj);
- return "";
+ return '';
});
/**
* Replace underscore with space.
* @param string text
*/
- Handlebars.registerHelper("underscoreToSpace", function(text) {
- return text.replace(/(_+)/g, " ");
+ Handlebars.registerHelper('underscoreToSpace', function(text) {
+ return text.replace(/(_+)/g, ' ');
});
/**
*
*/
- Handlebars.registerHelper("assign", function(name) {
- if (arguments.length > 0) {
- var type = typeof arguments[1];
+ Handlebars.registerHelper('assign', function(name) {
+ if(arguments.length > 0) {
+ var type = typeof(arguments[1]);
var arg = null;
- if (type === "string" || type === "number" || type === "boolean")
- arg = arguments[1];
- Handlebars.registerHelper(name, function() {
- return arg;
- });
+ if(type === 'string' || type === 'number' || type === 'boolean') arg = arguments[1];
+ Handlebars.registerHelper(name, function() { return arg; });
}
- return "";
+ return '';
});
/**
*
*/
- Handlebars.registerHelper("nl2br", function(text) {
+ Handlebars.registerHelper('nl2br', function(text) {
return _handlebarsNewlineToBreak(text);
});
/**
*
*/
- Handlebars.registerHelper("if_eq", function(context, options) {
+ Handlebars.registerHelper('if_eq', function(context, options) {
var compare = context;
// Get length if context is an object
- if (
- context instanceof Object &&
- !(options.hash.compare instanceof Object)
- )
- compare = Object.keys(context).length;
+ if (context instanceof Object && ! (options.hash.compare instanceof Object))
+ compare = Object.keys(context).length;
- if (compare === options.hash.compare) return options.fn(this);
+ if (compare === options.hash.compare)
+ return options.fn(this);
return options.inverse(this);
});
@@ -110,16 +98,14 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
/**
*
*/
- Handlebars.registerHelper("if_gt", function(context, options) {
+ Handlebars.registerHelper('if_gt', function(context, options) {
var compare = context;
// Get length if context is an object
- if (
- context instanceof Object &&
- !(options.hash.compare instanceof Object)
- )
- compare = Object.keys(context).length;
+ if (context instanceof Object && ! (options.hash.compare instanceof Object))
+ compare = Object.keys(context).length;
- if (compare > options.hash.compare) return options.fn(this);
+ if(compare > options.hash.compare)
+ return options.fn(this);
return options.inverse(this);
});
@@ -128,36 +114,28 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
*
*/
var templateCache = {};
- Handlebars.registerHelper("subTemplate", function(name, sourceContext) {
- if (!templateCache[name])
- templateCache[name] = Handlebars.compile(
- $("#template-" + name).html()
- );
+ Handlebars.registerHelper('subTemplate', function(name, sourceContext) {
+ if ( ! templateCache[name])
+ templateCache[name] = Handlebars.compile($('#template-' + name).html());
var template = templateCache[name];
var templateContext = $.extend({}, this, sourceContext.hash);
- return new Handlebars.SafeString(template(templateContext));
+ return new Handlebars.SafeString( template(templateContext) );
});
/**
*
*/
- Handlebars.registerHelper("toLowerCase", function(value) {
- return value && typeof value === "string" ? value.toLowerCase() : "";
+ Handlebars.registerHelper('toLowerCase', function(value) {
+ return (value && typeof value === 'string') ? value.toLowerCase() : '';
});
/**
*
*/
- Handlebars.registerHelper("splitFill", function(
- value,
- splitChar,
- fillChar
- ) {
+ Handlebars.registerHelper('splitFill', function(value, splitChar, fillChar) {
var splits = value.split(splitChar);
- return (
- new Array(splits.length).join(fillChar) + splits[splits.length - 1]
- );
+ return new Array(splits.length).join(fillChar) + splits[splits.length - 1];
});
/**
@@ -167,26 +145,19 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
* @returns {String}
*/
function _handlebarsNewlineToBreak(text) {
- return ("" + text).replace(
- /([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,
- "$1" + " " + "$2"
- );
+ return ('' + text).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + ' ' + '$2');
}
/**
*
*/
- Handlebars.registerHelper("each_compare_list_field", function(
- source,
- compare,
- options
- ) {
+ Handlebars.registerHelper('each_compare_list_field', function(source, compare, options) {
var fieldName = options.hash.field;
var newSource = [];
if (source) {
source.forEach(function(entry) {
var values = entry;
- values["key"] = entry[fieldName];
+ values['key'] = entry[fieldName];
newSource.push(values);
});
}
@@ -195,28 +166,24 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
if (compare) {
compare.forEach(function(entry) {
var values = entry;
- values["key"] = entry[fieldName];
+ values['key'] = entry[fieldName];
newCompare.push(values);
});
}
- return _handlebarsEachCompared("key", newSource, newCompare, options);
+ return _handlebarsEachCompared('key', newSource, newCompare, options);
});
/**
*
*/
- Handlebars.registerHelper("each_compare_keys", function(
- source,
- compare,
- options
- ) {
+ Handlebars.registerHelper('each_compare_keys', function(source, compare, options) {
var newSource = [];
if (source) {
var sourceFields = Object.keys(source);
sourceFields.forEach(function(name) {
var values = {};
- values["value"] = source[name];
- values["key"] = name;
+ values['value'] = source[name];
+ values['key'] = name;
newSource.push(values);
});
}
@@ -226,65 +193,62 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
var compareFields = Object.keys(compare);
compareFields.forEach(function(name) {
var values = {};
- values["value"] = compare[name];
- values["key"] = name;
+ values['value'] = compare[name];
+ values['key'] = name;
newCompare.push(values);
});
}
- return _handlebarsEachCompared("key", newSource, newCompare, options);
+ return _handlebarsEachCompared('key', newSource, newCompare, options);
});
/**
*
*/
- Handlebars.registerHelper("each_compare_field", function(
- source,
- compare,
- options
- ) {
- return _handlebarsEachCompared("field", source, compare, options);
+ Handlebars.registerHelper('each_compare_field', function(source, compare, options) {
+ return _handlebarsEachCompared('field', source, compare, options);
});
/**
*
*/
- Handlebars.registerHelper("each_compare_title", function(
- source,
- compare,
- options
- ) {
- return _handlebarsEachCompared("title", source, compare, options);
+ Handlebars.registerHelper('each_compare_title', function(source, compare, options) {
+ return _handlebarsEachCompared('title', source, compare, options);
});
/**
*
*/
- Handlebars.registerHelper("reformat", function(source, type) {
- if (type == "json")
+ Handlebars.registerHelper('reformat', function(source, type){
+ if (type == 'json')
try {
- return JSON.stringify(JSON.parse(source.trim()), null, " ");
- } catch (e) {}
- return source;
+ return JSON.stringify(JSON.parse(source.trim()),null, " ");
+ } catch(e) {
+
+ }
+ return source
});
/**
*
*/
- Handlebars.registerHelper("showDiff", function(source, compare, options) {
- var ds = "";
- if (source === compare) {
+ Handlebars.registerHelper('showDiff', function(source, compare, options) {
+ var ds = '';
+ if(source === compare) {
ds = source;
} else {
- if (!source) return compare;
+ if( ! source)
+ return compare;
- if (!compare) return source;
+ if( ! compare)
+ return source;
var d = diffMatchPatch.diff_main(compare, source);
diffMatchPatch.diff_cleanupSemantic(d);
ds = diffMatchPatch.diff_prettyHtml(d);
- ds = ds.replace(/¶/gm, "");
+ ds = ds.replace(/¶/gm, '');
}
- if (options === "nl2br") ds = _handlebarsNewlineToBreak(ds);
+ if(options === 'nl2br')
+ ds = _handlebarsNewlineToBreak(ds);
return ds;
});
@@ -292,17 +256,16 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
/**
*
*/
- function _handlebarsEachCompared(fieldname, source, compare, options) {
+ function _handlebarsEachCompared(fieldname, source, compare, options)
+ {
var dataList = [];
var index = 0;
- if (source) {
+ if(source) {
source.forEach(function(sourceEntry) {
var found = false;
if (compare) {
compare.forEach(function(compareEntry) {
- if (
- sourceEntry[fieldname] === compareEntry[fieldname]
- ) {
+ if(sourceEntry[fieldname] === compareEntry[fieldname]) {
var data = {
typeSame: true,
source: sourceEntry,
@@ -315,7 +278,7 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
}
});
}
- if (!found) {
+ if ( ! found) {
var data = {
typeIns: true,
source: sourceEntry,
@@ -332,11 +295,11 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
var found = false;
if (source) {
source.forEach(function(sourceEntry) {
- if (sourceEntry[fieldname] === compareEntry[fieldname])
+ if(sourceEntry[fieldname] === compareEntry[fieldname])
found = true;
});
}
- if (!found) {
+ if ( ! found) {
var data = {
typeDel: true,
compare: compareEntry,
@@ -348,10 +311,11 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
});
}
- var ret = "";
+ var ret = '';
var length = dataList.length;
for (var index in dataList) {
- if (index == length - 1) dataList[index]["_last"] = true;
+ if(index == (length - 1))
+ dataList[index]['_last'] = true;
ret = ret + options.fn(dataList[index]);
}
return ret;
@@ -363,32 +327,29 @@ define(["locales", "handlebars", "diffMatchPatch"], function(
* Overwrite Colors
*/
DiffMatchPatch.prototype.diff_prettyHtml = function(diffs) {
- var html = [];
- var pattern_amp = /&/g;
- var pattern_lt = //g;
- var pattern_para = /\n/g;
- for (var x = 0; x < diffs.length; x++) {
- var op = diffs[x][0]; // Operation (insert, delete, equal)
- var data = diffs[x][1]; // Text of change.
- var text = data
- .replace(pattern_amp, "&")
- .replace(pattern_lt, "<")
- .replace(pattern_gt, ">")
- .replace(pattern_para, "¶ ");
- switch (op) {
- case DIFF_INSERT:
- html[x] = "" + text + " ";
- break;
- case DIFF_DELETE:
- html[x] = "" + text + "";
- break;
- case DIFF_EQUAL:
- html[x] = "" + text + " ";
- break;
- }
+ var html = [];
+ var pattern_amp = /&/g;
+ var pattern_lt = //g;
+ var pattern_para = /\n/g;
+ for (var x = 0; x < diffs.length; x++) {
+ var op = diffs[x][0]; // Operation (insert, delete, equal)
+ var data = diffs[x][1]; // Text of change.
+ var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')
+ .replace(pattern_gt, '>').replace(pattern_para, '¶ ');
+ switch (op) {
+ case DIFF_INSERT:
+ html[x] = '' + text + ' ';
+ break;
+ case DIFF_DELETE:
+ html[x] = '' + text + '';
+ break;
+ case DIFF_EQUAL:
+ html[x] = '' + text + ' ';
+ break;
}
- return html.join("");
+ }
+ return html.join('');
};
// Exports
diff --git a/docs/api/utils/send_sample_request.js b/docs/api/utils/send_sample_request.js
index 673cb12e..f2396ea9 100755
--- a/docs/api/utils/send_sample_request.js
+++ b/docs/api/utils/send_sample_request.js
@@ -1,206 +1,184 @@
-define(["jquery", "lodash"], function($, _) {
- var initDynamic = function() {
- // Button send
- $(".sample-request-send").off("click");
- $(".sample-request-send").on("click", function(e) {
- e.preventDefault();
- var $root = $(this).parents("article");
- var group = $root.data("group");
- var name = $root.data("name");
- var version = $root.data("version");
- sendSampleRequest(
- group,
- name,
- version,
- $(this).data("sample-request-type")
- );
- });
-
- // Button clear
- $(".sample-request-clear").off("click");
- $(".sample-request-clear").on("click", function(e) {
- e.preventDefault();
- var $root = $(this).parents("article");
- var group = $root.data("group");
- var name = $root.data("name");
- var version = $root.data("version");
- clearSampleRequest(group, name, version);
- });
- }; // initDynamic
-
- function sendSampleRequest(group, name, version, type) {
- var $root = $(
- 'article[data-group="' +
- group +
- '"][data-name="' +
- name +
- '"][data-version="' +
- version +
- '"]'
- );
-
- // Optional header
- var header = {};
- $root.find(".sample-request-header:checked").each(function(i, element) {
- var group = $(element).data("sample-request-header-group-id");
- $root
- .find('[data-sample-request-header-group="' + group + '"]')
- .each(function(i, element) {
- var key = $(element).data("sample-request-header-name");
- var value = element.value;
- if (!element.optional && element.defaultValue !== "") {
- value = element.defaultValue;
- }
- header[key] = value;
- });
- });
-
- // create JSON dictionary of parameters
- var param = {};
- var paramType = {};
- $root.find(".sample-request-param:checked").each(function(i, element) {
- var group = $(element).data("sample-request-param-group-id");
- $root
- .find('[data-sample-request-param-group="' + group + '"]')
- .not(function() {
- return (
- $(this).val() == "" &&
- $(this).is(
- "[data-sample-request-param-optional='true']"
- )
- );
- })
- .each(function(i, element) {
- var key = $(element).data("sample-request-param-name");
- var value = element.value;
- if (!element.optional && element.defaultValue !== "") {
- value = element.defaultValue;
- }
- param[key] = value;
- paramType[key] = $(element)
- .next()
- .text();
- });
- });
-
- // grab user-inputted URL
- var url = $root.find(".sample-request-url").val();
-
- // Insert url parameter
- var pattern = pathToRegexp(url, null);
- var matches = pattern.exec(url);
- for (var i = 1; i < matches.length; i++) {
- var key = matches[i].substr(1);
- if (param[key] !== undefined) {
- url = url.replace(matches[i], encodeURIComponent(param[key]));
-
- // remove URL parameters from list
- delete param[key];
+define([
+ 'jquery',
+ 'lodash'
+], function($, _) {
+
+ var initDynamic = function() {
+ // Button send
+ $(".sample-request-send").off("click");
+ $(".sample-request-send").on("click", function(e) {
+ e.preventDefault();
+ var $root = $(this).parents("article");
+ var group = $root.data("group");
+ var name = $root.data("name");
+ var version = $root.data("version");
+ sendSampleRequest(group, name, version, $(this).data("sample-request-type"));
+ });
+
+ // Button clear
+ $(".sample-request-clear").off("click");
+ $(".sample-request-clear").on("click", function(e) {
+ e.preventDefault();
+ var $root = $(this).parents("article");
+ var group = $root.data("group");
+ var name = $root.data("name");
+ var version = $root.data("version");
+ clearSampleRequest(group, name, version);
+ });
+ }; // initDynamic
+
+ function sendSampleRequest(group, name, version, type)
+ {
+ var $root = $('article[data-group="' + group + '"][data-name="' + name + '"][data-version="' + version + '"]');
+
+ // Optional header
+ var header = {};
+ $root.find(".sample-request-header:checked").each(function(i, element) {
+ var group = $(element).data("sample-request-header-group-id");
+ $root.find("[data-sample-request-header-group=\"" + group + "\"]").each(function(i, element) {
+ var key = $(element).data("sample-request-header-name");
+ var value = element.value;
+ if ( ! element.optional && element.defaultValue !== '') {
+ value = element.defaultValue;
}
- } // for
-
- $root.find(".sample-request-response").fadeTo(250, 1);
- $root.find(".sample-request-response-json").html("Loading...");
- refreshScrollSpy();
-
- _.each(param, function(val, key) {
- var t = paramType[key].toLowerCase();
- if (t === "object" || t === "array") {
- try {
- param[key] = JSON.parse(val);
- } catch (e) {}
- }
- });
-
- // send AJAX request, catch success or error callback
- var ajaxRequest = {
- url: url,
- headers: header,
- data: param,
- type: type.toUpperCase(),
- success: displaySuccess,
- error: displayError
- };
-
- $.ajax(ajaxRequest);
-
- function displaySuccess(data, status, jqXHR) {
- var jsonResponse;
- try {
- jsonResponse = JSON.parse(jqXHR.responseText);
- jsonResponse = JSON.stringify(jsonResponse, null, 4);
- } catch (e) {
- jsonResponse = data;
- }
- $root.find(".sample-request-response-json").html(jsonResponse);
- refreshScrollSpy();
- }
-
- function displayError(jqXHR, textStatus, error) {
- var message = "Error " + jqXHR.status + ": " + error;
- var jsonResponse;
- try {
- jsonResponse = JSON.parse(jqXHR.responseText);
- jsonResponse = JSON.stringify(jsonResponse, null, 4);
- } catch (e) {
- jsonResponse = escape(jqXHR.responseText);
+ header[key] = value;
+ });
+ });
+
+ // create JSON dictionary of parameters
+ var param = {};
+ var paramType = {};
+ $root.find(".sample-request-param:checked").each(function(i, element) {
+ var group = $(element).data("sample-request-param-group-id");
+ $root.find("[data-sample-request-param-group=\"" + group + "\"]").not(function(){
+ return $(this).val() == "" && $(this).is("[data-sample-request-param-optional='true']");
+ }).each(function(i, element) {
+ var key = $(element).data("sample-request-param-name");
+ var value = element.value;
+ if ( ! element.optional && element.defaultValue !== '') {
+ value = element.defaultValue;
}
+ param[key] = value;
+ paramType[key] = $(element).next().text();
+ });
+ });
+
+ // grab user-inputted URL
+ var url = $root.find(".sample-request-url").val();
+
+ // Insert url parameter
+ var pattern = pathToRegexp(url, null);
+ var matches = pattern.exec(url);
+ for (var i = 1; i < matches.length; i++) {
+ var key = matches[i].substr(1);
+ if (param[key] !== undefined) {
+ url = url.replace(matches[i], encodeURIComponent(param[key]));
+
+ // remove URL parameters from list
+ delete param[key];
+ }
+ } // for
+
+ $root.find(".sample-request-response").fadeTo(250, 1);
+ $root.find(".sample-request-response-json").html("Loading...");
+ refreshScrollSpy();
+
+ _.each( param, function( val, key ) {
+ var t = paramType[ key ].toLowerCase();
+ if ( t === 'object' || t === 'array' ) {
+ try {
+ param[ key ] = JSON.parse( val );
+ } catch (e) {
+ }
+ }
+ });
+
+ // send AJAX request, catch success or error callback
+ var ajaxRequest = {
+ url : url,
+ headers : header,
+ data : param,
+ type : type.toUpperCase(),
+ success : displaySuccess,
+ error : displayError
+ };
+
+ $.ajax(ajaxRequest);
+
+
+ function displaySuccess(data, status, jqXHR) {
+ var jsonResponse;
+ try {
+ jsonResponse = JSON.parse(jqXHR.responseText);
+ jsonResponse = JSON.stringify(jsonResponse, null, 4);
+ } catch (e) {
+ jsonResponse = data;
+ }
+ $root.find(".sample-request-response-json").html(jsonResponse);
+ refreshScrollSpy();
+ };
+
+ function displayError(jqXHR, textStatus, error) {
+ var message = "Error " + jqXHR.status + ": " + error;
+ var jsonResponse;
+ try {
+ jsonResponse = JSON.parse(jqXHR.responseText);
+ jsonResponse = JSON.stringify(jsonResponse, null, 4);
+ } catch (e) {
+ jsonResponse = escape(jqXHR.responseText);
+ }
+
+ if (jsonResponse)
+ message += " " + jsonResponse;
+
+ // flicker on previous error to make clear that there is a new response
+ if($root.find(".sample-request-response").is(":visible"))
+ $root.find(".sample-request-response").fadeTo(1, 0.1);
+
+ $root.find(".sample-request-response").fadeTo(250, 1);
+ $root.find(".sample-request-response-json").html(message);
+ refreshScrollSpy();
+ };
+ }
+
+ function clearSampleRequest(group, name, version)
+ {
+ var $root = $('article[data-group="' + group + '"][data-name="' + name + '"][data-version="' + version + '"]');
+
+ // hide sample response
+ $root.find(".sample-request-response-json").html("");
+ $root.find(".sample-request-response").hide();
+
+ // reset value of parameters
+ $root.find(".sample-request-param").each(function(i, element) {
+ element.value = "";
+ });
+
+ // restore default URL
+ var $urlElement = $root.find(".sample-request-url");
+ $urlElement.val($urlElement.prop("defaultValue"));
+
+ refreshScrollSpy();
+ }
+
+ function refreshScrollSpy()
+ {
+ $('[data-spy="scroll"]').each(function () {
+ $(this).scrollspy("refresh");
+ });
+ }
+
+ function escapeHtml(str) {
+ var div = document.createElement("div");
+ div.appendChild(document.createTextNode(str));
+ return div.innerHTML;
+ }
+
+ /**
+ * Exports.
+ */
+ return {
+ initDynamic: initDynamic
+ };
- if (jsonResponse) message += " " + jsonResponse;
-
- // flicker on previous error to make clear that there is a new response
- if ($root.find(".sample-request-response").is(":visible"))
- $root.find(".sample-request-response").fadeTo(1, 0.1);
-
- $root.find(".sample-request-response").fadeTo(250, 1);
- $root.find(".sample-request-response-json").html(message);
- refreshScrollSpy();
- }
- }
-
- function clearSampleRequest(group, name, version) {
- var $root = $(
- 'article[data-group="' +
- group +
- '"][data-name="' +
- name +
- '"][data-version="' +
- version +
- '"]'
- );
-
- // hide sample response
- $root.find(".sample-request-response-json").html("");
- $root.find(".sample-request-response").hide();
-
- // reset value of parameters
- $root.find(".sample-request-param").each(function(i, element) {
- element.value = "";
- });
-
- // restore default URL
- var $urlElement = $root.find(".sample-request-url");
- $urlElement.val($urlElement.prop("defaultValue"));
-
- refreshScrollSpy();
- }
-
- function refreshScrollSpy() {
- $('[data-spy="scroll"]').each(function() {
- $(this).scrollspy("refresh");
- });
- }
-
- function escapeHtml(str) {
- var div = document.createElement("div");
- div.appendChild(document.createTextNode(str));
- return div.innerHTML;
- }
-
- /**
- * Exports.
- */
- return {
- initDynamic: initDynamic
- };
});
diff --git a/docs/api/vendor/bootstrap.min.js b/docs/api/vendor/bootstrap.min.js
index 19489981..9bcd2fcc 100644
--- a/docs/api/vendor/bootstrap.min.js
+++ b/docs/api/vendor/bootstrap.min.js
@@ -3,1900 +3,5 @@
* Copyright 2011-2016 Twitter, Inc.
* Licensed under the MIT license
*/
-if ("undefined" == typeof jQuery)
- throw new Error("Bootstrap's JavaScript requires jQuery");
-+(function(a) {
- "use strict";
- var b = a.fn.jquery.split(" ")[0].split(".");
- if (
- (b[0] < 2 && b[1] < 9) ||
- (1 == b[0] && 9 == b[1] && b[2] < 1) ||
- b[0] > 3
- )
- throw new Error(
- "Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4"
- );
-})(jQuery),
- +(function(a) {
- "use strict";
- function b() {
- var a = document.createElement("bootstrap"),
- b = {
- WebkitTransition: "webkitTransitionEnd",
- MozTransition: "transitionend",
- OTransition: "oTransitionEnd otransitionend",
- transition: "transitionend"
- };
- for (var c in b) if (void 0 !== a.style[c]) return { end: b[c] };
- return !1;
- }
- (a.fn.emulateTransitionEnd = function(b) {
- var c = !1,
- d = this;
- a(this).one("bsTransitionEnd", function() {
- c = !0;
- });
- var e = function() {
- c || a(d).trigger(a.support.transition.end);
- };
- return setTimeout(e, b), this;
- }),
- a(function() {
- (a.support.transition = b()),
- a.support.transition &&
- (a.event.special.bsTransitionEnd = {
- bindType: a.support.transition.end,
- delegateType: a.support.transition.end,
- handle: function(b) {
- if (a(b.target).is(this))
- return b.handleObj.handler.apply(
- this,
- arguments
- );
- }
- });
- });
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- return this.each(function() {
- var c = a(this),
- e = c.data("bs.alert");
- e || c.data("bs.alert", (e = new d(this))),
- "string" == typeof b && e[b].call(c);
- });
- }
- var c = '[data-dismiss="alert"]',
- d = function(b) {
- a(b).on("click", c, this.close);
- };
- (d.VERSION = "3.3.7"),
- (d.TRANSITION_DURATION = 150),
- (d.prototype.close = function(b) {
- function c() {
- g.detach()
- .trigger("closed.bs.alert")
- .remove();
- }
- var e = a(this),
- f = e.attr("data-target");
- f ||
- ((f = e.attr("href")),
- (f = f && f.replace(/.*(?=#[^\s]*$)/, "")));
- var g = a("#" === f ? [] : f);
- b && b.preventDefault(),
- g.length || (g = e.closest(".alert")),
- g.trigger((b = a.Event("close.bs.alert"))),
- b.isDefaultPrevented() ||
- (g.removeClass("in"),
- a.support.transition && g.hasClass("fade")
- ? g
- .one("bsTransitionEnd", c)
- .emulateTransitionEnd(d.TRANSITION_DURATION)
- : c());
- });
- var e = a.fn.alert;
- (a.fn.alert = b),
- (a.fn.alert.Constructor = d),
- (a.fn.alert.noConflict = function() {
- return (a.fn.alert = e), this;
- }),
- a(document).on("click.bs.alert.data-api", c, d.prototype.close);
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- return this.each(function() {
- var d = a(this),
- e = d.data("bs.button"),
- f = "object" == typeof b && b;
- e || d.data("bs.button", (e = new c(this, f))),
- "toggle" == b ? e.toggle() : b && e.setState(b);
- });
- }
- var c = function(b, d) {
- (this.$element = a(b)),
- (this.options = a.extend({}, c.DEFAULTS, d)),
- (this.isLoading = !1);
- };
- (c.VERSION = "3.3.7"),
- (c.DEFAULTS = { loadingText: "loading..." }),
- (c.prototype.setState = function(b) {
- var c = "disabled",
- d = this.$element,
- e = d.is("input") ? "val" : "html",
- f = d.data();
- (b += "Text"),
- null == f.resetText && d.data("resetText", d[e]()),
- setTimeout(
- a.proxy(function() {
- d[e](null == f[b] ? this.options[b] : f[b]),
- "loadingText" == b
- ? ((this.isLoading = !0),
- d
- .addClass(c)
- .attr(c, c)
- .prop(c, !0))
- : this.isLoading &&
- ((this.isLoading = !1),
- d
- .removeClass(c)
- .removeAttr(c)
- .prop(c, !1));
- }, this),
- 0
- );
- }),
- (c.prototype.toggle = function() {
- var a = !0,
- b = this.$element.closest('[data-toggle="buttons"]');
- if (b.length) {
- var c = this.$element.find("input");
- "radio" == c.prop("type")
- ? (c.prop("checked") && (a = !1),
- b.find(".active").removeClass("active"),
- this.$element.addClass("active"))
- : "checkbox" == c.prop("type") &&
- (c.prop("checked") !==
- this.$element.hasClass("active") && (a = !1),
- this.$element.toggleClass("active")),
- c.prop("checked", this.$element.hasClass("active")),
- a && c.trigger("change");
- } else
- this.$element.attr(
- "aria-pressed",
- !this.$element.hasClass("active")
- ),
- this.$element.toggleClass("active");
- });
- var d = a.fn.button;
- (a.fn.button = b),
- (a.fn.button.Constructor = c),
- (a.fn.button.noConflict = function() {
- return (a.fn.button = d), this;
- }),
- a(document)
- .on(
- "click.bs.button.data-api",
- '[data-toggle^="button"]',
- function(c) {
- var d = a(c.target).closest(".btn");
- b.call(d, "toggle"),
- a(c.target).is(
- 'input[type="radio"], input[type="checkbox"]'
- ) ||
- (c.preventDefault(),
- d.is("input,button")
- ? d.trigger("focus")
- : d
- .find("input:visible,button:visible")
- .first()
- .trigger("focus"));
- }
- )
- .on(
- "focus.bs.button.data-api blur.bs.button.data-api",
- '[data-toggle^="button"]',
- function(b) {
- a(b.target)
- .closest(".btn")
- .toggleClass("focus", /^focus(in)?$/.test(b.type));
- }
- );
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- return this.each(function() {
- var d = a(this),
- e = d.data("bs.carousel"),
- f = a.extend(
- {},
- c.DEFAULTS,
- d.data(),
- "object" == typeof b && b
- ),
- g = "string" == typeof b ? b : f.slide;
- e || d.data("bs.carousel", (e = new c(this, f))),
- "number" == typeof b
- ? e.to(b)
- : g
- ? e[g]()
- : f.interval && e.pause().cycle();
- });
- }
- var c = function(b, c) {
- (this.$element = a(b)),
- (this.$indicators = this.$element.find(".carousel-indicators")),
- (this.options = c),
- (this.paused = null),
- (this.sliding = null),
- (this.interval = null),
- (this.$active = null),
- (this.$items = null),
- this.options.keyboard &&
- this.$element.on(
- "keydown.bs.carousel",
- a.proxy(this.keydown, this)
- ),
- "hover" == this.options.pause &&
- !("ontouchstart" in document.documentElement) &&
- this.$element
- .on("mouseenter.bs.carousel", a.proxy(this.pause, this))
- .on(
- "mouseleave.bs.carousel",
- a.proxy(this.cycle, this)
- );
- };
- (c.VERSION = "3.3.7"),
- (c.TRANSITION_DURATION = 600),
- (c.DEFAULTS = {
- interval: 5e3,
- pause: "hover",
- wrap: !0,
- keyboard: !0
- }),
- (c.prototype.keydown = function(a) {
- if (!/input|textarea/i.test(a.target.tagName)) {
- switch (a.which) {
- case 37:
- this.prev();
- break;
- case 39:
- this.next();
- break;
- default:
- return;
- }
- a.preventDefault();
- }
- }),
- (c.prototype.cycle = function(b) {
- return (
- b || (this.paused = !1),
- this.interval && clearInterval(this.interval),
- this.options.interval &&
- !this.paused &&
- (this.interval = setInterval(
- a.proxy(this.next, this),
- this.options.interval
- )),
- this
- );
- }),
- (c.prototype.getItemIndex = function(a) {
- return (
- (this.$items = a.parent().children(".item")),
- this.$items.index(a || this.$active)
- );
- }),
- (c.prototype.getItemForDirection = function(a, b) {
- var c = this.getItemIndex(b),
- d =
- ("prev" == a && 0 === c) ||
- ("next" == a && c == this.$items.length - 1);
- if (d && !this.options.wrap) return b;
- var e = "prev" == a ? -1 : 1,
- f = (c + e) % this.$items.length;
- return this.$items.eq(f);
- }),
- (c.prototype.to = function(a) {
- var b = this,
- c = this.getItemIndex(
- (this.$active = this.$element.find(".item.active"))
- );
- if (!(a > this.$items.length - 1 || a < 0))
- return this.sliding
- ? this.$element.one("slid.bs.carousel", function() {
- b.to(a);
- })
- : c == a
- ? this.pause().cycle()
- : this.slide(
- a > c ? "next" : "prev",
- this.$items.eq(a)
- );
- }),
- (c.prototype.pause = function(b) {
- return (
- b || (this.paused = !0),
- this.$element.find(".next, .prev").length &&
- a.support.transition &&
- (this.$element.trigger(a.support.transition.end),
- this.cycle(!0)),
- (this.interval = clearInterval(this.interval)),
- this
- );
- }),
- (c.prototype.next = function() {
- if (!this.sliding) return this.slide("next");
- }),
- (c.prototype.prev = function() {
- if (!this.sliding) return this.slide("prev");
- }),
- (c.prototype.slide = function(b, d) {
- var e = this.$element.find(".item.active"),
- f = d || this.getItemForDirection(b, e),
- g = this.interval,
- h = "next" == b ? "left" : "right",
- i = this;
- if (f.hasClass("active")) return (this.sliding = !1);
- var j = f[0],
- k = a.Event("slide.bs.carousel", {
- relatedTarget: j,
- direction: h
- });
- if ((this.$element.trigger(k), !k.isDefaultPrevented())) {
- if (
- ((this.sliding = !0),
- g && this.pause(),
- this.$indicators.length)
- ) {
- this.$indicators.find(".active").removeClass("active");
- var l = a(
- this.$indicators.children()[this.getItemIndex(f)]
- );
- l && l.addClass("active");
- }
- var m = a.Event("slid.bs.carousel", {
- relatedTarget: j,
- direction: h
- });
- return (
- a.support.transition && this.$element.hasClass("slide")
- ? (f.addClass(b),
- f[0].offsetWidth,
- e.addClass(h),
- f.addClass(h),
- e
- .one("bsTransitionEnd", function() {
- f
- .removeClass([b, h].join(" "))
- .addClass("active"),
- e.removeClass(
- ["active", h].join(" ")
- ),
- (i.sliding = !1),
- setTimeout(function() {
- i.$element.trigger(m);
- }, 0);
- })
- .emulateTransitionEnd(c.TRANSITION_DURATION))
- : (e.removeClass("active"),
- f.addClass("active"),
- (this.sliding = !1),
- this.$element.trigger(m)),
- g && this.cycle(),
- this
- );
- }
- });
- var d = a.fn.carousel;
- (a.fn.carousel = b),
- (a.fn.carousel.Constructor = c),
- (a.fn.carousel.noConflict = function() {
- return (a.fn.carousel = d), this;
- });
- var e = function(c) {
- var d,
- e = a(this),
- f = a(
- e.attr("data-target") ||
- ((d = e.attr("href")) &&
- d.replace(/.*(?=#[^\s]+$)/, ""))
- );
- if (f.hasClass("carousel")) {
- var g = a.extend({}, f.data(), e.data()),
- h = e.attr("data-slide-to");
- h && (g.interval = !1),
- b.call(f, g),
- h && f.data("bs.carousel").to(h),
- c.preventDefault();
- }
- };
- a(document)
- .on("click.bs.carousel.data-api", "[data-slide]", e)
- .on("click.bs.carousel.data-api", "[data-slide-to]", e),
- a(window).on("load", function() {
- a('[data-ride="carousel"]').each(function() {
- var c = a(this);
- b.call(c, c.data());
- });
- });
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- var c,
- d =
- b.attr("data-target") ||
- ((c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, ""));
- return a(d);
- }
- function c(b) {
- return this.each(function() {
- var c = a(this),
- e = c.data("bs.collapse"),
- f = a.extend(
- {},
- d.DEFAULTS,
- c.data(),
- "object" == typeof b && b
- );
- !e && f.toggle && /show|hide/.test(b) && (f.toggle = !1),
- e || c.data("bs.collapse", (e = new d(this, f))),
- "string" == typeof b && e[b]();
- });
- }
- var d = function(b, c) {
- (this.$element = a(b)),
- (this.options = a.extend({}, d.DEFAULTS, c)),
- (this.$trigger = a(
- '[data-toggle="collapse"][href="#' +
- b.id +
- '"],[data-toggle="collapse"][data-target="#' +
- b.id +
- '"]'
- )),
- (this.transitioning = null),
- this.options.parent
- ? (this.$parent = this.getParent())
- : this.addAriaAndCollapsedClass(
- this.$element,
- this.$trigger
- ),
- this.options.toggle && this.toggle();
- };
- (d.VERSION = "3.3.7"),
- (d.TRANSITION_DURATION = 350),
- (d.DEFAULTS = { toggle: !0 }),
- (d.prototype.dimension = function() {
- var a = this.$element.hasClass("width");
- return a ? "width" : "height";
- }),
- (d.prototype.show = function() {
- if (!this.transitioning && !this.$element.hasClass("in")) {
- var b,
- e =
- this.$parent &&
- this.$parent
- .children(".panel")
- .children(".in, .collapsing");
- if (
- !(
- e &&
- e.length &&
- ((b = e.data("bs.collapse")), b && b.transitioning)
- )
- ) {
- var f = a.Event("show.bs.collapse");
- if (
- (this.$element.trigger(f), !f.isDefaultPrevented())
- ) {
- e &&
- e.length &&
- (c.call(e, "hide"),
- b || e.data("bs.collapse", null));
- var g = this.dimension();
- this.$element
- .removeClass("collapse")
- .addClass("collapsing")
- [g](0)
- .attr("aria-expanded", !0),
- this.$trigger
- .removeClass("collapsed")
- .attr("aria-expanded", !0),
- (this.transitioning = 1);
- var h = function() {
- this.$element
- .removeClass("collapsing")
- .addClass("collapse in")
- [g](""),
- (this.transitioning = 0),
- this.$element.trigger("shown.bs.collapse");
- };
- if (!a.support.transition) return h.call(this);
- var i = a.camelCase(["scroll", g].join("-"));
- this.$element
- .one("bsTransitionEnd", a.proxy(h, this))
- .emulateTransitionEnd(d.TRANSITION_DURATION)
- [g](this.$element[0][i]);
- }
- }
- }
- }),
- (d.prototype.hide = function() {
- if (!this.transitioning && this.$element.hasClass("in")) {
- var b = a.Event("hide.bs.collapse");
- if ((this.$element.trigger(b), !b.isDefaultPrevented())) {
- var c = this.dimension();
- this.$element[c](this.$element[c]())[0].offsetHeight,
- this.$element
- .addClass("collapsing")
- .removeClass("collapse in")
- .attr("aria-expanded", !1),
- this.$trigger
- .addClass("collapsed")
- .attr("aria-expanded", !1),
- (this.transitioning = 1);
- var e = function() {
- (this.transitioning = 0),
- this.$element
- .removeClass("collapsing")
- .addClass("collapse")
- .trigger("hidden.bs.collapse");
- };
- return a.support.transition
- ? void this.$element[c](0)
- .one("bsTransitionEnd", a.proxy(e, this))
- .emulateTransitionEnd(d.TRANSITION_DURATION)
- : e.call(this);
- }
- }
- }),
- (d.prototype.toggle = function() {
- this[this.$element.hasClass("in") ? "hide" : "show"]();
- }),
- (d.prototype.getParent = function() {
- return a(this.options.parent)
- .find(
- '[data-toggle="collapse"][data-parent="' +
- this.options.parent +
- '"]'
- )
- .each(
- a.proxy(function(c, d) {
- var e = a(d);
- this.addAriaAndCollapsedClass(b(e), e);
- }, this)
- )
- .end();
- }),
- (d.prototype.addAriaAndCollapsedClass = function(a, b) {
- var c = a.hasClass("in");
- a.attr("aria-expanded", c),
- b.toggleClass("collapsed", !c).attr("aria-expanded", c);
- });
- var e = a.fn.collapse;
- (a.fn.collapse = c),
- (a.fn.collapse.Constructor = d),
- (a.fn.collapse.noConflict = function() {
- return (a.fn.collapse = e), this;
- }),
- a(document).on(
- "click.bs.collapse.data-api",
- '[data-toggle="collapse"]',
- function(d) {
- var e = a(this);
- e.attr("data-target") || d.preventDefault();
- var f = b(e),
- g = f.data("bs.collapse"),
- h = g ? "toggle" : e.data();
- c.call(f, h);
- }
- );
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- var c = b.attr("data-target");
- c ||
- ((c = b.attr("href")),
- (c =
- c &&
- /#[A-Za-z]/.test(c) &&
- c.replace(/.*(?=#[^\s]*$)/, "")));
- var d = c && a(c);
- return d && d.length ? d : b.parent();
- }
- function c(c) {
- (c && 3 === c.which) ||
- (a(e).remove(),
- a(f).each(function() {
- var d = a(this),
- e = b(d),
- f = { relatedTarget: this };
- e.hasClass("open") &&
- ((c &&
- "click" == c.type &&
- /input|textarea/i.test(c.target.tagName) &&
- a.contains(e[0], c.target)) ||
- (e.trigger((c = a.Event("hide.bs.dropdown", f))),
- c.isDefaultPrevented() ||
- (d.attr("aria-expanded", "false"),
- e
- .removeClass("open")
- .trigger(
- a.Event("hidden.bs.dropdown", f)
- ))));
- }));
- }
- function d(b) {
- return this.each(function() {
- var c = a(this),
- d = c.data("bs.dropdown");
- d || c.data("bs.dropdown", (d = new g(this))),
- "string" == typeof b && d[b].call(c);
- });
- }
- var e = ".dropdown-backdrop",
- f = '[data-toggle="dropdown"]',
- g = function(b) {
- a(b).on("click.bs.dropdown", this.toggle);
- };
- (g.VERSION = "3.3.7"),
- (g.prototype.toggle = function(d) {
- var e = a(this);
- if (!e.is(".disabled, :disabled")) {
- var f = b(e),
- g = f.hasClass("open");
- if ((c(), !g)) {
- "ontouchstart" in document.documentElement &&
- !f.closest(".navbar-nav").length &&
- a(document.createElement("div"))
- .addClass("dropdown-backdrop")
- .insertAfter(a(this))
- .on("click", c);
- var h = { relatedTarget: this };
- if (
- (f.trigger((d = a.Event("show.bs.dropdown", h))),
- d.isDefaultPrevented())
- )
- return;
- e.trigger("focus").attr("aria-expanded", "true"),
- f
- .toggleClass("open")
- .trigger(a.Event("shown.bs.dropdown", h));
- }
- return !1;
- }
- }),
- (g.prototype.keydown = function(c) {
- if (
- /(38|40|27|32)/.test(c.which) &&
- !/input|textarea/i.test(c.target.tagName)
- ) {
- var d = a(this);
- if (
- (c.preventDefault(),
- c.stopPropagation(),
- !d.is(".disabled, :disabled"))
- ) {
- var e = b(d),
- g = e.hasClass("open");
- if ((!g && 27 != c.which) || (g && 27 == c.which))
- return (
- 27 == c.which && e.find(f).trigger("focus"),
- d.trigger("click")
- );
- var h = " li:not(.disabled):visible a",
- i = e.find(".dropdown-menu" + h);
- if (i.length) {
- var j = i.index(c.target);
- 38 == c.which && j > 0 && j--,
- 40 == c.which && j < i.length - 1 && j++,
- ~j || (j = 0),
- i.eq(j).trigger("focus");
- }
- }
- }
- });
- var h = a.fn.dropdown;
- (a.fn.dropdown = d),
- (a.fn.dropdown.Constructor = g),
- (a.fn.dropdown.noConflict = function() {
- return (a.fn.dropdown = h), this;
- }),
- a(document)
- .on("click.bs.dropdown.data-api", c)
- .on("click.bs.dropdown.data-api", ".dropdown form", function(
- a
- ) {
- a.stopPropagation();
- })
- .on("click.bs.dropdown.data-api", f, g.prototype.toggle)
- .on("keydown.bs.dropdown.data-api", f, g.prototype.keydown)
- .on(
- "keydown.bs.dropdown.data-api",
- ".dropdown-menu",
- g.prototype.keydown
- );
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b, d) {
- return this.each(function() {
- var e = a(this),
- f = e.data("bs.modal"),
- g = a.extend(
- {},
- c.DEFAULTS,
- e.data(),
- "object" == typeof b && b
- );
- f || e.data("bs.modal", (f = new c(this, g))),
- "string" == typeof b ? f[b](d) : g.show && f.show(d);
- });
- }
- var c = function(b, c) {
- (this.options = c),
- (this.$body = a(document.body)),
- (this.$element = a(b)),
- (this.$dialog = this.$element.find(".modal-dialog")),
- (this.$backdrop = null),
- (this.isShown = null),
- (this.originalBodyPad = null),
- (this.scrollbarWidth = 0),
- (this.ignoreBackdropClick = !1),
- this.options.remote &&
- this.$element.find(".modal-content").load(
- this.options.remote,
- a.proxy(function() {
- this.$element.trigger("loaded.bs.modal");
- }, this)
- );
- };
- (c.VERSION = "3.3.7"),
- (c.TRANSITION_DURATION = 300),
- (c.BACKDROP_TRANSITION_DURATION = 150),
- (c.DEFAULTS = { backdrop: !0, keyboard: !0, show: !0 }),
- (c.prototype.toggle = function(a) {
- return this.isShown ? this.hide() : this.show(a);
- }),
- (c.prototype.show = function(b) {
- var d = this,
- e = a.Event("show.bs.modal", { relatedTarget: b });
- this.$element.trigger(e),
- this.isShown ||
- e.isDefaultPrevented() ||
- ((this.isShown = !0),
- this.checkScrollbar(),
- this.setScrollbar(),
- this.$body.addClass("modal-open"),
- this.escape(),
- this.resize(),
- this.$element.on(
- "click.dismiss.bs.modal",
- '[data-dismiss="modal"]',
- a.proxy(this.hide, this)
- ),
- this.$dialog.on(
- "mousedown.dismiss.bs.modal",
- function() {
- d.$element.one(
- "mouseup.dismiss.bs.modal",
- function(b) {
- a(b.target).is(d.$element) &&
- (d.ignoreBackdropClick = !0);
- }
- );
- }
- ),
- this.backdrop(function() {
- var e =
- a.support.transition &&
- d.$element.hasClass("fade");
- d.$element.parent().length ||
- d.$element.appendTo(d.$body),
- d.$element.show().scrollTop(0),
- d.adjustDialog(),
- e && d.$element[0].offsetWidth,
- d.$element.addClass("in"),
- d.enforceFocus();
- var f = a.Event("shown.bs.modal", {
- relatedTarget: b
- });
- e
- ? d.$dialog
- .one("bsTransitionEnd", function() {
- d.$element
- .trigger("focus")
- .trigger(f);
- })
- .emulateTransitionEnd(
- c.TRANSITION_DURATION
- )
- : d.$element.trigger("focus").trigger(f);
- }));
- }),
- (c.prototype.hide = function(b) {
- b && b.preventDefault(),
- (b = a.Event("hide.bs.modal")),
- this.$element.trigger(b),
- this.isShown &&
- !b.isDefaultPrevented() &&
- ((this.isShown = !1),
- this.escape(),
- this.resize(),
- a(document).off("focusin.bs.modal"),
- this.$element
- .removeClass("in")
- .off("click.dismiss.bs.modal")
- .off("mouseup.dismiss.bs.modal"),
- this.$dialog.off("mousedown.dismiss.bs.modal"),
- a.support.transition && this.$element.hasClass("fade")
- ? this.$element
- .one(
- "bsTransitionEnd",
- a.proxy(this.hideModal, this)
- )
- .emulateTransitionEnd(c.TRANSITION_DURATION)
- : this.hideModal());
- }),
- (c.prototype.enforceFocus = function() {
- a(document)
- .off("focusin.bs.modal")
- .on(
- "focusin.bs.modal",
- a.proxy(function(a) {
- document === a.target ||
- this.$element[0] === a.target ||
- this.$element.has(a.target).length ||
- this.$element.trigger("focus");
- }, this)
- );
- }),
- (c.prototype.escape = function() {
- this.isShown && this.options.keyboard
- ? this.$element.on(
- "keydown.dismiss.bs.modal",
- a.proxy(function(a) {
- 27 == a.which && this.hide();
- }, this)
- )
- : this.isShown ||
- this.$element.off("keydown.dismiss.bs.modal");
- }),
- (c.prototype.resize = function() {
- this.isShown
- ? a(window).on(
- "resize.bs.modal",
- a.proxy(this.handleUpdate, this)
- )
- : a(window).off("resize.bs.modal");
- }),
- (c.prototype.hideModal = function() {
- var a = this;
- this.$element.hide(),
- this.backdrop(function() {
- a.$body.removeClass("modal-open"),
- a.resetAdjustments(),
- a.resetScrollbar(),
- a.$element.trigger("hidden.bs.modal");
- });
- }),
- (c.prototype.removeBackdrop = function() {
- this.$backdrop && this.$backdrop.remove(),
- (this.$backdrop = null);
- }),
- (c.prototype.backdrop = function(b) {
- var d = this,
- e = this.$element.hasClass("fade") ? "fade" : "";
- if (this.isShown && this.options.backdrop) {
- var f = a.support.transition && e;
- if (
- ((this.$backdrop = a(document.createElement("div"))
- .addClass("modal-backdrop " + e)
- .appendTo(this.$body)),
- this.$element.on(
- "click.dismiss.bs.modal",
- a.proxy(function(a) {
- return this.ignoreBackdropClick
- ? void (this.ignoreBackdropClick = !1)
- : void (
- a.target === a.currentTarget &&
- ("static" == this.options.backdrop
- ? this.$element[0].focus()
- : this.hide())
- );
- }, this)
- ),
- f && this.$backdrop[0].offsetWidth,
- this.$backdrop.addClass("in"),
- !b)
- )
- return;
- f
- ? this.$backdrop
- .one("bsTransitionEnd", b)
- .emulateTransitionEnd(
- c.BACKDROP_TRANSITION_DURATION
- )
- : b();
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass("in");
- var g = function() {
- d.removeBackdrop(), b && b();
- };
- a.support.transition && this.$element.hasClass("fade")
- ? this.$backdrop
- .one("bsTransitionEnd", g)
- .emulateTransitionEnd(
- c.BACKDROP_TRANSITION_DURATION
- )
- : g();
- } else b && b();
- }),
- (c.prototype.handleUpdate = function() {
- this.adjustDialog();
- }),
- (c.prototype.adjustDialog = function() {
- var a =
- this.$element[0].scrollHeight >
- document.documentElement.clientHeight;
- this.$element.css({
- paddingLeft:
- !this.bodyIsOverflowing && a ? this.scrollbarWidth : "",
- paddingRight:
- this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""
- });
- }),
- (c.prototype.resetAdjustments = function() {
- this.$element.css({ paddingLeft: "", paddingRight: "" });
- }),
- (c.prototype.checkScrollbar = function() {
- var a = window.innerWidth;
- if (!a) {
- var b = document.documentElement.getBoundingClientRect();
- a = b.right - Math.abs(b.left);
- }
- (this.bodyIsOverflowing = document.body.clientWidth < a),
- (this.scrollbarWidth = this.measureScrollbar());
- }),
- (c.prototype.setScrollbar = function() {
- var a = parseInt(this.$body.css("padding-right") || 0, 10);
- (this.originalBodyPad = document.body.style.paddingRight || ""),
- this.bodyIsOverflowing &&
- this.$body.css(
- "padding-right",
- a + this.scrollbarWidth
- );
- }),
- (c.prototype.resetScrollbar = function() {
- this.$body.css("padding-right", this.originalBodyPad);
- }),
- (c.prototype.measureScrollbar = function() {
- var a = document.createElement("div");
- (a.className = "modal-scrollbar-measure"), this.$body.append(a);
- var b = a.offsetWidth - a.clientWidth;
- return this.$body[0].removeChild(a), b;
- });
- var d = a.fn.modal;
- (a.fn.modal = b),
- (a.fn.modal.Constructor = c),
- (a.fn.modal.noConflict = function() {
- return (a.fn.modal = d), this;
- }),
- a(document).on(
- "click.bs.modal.data-api",
- '[data-toggle="modal"]',
- function(c) {
- var d = a(this),
- e = d.attr("href"),
- f = a(
- d.attr("data-target") ||
- (e && e.replace(/.*(?=#[^\s]+$)/, ""))
- ),
- g = f.data("bs.modal")
- ? "toggle"
- : a.extend(
- { remote: !/#/.test(e) && e },
- f.data(),
- d.data()
- );
- d.is("a") && c.preventDefault(),
- f.one("show.bs.modal", function(a) {
- a.isDefaultPrevented() ||
- f.one("hidden.bs.modal", function() {
- d.is(":visible") && d.trigger("focus");
- });
- }),
- b.call(f, g, this);
- }
- );
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- return this.each(function() {
- var d = a(this),
- e = d.data("bs.tooltip"),
- f = "object" == typeof b && b;
- (!e && /destroy|hide/.test(b)) ||
- (e || d.data("bs.tooltip", (e = new c(this, f))),
- "string" == typeof b && e[b]());
- });
- }
- var c = function(a, b) {
- (this.type = null),
- (this.options = null),
- (this.enabled = null),
- (this.timeout = null),
- (this.hoverState = null),
- (this.$element = null),
- (this.inState = null),
- this.init("tooltip", a, b);
- };
- (c.VERSION = "3.3.7"),
- (c.TRANSITION_DURATION = 150),
- (c.DEFAULTS = {
- animation: !0,
- placement: "top",
- selector: !1,
- template:
- '',
- trigger: "hover focus",
- title: "",
- delay: 0,
- html: !1,
- container: !1,
- viewport: { selector: "body", padding: 0 }
- }),
- (c.prototype.init = function(b, c, d) {
- if (
- ((this.enabled = !0),
- (this.type = b),
- (this.$element = a(c)),
- (this.options = this.getOptions(d)),
- (this.$viewport =
- this.options.viewport &&
- a(
- a.isFunction(this.options.viewport)
- ? this.options.viewport.call(
- this,
- this.$element
- )
- : this.options.viewport.selector ||
- this.options.viewport
- )),
- (this.inState = { click: !1, hover: !1, focus: !1 }),
- this.$element[0] instanceof document.constructor &&
- !this.options.selector)
- )
- throw new Error(
- "`selector` option must be specified when initializing " +
- this.type +
- " on the window.document object!"
- );
- for (
- var e = this.options.trigger.split(" "), f = e.length;
- f--;
-
- ) {
- var g = e[f];
- if ("click" == g)
- this.$element.on(
- "click." + this.type,
- this.options.selector,
- a.proxy(this.toggle, this)
- );
- else if ("manual" != g) {
- var h = "hover" == g ? "mouseenter" : "focusin",
- i = "hover" == g ? "mouseleave" : "focusout";
- this.$element.on(
- h + "." + this.type,
- this.options.selector,
- a.proxy(this.enter, this)
- ),
- this.$element.on(
- i + "." + this.type,
- this.options.selector,
- a.proxy(this.leave, this)
- );
- }
- }
- this.options.selector
- ? (this._options = a.extend({}, this.options, {
- trigger: "manual",
- selector: ""
- }))
- : this.fixTitle();
- }),
- (c.prototype.getDefaults = function() {
- return c.DEFAULTS;
- }),
- (c.prototype.getOptions = function(b) {
- return (
- (b = a.extend(
- {},
- this.getDefaults(),
- this.$element.data(),
- b
- )),
- b.delay &&
- "number" == typeof b.delay &&
- (b.delay = { show: b.delay, hide: b.delay }),
- b
- );
- }),
- (c.prototype.getDelegateOptions = function() {
- var b = {},
- c = this.getDefaults();
- return (
- this._options &&
- a.each(this._options, function(a, d) {
- c[a] != d && (b[a] = d);
- }),
- b
- );
- }),
- (c.prototype.enter = function(b) {
- var c =
- b instanceof this.constructor
- ? b
- : a(b.currentTarget).data("bs." + this.type);
- return (
- c ||
- ((c = new this.constructor(
- b.currentTarget,
- this.getDelegateOptions()
- )),
- a(b.currentTarget).data("bs." + this.type, c)),
- b instanceof a.Event &&
- (c.inState[
- "focusin" == b.type ? "focus" : "hover"
- ] = !0),
- c.tip().hasClass("in") || "in" == c.hoverState
- ? void (c.hoverState = "in")
- : (clearTimeout(c.timeout),
- (c.hoverState = "in"),
- c.options.delay && c.options.delay.show
- ? void (c.timeout = setTimeout(function() {
- "in" == c.hoverState && c.show();
- }, c.options.delay.show))
- : c.show())
- );
- }),
- (c.prototype.isInStateTrue = function() {
- for (var a in this.inState) if (this.inState[a]) return !0;
- return !1;
- }),
- (c.prototype.leave = function(b) {
- var c =
- b instanceof this.constructor
- ? b
- : a(b.currentTarget).data("bs." + this.type);
- if (
- (c ||
- ((c = new this.constructor(
- b.currentTarget,
- this.getDelegateOptions()
- )),
- a(b.currentTarget).data("bs." + this.type, c)),
- b instanceof a.Event &&
- (c.inState[
- "focusout" == b.type ? "focus" : "hover"
- ] = !1),
- !c.isInStateTrue())
- )
- return (
- clearTimeout(c.timeout),
- (c.hoverState = "out"),
- c.options.delay && c.options.delay.hide
- ? void (c.timeout = setTimeout(function() {
- "out" == c.hoverState && c.hide();
- }, c.options.delay.hide))
- : c.hide()
- );
- }),
- (c.prototype.show = function() {
- var b = a.Event("show.bs." + this.type);
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(b);
- var d = a.contains(
- this.$element[0].ownerDocument.documentElement,
- this.$element[0]
- );
- if (b.isDefaultPrevented() || !d) return;
- var e = this,
- f = this.tip(),
- g = this.getUID(this.type);
- this.setContent(),
- f.attr("id", g),
- this.$element.attr("aria-describedby", g),
- this.options.animation && f.addClass("fade");
- var h =
- "function" == typeof this.options.placement
- ? this.options.placement.call(
- this,
- f[0],
- this.$element[0]
- )
- : this.options.placement,
- i = /\s?auto?\s?/i,
- j = i.test(h);
- j && (h = h.replace(i, "") || "top"),
- f
- .detach()
- .css({ top: 0, left: 0, display: "block" })
- .addClass(h)
- .data("bs." + this.type, this),
- this.options.container
- ? f.appendTo(this.options.container)
- : f.insertAfter(this.$element),
- this.$element.trigger("inserted.bs." + this.type);
- var k = this.getPosition(),
- l = f[0].offsetWidth,
- m = f[0].offsetHeight;
- if (j) {
- var n = h,
- o = this.getPosition(this.$viewport);
- (h =
- "bottom" == h && k.bottom + m > o.bottom
- ? "top"
- : "top" == h && k.top - m < o.top
- ? "bottom"
- : "right" == h && k.right + l > o.width
- ? "left"
- : "left" == h && k.left - l < o.left
- ? "right"
- : h),
- f.removeClass(n).addClass(h);
- }
- var p = this.getCalculatedOffset(h, k, l, m);
- this.applyPlacement(p, h);
- var q = function() {
- var a = e.hoverState;
- e.$element.trigger("shown.bs." + e.type),
- (e.hoverState = null),
- "out" == a && e.leave(e);
- };
- a.support.transition && this.$tip.hasClass("fade")
- ? f
- .one("bsTransitionEnd", q)
- .emulateTransitionEnd(c.TRANSITION_DURATION)
- : q();
- }
- }),
- (c.prototype.applyPlacement = function(b, c) {
- var d = this.tip(),
- e = d[0].offsetWidth,
- f = d[0].offsetHeight,
- g = parseInt(d.css("margin-top"), 10),
- h = parseInt(d.css("margin-left"), 10);
- isNaN(g) && (g = 0),
- isNaN(h) && (h = 0),
- (b.top += g),
- (b.left += h),
- a.offset.setOffset(
- d[0],
- a.extend(
- {
- using: function(a) {
- d.css({
- top: Math.round(a.top),
- left: Math.round(a.left)
- });
- }
- },
- b
- ),
- 0
- ),
- d.addClass("in");
- var i = d[0].offsetWidth,
- j = d[0].offsetHeight;
- "top" == c && j != f && (b.top = b.top + f - j);
- var k = this.getViewportAdjustedDelta(c, b, i, j);
- k.left ? (b.left += k.left) : (b.top += k.top);
- var l = /top|bottom/.test(c),
- m = l ? 2 * k.left - e + i : 2 * k.top - f + j,
- n = l ? "offsetWidth" : "offsetHeight";
- d.offset(b), this.replaceArrow(m, d[0][n], l);
- }),
- (c.prototype.replaceArrow = function(a, b, c) {
- this.arrow()
- .css(c ? "left" : "top", 50 * (1 - a / b) + "%")
- .css(c ? "top" : "left", "");
- }),
- (c.prototype.setContent = function() {
- var a = this.tip(),
- b = this.getTitle();
- a
- .find(".tooltip-inner")
- [this.options.html ? "html" : "text"](b),
- a.removeClass("fade in top bottom left right");
- }),
- (c.prototype.hide = function(b) {
- function d() {
- "in" != e.hoverState && f.detach(),
- e.$element &&
- e.$element
- .removeAttr("aria-describedby")
- .trigger("hidden.bs." + e.type),
- b && b();
- }
- var e = this,
- f = a(this.$tip),
- g = a.Event("hide.bs." + this.type);
- if ((this.$element.trigger(g), !g.isDefaultPrevented()))
- return (
- f.removeClass("in"),
- a.support.transition && f.hasClass("fade")
- ? f
- .one("bsTransitionEnd", d)
- .emulateTransitionEnd(c.TRANSITION_DURATION)
- : d(),
- (this.hoverState = null),
- this
- );
- }),
- (c.prototype.fixTitle = function() {
- var a = this.$element;
- (a.attr("title") ||
- "string" != typeof a.attr("data-original-title")) &&
- a
- .attr("data-original-title", a.attr("title") || "")
- .attr("title", "");
- }),
- (c.prototype.hasContent = function() {
- return this.getTitle();
- }),
- (c.prototype.getPosition = function(b) {
- b = b || this.$element;
- var c = b[0],
- d = "BODY" == c.tagName,
- e = c.getBoundingClientRect();
- null == e.width &&
- (e = a.extend({}, e, {
- width: e.right - e.left,
- height: e.bottom - e.top
- }));
- var f = window.SVGElement && c instanceof window.SVGElement,
- g = d ? { top: 0, left: 0 } : f ? null : b.offset(),
- h = {
- scroll: d
- ? document.documentElement.scrollTop ||
- document.body.scrollTop
- : b.scrollTop()
- },
- i = d
- ? {
- width: a(window).width(),
- height: a(window).height()
- }
- : null;
- return a.extend({}, e, h, i, g);
- }),
- (c.prototype.getCalculatedOffset = function(a, b, c, d) {
- return "bottom" == a
- ? {
- top: b.top + b.height,
- left: b.left + b.width / 2 - c / 2
- }
- : "top" == a
- ? { top: b.top - d, left: b.left + b.width / 2 - c / 2 }
- : "left" == a
- ? { top: b.top + b.height / 2 - d / 2, left: b.left - c }
- : {
- top: b.top + b.height / 2 - d / 2,
- left: b.left + b.width
- };
- }),
- (c.prototype.getViewportAdjustedDelta = function(a, b, c, d) {
- var e = { top: 0, left: 0 };
- if (!this.$viewport) return e;
- var f =
- (this.options.viewport &&
- this.options.viewport.padding) ||
- 0,
- g = this.getPosition(this.$viewport);
- if (/right|left/.test(a)) {
- var h = b.top - f - g.scroll,
- i = b.top + f - g.scroll + d;
- h < g.top
- ? (e.top = g.top - h)
- : i > g.top + g.height &&
- (e.top = g.top + g.height - i);
- } else {
- var j = b.left - f,
- k = b.left + f + c;
- j < g.left
- ? (e.left = g.left - j)
- : k > g.right && (e.left = g.left + g.width - k);
- }
- return e;
- }),
- (c.prototype.getTitle = function() {
- var a,
- b = this.$element,
- c = this.options;
- return (a =
- b.attr("data-original-title") ||
- ("function" == typeof c.title
- ? c.title.call(b[0])
- : c.title));
- }),
- (c.prototype.getUID = function(a) {
- do a += ~~(1e6 * Math.random());
- while (document.getElementById(a));
- return a;
- }),
- (c.prototype.tip = function() {
- if (
- !this.$tip &&
- ((this.$tip = a(this.options.template)),
- 1 != this.$tip.length)
- )
- throw new Error(
- this.type +
- " `template` option must consist of exactly 1 top-level element!"
- );
- return this.$tip;
- }),
- (c.prototype.arrow = function() {
- return (this.$arrow =
- this.$arrow || this.tip().find(".tooltip-arrow"));
- }),
- (c.prototype.enable = function() {
- this.enabled = !0;
- }),
- (c.prototype.disable = function() {
- this.enabled = !1;
- }),
- (c.prototype.toggleEnabled = function() {
- this.enabled = !this.enabled;
- }),
- (c.prototype.toggle = function(b) {
- var c = this;
- b &&
- ((c = a(b.currentTarget).data("bs." + this.type)),
- c ||
- ((c = new this.constructor(
- b.currentTarget,
- this.getDelegateOptions()
- )),
- a(b.currentTarget).data("bs." + this.type, c))),
- b
- ? ((c.inState.click = !c.inState.click),
- c.isInStateTrue() ? c.enter(c) : c.leave(c))
- : c.tip().hasClass("in")
- ? c.leave(c)
- : c.enter(c);
- }),
- (c.prototype.destroy = function() {
- var a = this;
- clearTimeout(this.timeout),
- this.hide(function() {
- a.$element.off("." + a.type).removeData("bs." + a.type),
- a.$tip && a.$tip.detach(),
- (a.$tip = null),
- (a.$arrow = null),
- (a.$viewport = null),
- (a.$element = null);
- });
- });
- var d = a.fn.tooltip;
- (a.fn.tooltip = b),
- (a.fn.tooltip.Constructor = c),
- (a.fn.tooltip.noConflict = function() {
- return (a.fn.tooltip = d), this;
- });
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- return this.each(function() {
- var d = a(this),
- e = d.data("bs.popover"),
- f = "object" == typeof b && b;
- (!e && /destroy|hide/.test(b)) ||
- (e || d.data("bs.popover", (e = new c(this, f))),
- "string" == typeof b && e[b]());
- });
- }
- var c = function(a, b) {
- this.init("popover", a, b);
- };
- if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js");
- (c.VERSION = "3.3.7"),
- (c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
- placement: "right",
- trigger: "click",
- content: "",
- template:
- ''
- })),
- (c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype)),
- (c.prototype.constructor = c),
- (c.prototype.getDefaults = function() {
- return c.DEFAULTS;
- }),
- (c.prototype.setContent = function() {
- var a = this.tip(),
- b = this.getTitle(),
- c = this.getContent();
- a
- .find(".popover-title")
- [this.options.html ? "html" : "text"](b),
- a
- .find(".popover-content")
- .children()
- .detach()
- .end()
- [
- this.options.html
- ? "string" == typeof c
- ? "html"
- : "append"
- : "text"
- ](c),
- a.removeClass("fade top bottom left right in"),
- a.find(".popover-title").html() ||
- a.find(".popover-title").hide();
- }),
- (c.prototype.hasContent = function() {
- return this.getTitle() || this.getContent();
- }),
- (c.prototype.getContent = function() {
- var a = this.$element,
- b = this.options;
- return (
- a.attr("data-content") ||
- ("function" == typeof b.content
- ? b.content.call(a[0])
- : b.content)
- );
- }),
- (c.prototype.arrow = function() {
- return (this.$arrow = this.$arrow || this.tip().find(".arrow"));
- });
- var d = a.fn.popover;
- (a.fn.popover = b),
- (a.fn.popover.Constructor = c),
- (a.fn.popover.noConflict = function() {
- return (a.fn.popover = d), this;
- });
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(c, d) {
- (this.$body = a(document.body)),
- (this.$scrollElement = a(a(c).is(document.body) ? window : c)),
- (this.options = a.extend({}, b.DEFAULTS, d)),
- (this.selector = (this.options.target || "") + " .nav li > a"),
- (this.offsets = []),
- (this.targets = []),
- (this.activeTarget = null),
- (this.scrollHeight = 0),
- this.$scrollElement.on(
- "scroll.bs.scrollspy",
- a.proxy(this.process, this)
- ),
- this.refresh(),
- this.process();
- }
- function c(c) {
- return this.each(function() {
- var d = a(this),
- e = d.data("bs.scrollspy"),
- f = "object" == typeof c && c;
- e || d.data("bs.scrollspy", (e = new b(this, f))),
- "string" == typeof c && e[c]();
- });
- }
- (b.VERSION = "3.3.7"),
- (b.DEFAULTS = { offset: 10 }),
- (b.prototype.getScrollHeight = function() {
- return (
- this.$scrollElement[0].scrollHeight ||
- Math.max(
- this.$body[0].scrollHeight,
- document.documentElement.scrollHeight
- )
- );
- }),
- (b.prototype.refresh = function() {
- var b = this,
- c = "offset",
- d = 0;
- (this.offsets = []),
- (this.targets = []),
- (this.scrollHeight = this.getScrollHeight()),
- a.isWindow(this.$scrollElement[0]) ||
- ((c = "position"),
- (d = this.$scrollElement.scrollTop())),
- this.$body
- .find(this.selector)
- .map(function() {
- var b = a(this),
- e = b.data("target") || b.attr("href"),
- f = /^#./.test(e) && a(e);
- return (
- (f &&
- f.length &&
- f.is(":visible") && [
- [f[c]().top + d, e]
- ]) ||
- null
- );
- })
- .sort(function(a, b) {
- return a[0] - b[0];
- })
- .each(function() {
- b.offsets.push(this[0]), b.targets.push(this[1]);
- });
- }),
- (b.prototype.process = function() {
- var a,
- b = this.$scrollElement.scrollTop() + this.options.offset,
- c = this.getScrollHeight(),
- d = this.options.offset + c - this.$scrollElement.height(),
- e = this.offsets,
- f = this.targets,
- g = this.activeTarget;
- if ((this.scrollHeight != c && this.refresh(), b >= d))
- return g != (a = f[f.length - 1]) && this.activate(a);
- if (g && b < e[0])
- return (this.activeTarget = null), this.clear();
- for (a = e.length; a--; )
- g != f[a] &&
- b >= e[a] &&
- (void 0 === e[a + 1] || b < e[a + 1]) &&
- this.activate(f[a]);
- }),
- (b.prototype.activate = function(b) {
- (this.activeTarget = b), this.clear();
- var c =
- this.selector +
- '[data-target="' +
- b +
- '"],' +
- this.selector +
- '[href="' +
- b +
- '"]',
- d = a(c)
- .parents("li")
- .addClass("active");
- d.parent(".dropdown-menu").length &&
- (d = d.closest("li.dropdown").addClass("active")),
- d.trigger("activate.bs.scrollspy");
- }),
- (b.prototype.clear = function() {
- a(this.selector)
- .parentsUntil(this.options.target, ".active")
- .removeClass("active");
- });
- var d = a.fn.scrollspy;
- (a.fn.scrollspy = c),
- (a.fn.scrollspy.Constructor = b),
- (a.fn.scrollspy.noConflict = function() {
- return (a.fn.scrollspy = d), this;
- }),
- a(window).on("load.bs.scrollspy.data-api", function() {
- a('[data-spy="scroll"]').each(function() {
- var b = a(this);
- c.call(b, b.data());
- });
- });
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- return this.each(function() {
- var d = a(this),
- e = d.data("bs.tab");
- e || d.data("bs.tab", (e = new c(this))),
- "string" == typeof b && e[b]();
- });
- }
- var c = function(b) {
- this.element = a(b);
- };
- (c.VERSION = "3.3.7"),
- (c.TRANSITION_DURATION = 150),
- (c.prototype.show = function() {
- var b = this.element,
- c = b.closest("ul:not(.dropdown-menu)"),
- d = b.data("target");
- if (
- (d ||
- ((d = b.attr("href")),
- (d = d && d.replace(/.*(?=#[^\s]*$)/, ""))),
- !b.parent("li").hasClass("active"))
- ) {
- var e = c.find(".active:last a"),
- f = a.Event("hide.bs.tab", { relatedTarget: b[0] }),
- g = a.Event("show.bs.tab", { relatedTarget: e[0] });
- if (
- (e.trigger(f),
- b.trigger(g),
- !g.isDefaultPrevented() && !f.isDefaultPrevented())
- ) {
- var h = a(d);
- this.activate(b.closest("li"), c),
- this.activate(h, h.parent(), function() {
- e.trigger({
- type: "hidden.bs.tab",
- relatedTarget: b[0]
- }),
- b.trigger({
- type: "shown.bs.tab",
- relatedTarget: e[0]
- });
- });
- }
- }
- }),
- (c.prototype.activate = function(b, d, e) {
- function f() {
- g
- .removeClass("active")
- .find("> .dropdown-menu > .active")
- .removeClass("active")
- .end()
- .find('[data-toggle="tab"]')
- .attr("aria-expanded", !1),
- b
- .addClass("active")
- .find('[data-toggle="tab"]')
- .attr("aria-expanded", !0),
- h
- ? (b[0].offsetWidth, b.addClass("in"))
- : b.removeClass("fade"),
- b.parent(".dropdown-menu").length &&
- b
- .closest("li.dropdown")
- .addClass("active")
- .end()
- .find('[data-toggle="tab"]')
- .attr("aria-expanded", !0),
- e && e();
- }
- var g = d.find("> .active"),
- h =
- e &&
- a.support.transition &&
- ((g.length && g.hasClass("fade")) ||
- !!d.find("> .fade").length);
- g.length && h
- ? g
- .one("bsTransitionEnd", f)
- .emulateTransitionEnd(c.TRANSITION_DURATION)
- : f(),
- g.removeClass("in");
- });
- var d = a.fn.tab;
- (a.fn.tab = b),
- (a.fn.tab.Constructor = c),
- (a.fn.tab.noConflict = function() {
- return (a.fn.tab = d), this;
- });
- var e = function(c) {
- c.preventDefault(), b.call(a(this), "show");
- };
- a(document)
- .on("click.bs.tab.data-api", '[data-toggle="tab"]', e)
- .on("click.bs.tab.data-api", '[data-toggle="pill"]', e);
- })(jQuery),
- +(function(a) {
- "use strict";
- function b(b) {
- return this.each(function() {
- var d = a(this),
- e = d.data("bs.affix"),
- f = "object" == typeof b && b;
- e || d.data("bs.affix", (e = new c(this, f))),
- "string" == typeof b && e[b]();
- });
- }
- var c = function(b, d) {
- (this.options = a.extend({}, c.DEFAULTS, d)),
- (this.$target = a(this.options.target)
- .on(
- "scroll.bs.affix.data-api",
- a.proxy(this.checkPosition, this)
- )
- .on(
- "click.bs.affix.data-api",
- a.proxy(this.checkPositionWithEventLoop, this)
- )),
- (this.$element = a(b)),
- (this.affixed = null),
- (this.unpin = null),
- (this.pinnedOffset = null),
- this.checkPosition();
- };
- (c.VERSION = "3.3.7"),
- (c.RESET = "affix affix-top affix-bottom"),
- (c.DEFAULTS = { offset: 0, target: window }),
- (c.prototype.getState = function(a, b, c, d) {
- var e = this.$target.scrollTop(),
- f = this.$element.offset(),
- g = this.$target.height();
- if (null != c && "top" == this.affixed) return e < c && "top";
- if ("bottom" == this.affixed)
- return null != c
- ? !(e + this.unpin <= f.top) && "bottom"
- : !(e + g <= a - d) && "bottom";
- var h = null == this.affixed,
- i = h ? e : f.top,
- j = h ? g : b;
- return null != c && e <= c
- ? "top"
- : null != d && i + j >= a - d && "bottom";
- }),
- (c.prototype.getPinnedOffset = function() {
- if (this.pinnedOffset) return this.pinnedOffset;
- this.$element.removeClass(c.RESET).addClass("affix");
- var a = this.$target.scrollTop(),
- b = this.$element.offset();
- return (this.pinnedOffset = b.top - a);
- }),
- (c.prototype.checkPositionWithEventLoop = function() {
- setTimeout(a.proxy(this.checkPosition, this), 1);
- }),
- (c.prototype.checkPosition = function() {
- if (this.$element.is(":visible")) {
- var b = this.$element.height(),
- d = this.options.offset,
- e = d.top,
- f = d.bottom,
- g = Math.max(
- a(document).height(),
- a(document.body).height()
- );
- "object" != typeof d && (f = e = d),
- "function" == typeof e && (e = d.top(this.$element)),
- "function" == typeof f && (f = d.bottom(this.$element));
- var h = this.getState(g, b, e, f);
- if (this.affixed != h) {
- null != this.unpin && this.$element.css("top", "");
- var i = "affix" + (h ? "-" + h : ""),
- j = a.Event(i + ".bs.affix");
- if ((this.$element.trigger(j), j.isDefaultPrevented()))
- return;
- (this.affixed = h),
- (this.unpin =
- "bottom" == h ? this.getPinnedOffset() : null),
- this.$element
- .removeClass(c.RESET)
- .addClass(i)
- .trigger(
- i.replace("affix", "affixed") + ".bs.affix"
- );
- }
- "bottom" == h && this.$element.offset({ top: g - b - f });
- }
- });
- var d = a.fn.affix;
- (a.fn.affix = b),
- (a.fn.affix.Constructor = c),
- (a.fn.affix.noConflict = function() {
- return (a.fn.affix = d), this;
- }),
- a(window).on("load", function() {
- a('[data-spy="affix"]').each(function() {
- var c = a(this),
- d = c.data();
- (d.offset = d.offset || {}),
- null != d.offsetBottom &&
- (d.offset.bottom = d.offsetBottom),
- null != d.offsetTop && (d.offset.top = d.offsetTop),
- b.call(c, d);
- });
- });
- })(jQuery);
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
diff --git a/docs/api/vendor/diff_match_patch.min.js b/docs/api/vendor/diff_match_patch.min.js
index ca985442..c41b5132 100644
--- a/docs/api/vendor/diff_match_patch.min.js
+++ b/docs/api/vendor/diff_match_patch.min.js
@@ -1,1085 +1,49 @@
-(function() {
- function diff_match_patch() {
- this.Diff_Timeout = 1;
- this.Diff_EditCost = 4;
- this.Match_Threshold = 0.5;
- this.Match_Distance = 1e3;
- this.Patch_DeleteThreshold = 0.5;
- this.Patch_Margin = 4;
- this.Match_MaxBits = 32;
- }
- diff_match_patch.prototype.diff_main = function(a, b, c, d) {
- "undefined" == typeof d &&
- (d =
- 0 >= this.Diff_Timeout
- ? Number.MAX_VALUE
- : new Date().getTime() + 1e3 * this.Diff_Timeout);
- if (null == a || null == b) throw Error("Null input. (diff_main)");
- if (a == b) return a ? [[0, a]] : [];
- "undefined" == typeof c && (c = !0);
- var e = c,
- f = this.diff_commonPrefix(a, b);
- c = a.substring(0, f);
- a = a.substring(f);
- b = b.substring(f);
- var f = this.diff_commonSuffix(a, b),
- g = a.substring(a.length - f);
- a = a.substring(0, a.length - f);
- b = b.substring(0, b.length - f);
- a = this.diff_compute_(a, b, e, d);
- c && a.unshift([0, c]);
- g && a.push([0, g]);
- this.diff_cleanupMerge(a);
- return a;
- };
- diff_match_patch.prototype.diff_compute_ = function(a, b, c, d) {
- if (!a) return [[1, b]];
- if (!b) return [[-1, a]];
- var e = a.length > b.length ? a : b,
- f = a.length > b.length ? b : a,
- g = e.indexOf(f);
- return -1 != g
- ? ((c = [
- [1, e.substring(0, g)],
- [0, f],
- [1, e.substring(g + f.length)]
- ]),
- a.length > b.length && (c[0][0] = c[2][0] = -1),
- c)
- : 1 == f.length
- ? [
- [-1, a],
- [1, b]
- ]
- : (e = this.diff_halfMatch_(a, b))
- ? ((f = e[0]),
- (a = e[1]),
- (g = e[2]),
- (b = e[3]),
- (e = e[4]),
- (f = this.diff_main(f, g, c, d)),
- (c = this.diff_main(a, b, c, d)),
- f.concat([[0, e]], c))
- : c && 100 < a.length && 100 < b.length
- ? this.diff_lineMode_(a, b, d)
- : this.diff_bisect_(a, b, d);
- };
- diff_match_patch.prototype.diff_lineMode_ = function(a, b, c) {
- var d = this.diff_linesToChars_(a, b);
- a = d.chars1;
- b = d.chars2;
- d = d.lineArray;
- a = this.diff_main(a, b, !1, c);
- this.diff_charsToLines_(a, d);
- this.diff_cleanupSemantic(a);
- a.push([0, ""]);
- for (var e = (d = b = 0), f = "", g = ""; b < a.length; ) {
- switch (a[b][0]) {
- case 1:
- e++;
- g += a[b][1];
- break;
- case -1:
- d++;
- f += a[b][1];
- break;
- case 0:
- if (1 <= d && 1 <= e) {
- a.splice(b - d - e, d + e);
- b = b - d - e;
- d = this.diff_main(f, g, !1, c);
- for (e = d.length - 1; 0 <= e; e--)
- a.splice(b, 0, d[e]);
- b += d.length;
- }
- d = e = 0;
- g = f = "";
- }
- b++;
- }
- a.pop();
- return a;
- };
- diff_match_patch.prototype.diff_bisect_ = function(a, b, c) {
- for (
- var d = a.length,
- e = b.length,
- f = Math.ceil((d + e) / 2),
- g = f,
- h = 2 * f,
- j = Array(h),
- i = Array(h),
- k = 0;
- k < h;
- k++
- )
- (j[k] = -1), (i[k] = -1);
- j[g + 1] = 0;
- i[g + 1] = 0;
- for (
- var k = d - e, q = 0 != k % 2, r = 0, t = 0, p = 0, w = 0, v = 0;
- v < f && !(new Date().getTime() > c);
- v++
- ) {
- for (var n = -v + r; n <= v - t; n += 2) {
- var l = g + n,
- m;
- m =
- n == -v || (n != v && j[l - 1] < j[l + 1])
- ? j[l + 1]
- : j[l - 1] + 1;
- for (
- var s = m - n;
- m < d && s < e && a.charAt(m) == b.charAt(s);
-
- )
- m++, s++;
- j[l] = m;
- if (m > d) t += 2;
- else if (s > e) r += 2;
- else if (
- q &&
- ((l = g + k - n), 0 <= l && l < h && -1 != i[l])
- ) {
- var u = d - i[l];
- if (m >= u) return this.diff_bisectSplit_(a, b, m, s, c);
- }
- }
- for (n = -v + p; n <= v - w; n += 2) {
- l = g + n;
- u =
- n == -v || (n != v && i[l - 1] < i[l + 1])
- ? i[l + 1]
- : i[l - 1] + 1;
- for (
- m = u - n;
- u < d &&
- m < e &&
- a.charAt(d - u - 1) == b.charAt(e - m - 1);
-
- )
- u++, m++;
- i[l] = u;
- if (u > d) w += 2;
- else if (m > e) p += 2;
- else if (
- !q &&
- ((l = g + k - n),
- 0 <= l &&
- l < h &&
- -1 != j[l] &&
- ((m = j[l]), (s = g + m - l), (u = d - u), m >= u))
- )
- return this.diff_bisectSplit_(a, b, m, s, c);
- }
- }
- return [
- [-1, a],
- [1, b]
- ];
- };
- diff_match_patch.prototype.diff_bisectSplit_ = function(a, b, c, d, e) {
- var f = a.substring(0, c),
- g = b.substring(0, d);
- a = a.substring(c);
- b = b.substring(d);
- f = this.diff_main(f, g, !1, e);
- e = this.diff_main(a, b, !1, e);
- return f.concat(e);
- };
- diff_match_patch.prototype.diff_linesToChars_ = function(a, b) {
- function c(a) {
- for (var b = "", c = 0, f = -1, g = d.length; f < a.length - 1; ) {
- f = a.indexOf("\n", c);
- -1 == f && (f = a.length - 1);
- var r = a.substring(c, f + 1),
- c = f + 1;
- (e.hasOwnProperty
- ? e.hasOwnProperty(r)
- : void 0 !== e[r])
- ? (b += String.fromCharCode(e[r]))
- : ((b += String.fromCharCode(g)), (e[r] = g), (d[g++] = r));
- }
- return b;
- }
- var d = [],
- e = {};
- d[0] = "";
- var f = c(a),
- g = c(b);
- return { chars1: f, chars2: g, lineArray: d };
- };
- diff_match_patch.prototype.diff_charsToLines_ = function(a, b) {
- for (var c = 0; c < a.length; c++) {
- for (var d = a[c][1], e = [], f = 0; f < d.length; f++)
- e[f] = b[d.charCodeAt(f)];
- a[c][1] = e.join("");
- }
- };
- diff_match_patch.prototype.diff_commonPrefix = function(a, b) {
- if (!a || !b || a.charAt(0) != b.charAt(0)) return 0;
- for (var c = 0, d = Math.min(a.length, b.length), e = d, f = 0; c < e; )
- a.substring(f, e) == b.substring(f, e) ? (f = c = e) : (d = e),
- (e = Math.floor((d - c) / 2 + c));
- return e;
- };
- diff_match_patch.prototype.diff_commonSuffix = function(a, b) {
- if (!a || !b || a.charAt(a.length - 1) != b.charAt(b.length - 1))
- return 0;
- for (var c = 0, d = Math.min(a.length, b.length), e = d, f = 0; c < e; )
- a.substring(a.length - e, a.length - f) ==
- b.substring(b.length - e, b.length - f)
- ? (f = c = e)
- : (d = e),
- (e = Math.floor((d - c) / 2 + c));
- return e;
- };
- diff_match_patch.prototype.diff_commonOverlap_ = function(a, b) {
- var c = a.length,
- d = b.length;
- if (0 == c || 0 == d) return 0;
- c > d ? (a = a.substring(c - d)) : c < d && (b = b.substring(0, c));
- c = Math.min(c, d);
- if (a == b) return c;
- for (var d = 0, e = 1; ; ) {
- var f = a.substring(c - e),
- f = b.indexOf(f);
- if (-1 == f) return d;
- e += f;
- if (0 == f || a.substring(c - e) == b.substring(0, e)) (d = e), e++;
- }
- };
- diff_match_patch.prototype.diff_halfMatch_ = function(a, b) {
- function c(a, b, c) {
- for (
- var d = a.substring(c, c + Math.floor(a.length / 4)),
- e = -1,
- g = "",
- h,
- j,
- n,
- l;
- -1 != (e = b.indexOf(d, e + 1));
-
- ) {
- var m = f.diff_commonPrefix(a.substring(c), b.substring(e)),
- s = f.diff_commonSuffix(
- a.substring(0, c),
- b.substring(0, e)
- );
- g.length < s + m &&
- ((g = b.substring(e - s, e) + b.substring(e, e + m)),
- (h = a.substring(0, c - s)),
- (j = a.substring(c + m)),
- (n = b.substring(0, e - s)),
- (l = b.substring(e + m)));
- }
- return 2 * g.length >= a.length ? [h, j, n, l, g] : null;
- }
- if (0 >= this.Diff_Timeout) return null;
- var d = a.length > b.length ? a : b,
- e = a.length > b.length ? b : a;
- if (4 > d.length || 2 * e.length < d.length) return null;
- var f = this,
- g = c(d, e, Math.ceil(d.length / 4)),
- d = c(d, e, Math.ceil(d.length / 2)),
- h;
- if (!g && !d) return null;
- h = d ? (g ? (g[4].length > d[4].length ? g : d) : d) : g;
- var j;
- a.length > b.length
- ? ((g = h[0]), (d = h[1]), (e = h[2]), (j = h[3]))
- : ((e = h[0]), (j = h[1]), (g = h[2]), (d = h[3]));
- h = h[4];
- return [g, d, e, j, h];
- };
- diff_match_patch.prototype.diff_cleanupSemantic = function(a) {
- for (
- var b = !1,
- c = [],
- d = 0,
- e = null,
- f = 0,
- g = 0,
- h = 0,
- j = 0,
- i = 0;
- f < a.length;
-
- )
- 0 == a[f][0]
- ? ((c[d++] = f), (g = j), (h = i), (i = j = 0), (e = a[f][1]))
- : (1 == a[f][0] ? (j += a[f][1].length) : (i += a[f][1].length),
- e &&
- e.length <= Math.max(g, h) &&
- e.length <= Math.max(j, i) &&
- (a.splice(c[d - 1], 0, [-1, e]),
- (a[c[d - 1] + 1][0] = 1),
- d--,
- d--,
- (f = 0 < d ? c[d - 1] : -1),
- (i = j = h = g = 0),
- (e = null),
- (b = !0))),
- f++;
- b && this.diff_cleanupMerge(a);
- this.diff_cleanupSemanticLossless(a);
- for (f = 1; f < a.length; ) {
- if (-1 == a[f - 1][0] && 1 == a[f][0]) {
- b = a[f - 1][1];
- c = a[f][1];
- d = this.diff_commonOverlap_(b, c);
- e = this.diff_commonOverlap_(c, b);
- if (d >= e) {
- if (d >= b.length / 2 || d >= c.length / 2)
- a.splice(f, 0, [0, c.substring(0, d)]),
- (a[f - 1][1] = b.substring(0, b.length - d)),
- (a[f + 1][1] = c.substring(d)),
- f++;
- } else if (e >= b.length / 2 || e >= c.length / 2)
- a.splice(f, 0, [0, b.substring(0, e)]),
- (a[f - 1][0] = 1),
- (a[f - 1][1] = c.substring(0, c.length - e)),
- (a[f + 1][0] = -1),
- (a[f + 1][1] = b.substring(e)),
- f++;
- f++;
- }
- f++;
- }
- };
- diff_match_patch.prototype.diff_cleanupSemanticLossless = function(a) {
- function b(a, b) {
- if (!a || !b) return 6;
- var c = a.charAt(a.length - 1),
- d = b.charAt(0),
- e = c.match(diff_match_patch.nonAlphaNumericRegex_),
- f = d.match(diff_match_patch.nonAlphaNumericRegex_),
- g = e && c.match(diff_match_patch.whitespaceRegex_),
- h = f && d.match(diff_match_patch.whitespaceRegex_),
- c = g && c.match(diff_match_patch.linebreakRegex_),
- d = h && d.match(diff_match_patch.linebreakRegex_),
- i = c && a.match(diff_match_patch.blanklineEndRegex_),
- j = d && b.match(diff_match_patch.blanklineStartRegex_);
- return i || j
- ? 5
- : c || d
- ? 4
- : e && !g && h
- ? 3
- : g || h
- ? 2
- : e || f
- ? 1
- : 0;
- }
- for (var c = 1; c < a.length - 1; ) {
- if (0 == a[c - 1][0] && 0 == a[c + 1][0]) {
- var d = a[c - 1][1],
- e = a[c][1],
- f = a[c + 1][1],
- g = this.diff_commonSuffix(d, e);
- if (g)
- var h = e.substring(e.length - g),
- d = d.substring(0, d.length - g),
- e = h + e.substring(0, e.length - g),
- f = h + f;
- for (
- var g = d, h = e, j = f, i = b(d, e) + b(e, f);
- e.charAt(0) === f.charAt(0);
-
- ) {
- var d = d + e.charAt(0),
- e = e.substring(1) + f.charAt(0),
- f = f.substring(1),
- k = b(d, e) + b(e, f);
- k >= i && ((i = k), (g = d), (h = e), (j = f));
- }
- a[c - 1][1] != g &&
- (g ? (a[c - 1][1] = g) : (a.splice(c - 1, 1), c--),
- (a[c][1] = h),
- j ? (a[c + 1][1] = j) : (a.splice(c + 1, 1), c--));
- }
- c++;
- }
- };
- diff_match_patch.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;
- diff_match_patch.whitespaceRegex_ = /\s/;
- diff_match_patch.linebreakRegex_ = /[\r\n]/;
- diff_match_patch.blanklineEndRegex_ = /\n\r?\n$/;
- diff_match_patch.blanklineStartRegex_ = /^\r?\n\r?\n/;
- diff_match_patch.prototype.diff_cleanupEfficiency = function(a) {
- for (
- var b = !1,
- c = [],
- d = 0,
- e = null,
- f = 0,
- g = !1,
- h = !1,
- j = !1,
- i = !1;
- f < a.length;
-
- ) {
- if (0 == a[f][0])
- a[f][1].length < this.Diff_EditCost && (j || i)
- ? ((c[d++] = f), (g = j), (h = i), (e = a[f][1]))
- : ((d = 0), (e = null)),
- (j = i = !1);
- else if (
- (-1 == a[f][0] ? (i = !0) : (j = !0),
- e &&
- ((g && h && j && i) ||
- (e.length < this.Diff_EditCost / 2 &&
- 3 == g + h + j + i)))
- )
- a.splice(c[d - 1], 0, [-1, e]),
- (a[c[d - 1] + 1][0] = 1),
- d--,
- (e = null),
- g && h
- ? ((j = i = !0), (d = 0))
- : (d--, (f = 0 < d ? c[d - 1] : -1), (j = i = !1)),
- (b = !0);
- f++;
- }
- b && this.diff_cleanupMerge(a);
- };
- diff_match_patch.prototype.diff_cleanupMerge = function(a) {
- a.push([0, ""]);
- for (var b = 0, c = 0, d = 0, e = "", f = "", g; b < a.length; )
- switch (a[b][0]) {
- case 1:
- d++;
- f += a[b][1];
- b++;
- break;
- case -1:
- c++;
- e += a[b][1];
- b++;
- break;
- case 0:
- 1 < c + d
- ? (0 !== c &&
- 0 !== d &&
- ((g = this.diff_commonPrefix(f, e)),
- 0 !== g &&
- (0 < b - c - d && 0 == a[b - c - d - 1][0]
- ? (a[b - c - d - 1][1] += f.substring(
- 0,
- g
- ))
- : (a.splice(0, 0, [0, f.substring(0, g)]),
- b++),
- (f = f.substring(g)),
- (e = e.substring(g))),
- (g = this.diff_commonSuffix(f, e)),
- 0 !== g &&
- ((a[b][1] =
- f.substring(f.length - g) + a[b][1]),
- (f = f.substring(0, f.length - g)),
- (e = e.substring(0, e.length - g)))),
- 0 === c
- ? a.splice(b - d, c + d, [1, f])
- : 0 === d
- ? a.splice(b - c, c + d, [-1, e])
- : a.splice(b - c - d, c + d, [-1, e], [1, f]),
- (b = b - c - d + (c ? 1 : 0) + (d ? 1 : 0) + 1))
- : 0 !== b && 0 == a[b - 1][0]
- ? ((a[b - 1][1] += a[b][1]), a.splice(b, 1))
- : b++,
- (c = d = 0),
- (f = e = "");
- }
- "" === a[a.length - 1][1] && a.pop();
- c = !1;
- for (b = 1; b < a.length - 1; )
- 0 == a[b - 1][0] &&
- 0 == a[b + 1][0] &&
- (a[b][1].substring(a[b][1].length - a[b - 1][1].length) ==
- a[b - 1][1]
- ? ((a[b][1] =
- a[b - 1][1] +
- a[b][1].substring(
- 0,
- a[b][1].length - a[b - 1][1].length
- )),
- (a[b + 1][1] = a[b - 1][1] + a[b + 1][1]),
- a.splice(b - 1, 1),
- (c = !0))
- : a[b][1].substring(0, a[b + 1][1].length) == a[b + 1][1] &&
- ((a[b - 1][1] += a[b + 1][1]),
- (a[b][1] =
- a[b][1].substring(a[b + 1][1].length) + a[b + 1][1]),
- a.splice(b + 1, 1),
- (c = !0))),
- b++;
- c && this.diff_cleanupMerge(a);
- };
- diff_match_patch.prototype.diff_xIndex = function(a, b) {
- var c = 0,
- d = 0,
- e = 0,
- f = 0,
- g;
- for (g = 0; g < a.length; g++) {
- 1 !== a[g][0] && (c += a[g][1].length);
- -1 !== a[g][0] && (d += a[g][1].length);
- if (c > b) break;
- e = c;
- f = d;
- }
- return a.length != g && -1 === a[g][0] ? f : f + (b - e);
- };
- diff_match_patch.prototype.diff_prettyHtml = function(a) {
- for (
- var b = [], c = /&/g, d = //g, f = /\n/g, g = 0;
- g < a.length;
- g++
- ) {
- var h = a[g][0],
- j = a[g][1],
- j = j
- .replace(c, "&")
- .replace(d, "<")
- .replace(e, ">")
- .replace(f, "¶ ");
- switch (h) {
- case 1:
- b[g] = '' + j + " ";
- break;
- case -1:
- b[g] = '' + j + "";
- break;
- case 0:
- b[g] = "" + j + " ";
- }
- }
- return b.join("");
- };
- diff_match_patch.prototype.diff_text1 = function(a) {
- for (var b = [], c = 0; c < a.length; c++)
- 1 !== a[c][0] && (b[c] = a[c][1]);
- return b.join("");
- };
- diff_match_patch.prototype.diff_text2 = function(a) {
- for (var b = [], c = 0; c < a.length; c++)
- -1 !== a[c][0] && (b[c] = a[c][1]);
- return b.join("");
- };
- diff_match_patch.prototype.diff_levenshtein = function(a) {
- for (var b = 0, c = 0, d = 0, e = 0; e < a.length; e++) {
- var f = a[e][0],
- g = a[e][1];
- switch (f) {
- case 1:
- c += g.length;
- break;
- case -1:
- d += g.length;
- break;
- case 0:
- (b += Math.max(c, d)), (d = c = 0);
- }
- }
- return (b += Math.max(c, d));
- };
- diff_match_patch.prototype.diff_toDelta = function(a) {
- for (var b = [], c = 0; c < a.length; c++)
- switch (a[c][0]) {
- case 1:
- b[c] = "+" + encodeURI(a[c][1]);
- break;
- case -1:
- b[c] = "-" + a[c][1].length;
- break;
- case 0:
- b[c] = "=" + a[c][1].length;
- }
- return b.join("\t").replace(/%20/g, " ");
- };
- diff_match_patch.prototype.diff_fromDelta = function(a, b) {
- for (
- var c = [], d = 0, e = 0, f = b.split(/\t/g), g = 0;
- g < f.length;
- g++
- ) {
- var h = f[g].substring(1);
- switch (f[g].charAt(0)) {
- case "+":
- try {
- c[d++] = [1, decodeURI(h)];
- } catch (j) {
- throw Error("Illegal escape in diff_fromDelta: " + h);
- }
- break;
- case "-":
- case "=":
- var i = parseInt(h, 10);
- if (isNaN(i) || 0 > i)
- throw Error("Invalid number in diff_fromDelta: " + h);
- h = a.substring(e, (e += i));
- "=" == f[g].charAt(0)
- ? (c[d++] = [0, h])
- : (c[d++] = [-1, h]);
- break;
- default:
- if (f[g])
- throw Error(
- "Invalid diff operation in diff_fromDelta: " + f[g]
- );
- }
- }
- if (e != a.length)
- throw Error(
- "Delta length (" +
- e +
- ") does not equal source text length (" +
- a.length +
- ")."
- );
- return c;
- };
- diff_match_patch.prototype.match_main = function(a, b, c) {
- if (null == a || null == b || null == c)
- throw Error("Null input. (match_main)");
- c = Math.max(0, Math.min(c, a.length));
- return a == b
- ? 0
- : a.length
- ? a.substring(c, c + b.length) == b
- ? c
- : this.match_bitap_(a, b, c)
- : -1;
- };
- diff_match_patch.prototype.match_bitap_ = function(a, b, c) {
- function d(a, d) {
- var e = a / b.length,
- g = Math.abs(c - d);
- return !f.Match_Distance ? (g ? 1 : e) : e + g / f.Match_Distance;
- }
- if (b.length > this.Match_MaxBits)
- throw Error("Pattern too long for this browser.");
- var e = this.match_alphabet_(b),
- f = this,
- g = this.Match_Threshold,
- h = a.indexOf(b, c);
- -1 != h &&
- ((g = Math.min(d(0, h), g)),
- (h = a.lastIndexOf(b, c + b.length)),
- -1 != h && (g = Math.min(d(0, h), g)));
- for (
- var j = 1 << (b.length - 1),
- h = -1,
- i,
- k,
- q = b.length + a.length,
- r,
- t = 0;
- t < b.length;
- t++
- ) {
- i = 0;
- for (k = q; i < k; )
- d(t, c + k) <= g ? (i = k) : (q = k),
- (k = Math.floor((q - i) / 2 + i));
- q = k;
- i = Math.max(1, c - k + 1);
- var p = Math.min(c + k, a.length) + b.length;
- k = Array(p + 2);
- for (k[p + 1] = (1 << t) - 1; p >= i; p--) {
- var w = e[a.charAt(p - 1)];
- k[p] =
- 0 === t
- ? ((k[p + 1] << 1) | 1) & w
- : (((k[p + 1] << 1) | 1) & w) |
- (((r[p + 1] | r[p]) << 1) | 1) |
- r[p + 1];
- if (k[p] & j && ((w = d(t, p - 1)), w <= g))
- if (((g = w), (h = p - 1), h > c))
- i = Math.max(1, 2 * c - h);
- else break;
- }
- if (d(t + 1, c) > g) break;
- r = k;
- }
- return h;
- };
- diff_match_patch.prototype.match_alphabet_ = function(a) {
- for (var b = {}, c = 0; c < a.length; c++) b[a.charAt(c)] = 0;
- for (c = 0; c < a.length; c++)
- b[a.charAt(c)] |= 1 << (a.length - c - 1);
- return b;
- };
- diff_match_patch.prototype.patch_addContext_ = function(a, b) {
- if (0 != b.length) {
- for (
- var c = b.substring(a.start2, a.start2 + a.length1), d = 0;
- b.indexOf(c) != b.lastIndexOf(c) &&
- c.length <
- this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin;
-
- )
- (d += this.Patch_Margin),
- (c = b.substring(a.start2 - d, a.start2 + a.length1 + d));
- d += this.Patch_Margin;
- (c = b.substring(a.start2 - d, a.start2)) &&
- a.diffs.unshift([0, c]);
- (d = b.substring(a.start2 + a.length1, a.start2 + a.length1 + d)) &&
- a.diffs.push([0, d]);
- a.start1 -= c.length;
- a.start2 -= c.length;
- a.length1 += c.length + d.length;
- a.length2 += c.length + d.length;
- }
- };
- diff_match_patch.prototype.patch_make = function(a, b, c) {
- var d;
- if (
- "string" == typeof a &&
- "string" == typeof b &&
- "undefined" == typeof c
- )
- (d = a),
- (b = this.diff_main(d, b, !0)),
- 2 < b.length &&
- (this.diff_cleanupSemantic(b),
- this.diff_cleanupEfficiency(b));
- else if (
- a &&
- "object" == typeof a &&
- "undefined" == typeof b &&
- "undefined" == typeof c
- )
- (b = a), (d = this.diff_text1(b));
- else if (
- "string" == typeof a &&
- b &&
- "object" == typeof b &&
- "undefined" == typeof c
- )
- d = a;
- else if (
- "string" == typeof a &&
- "string" == typeof b &&
- c &&
- "object" == typeof c
- )
- (d = a), (b = c);
- else throw Error("Unknown call format to patch_make.");
- if (0 === b.length) return [];
- c = [];
- a = new diff_match_patch.patch_obj();
- for (var e = 0, f = 0, g = 0, h = d, j = 0; j < b.length; j++) {
- var i = b[j][0],
- k = b[j][1];
- !e && 0 !== i && ((a.start1 = f), (a.start2 = g));
- switch (i) {
- case 1:
- a.diffs[e++] = b[j];
- a.length2 += k.length;
- d = d.substring(0, g) + k + d.substring(g);
- break;
- case -1:
- a.length1 += k.length;
- a.diffs[e++] = b[j];
- d = d.substring(0, g) + d.substring(g + k.length);
- break;
- case 0:
- k.length <= 2 * this.Patch_Margin && e && b.length != j + 1
- ? ((a.diffs[e++] = b[j]),
- (a.length1 += k.length),
- (a.length2 += k.length))
- : k.length >= 2 * this.Patch_Margin &&
- e &&
- (this.patch_addContext_(a, h),
- c.push(a),
- (a = new diff_match_patch.patch_obj()),
- (e = 0),
- (h = d),
- (f = g));
- }
- 1 !== i && (f += k.length);
- -1 !== i && (g += k.length);
- }
- e && (this.patch_addContext_(a, h), c.push(a));
- return c;
- };
- diff_match_patch.prototype.patch_deepCopy = function(a) {
- for (var b = [], c = 0; c < a.length; c++) {
- var d = a[c],
- e = new diff_match_patch.patch_obj();
- e.diffs = [];
- for (var f = 0; f < d.diffs.length; f++)
- e.diffs[f] = d.diffs[f].slice();
- e.start1 = d.start1;
- e.start2 = d.start2;
- e.length1 = d.length1;
- e.length2 = d.length2;
- b[c] = e;
- }
- return b;
- };
- diff_match_patch.prototype.patch_apply = function(a, b) {
- if (0 == a.length) return [b, []];
- a = this.patch_deepCopy(a);
- var c = this.patch_addPadding(a);
- b = c + b + c;
- this.patch_splitMax(a);
- for (var d = 0, e = [], f = 0; f < a.length; f++) {
- var g = a[f].start2 + d,
- h = this.diff_text1(a[f].diffs),
- j,
- i = -1;
- if (h.length > this.Match_MaxBits) {
- if (
- ((j = this.match_main(
- b,
- h.substring(0, this.Match_MaxBits),
- g
- )),
- -1 != j &&
- ((i = this.match_main(
- b,
- h.substring(h.length - this.Match_MaxBits),
- g + h.length - this.Match_MaxBits
- )),
- -1 == i || j >= i))
- )
- j = -1;
- } else j = this.match_main(b, h, g);
- if (-1 == j) (e[f] = !1), (d -= a[f].length2 - a[f].length1);
- else if (
- ((e[f] = !0),
- (d = j - g),
- (g =
- -1 == i
- ? b.substring(j, j + h.length)
- : b.substring(j, i + this.Match_MaxBits)),
- h == g)
- )
- b =
- b.substring(0, j) +
- this.diff_text2(a[f].diffs) +
- b.substring(j + h.length);
- else if (
- ((g = this.diff_main(h, g, !1)),
- h.length > this.Match_MaxBits &&
- this.diff_levenshtein(g) / h.length >
- this.Patch_DeleteThreshold)
- )
- e[f] = !1;
- else {
- this.diff_cleanupSemanticLossless(g);
- for (var h = 0, k, i = 0; i < a[f].diffs.length; i++) {
- var q = a[f].diffs[i];
- 0 !== q[0] && (k = this.diff_xIndex(g, h));
- 1 === q[0]
- ? (b =
- b.substring(0, j + k) + q[1] + b.substring(j + k))
- : -1 === q[0] &&
- (b =
- b.substring(0, j + k) +
- b.substring(
- j + this.diff_xIndex(g, h + q[1].length)
- ));
- -1 !== q[0] && (h += q[1].length);
- }
- }
- }
- b = b.substring(c.length, b.length - c.length);
- return [b, e];
- };
- diff_match_patch.prototype.patch_addPadding = function(a) {
- for (var b = this.Patch_Margin, c = "", d = 1; d <= b; d++)
- c += String.fromCharCode(d);
- for (d = 0; d < a.length; d++) (a[d].start1 += b), (a[d].start2 += b);
- var d = a[0],
- e = d.diffs;
- if (0 == e.length || 0 != e[0][0])
- e.unshift([0, c]),
- (d.start1 -= b),
- (d.start2 -= b),
- (d.length1 += b),
- (d.length2 += b);
- else if (b > e[0][1].length) {
- var f = b - e[0][1].length;
- e[0][1] = c.substring(e[0][1].length) + e[0][1];
- d.start1 -= f;
- d.start2 -= f;
- d.length1 += f;
- d.length2 += f;
- }
- d = a[a.length - 1];
- e = d.diffs;
- 0 == e.length || 0 != e[e.length - 1][0]
- ? (e.push([0, c]), (d.length1 += b), (d.length2 += b))
- : b > e[e.length - 1][1].length &&
- ((f = b - e[e.length - 1][1].length),
- (e[e.length - 1][1] += c.substring(0, f)),
- (d.length1 += f),
- (d.length2 += f));
- return c;
- };
- diff_match_patch.prototype.patch_splitMax = function(a) {
- for (var b = this.Match_MaxBits, c = 0; c < a.length; c++)
- if (!(a[c].length1 <= b)) {
- var d = a[c];
- a.splice(c--, 1);
- for (
- var e = d.start1, f = d.start2, g = "";
- 0 !== d.diffs.length;
-
- ) {
- var h = new diff_match_patch.patch_obj(),
- j = !0;
- h.start1 = e - g.length;
- h.start2 = f - g.length;
- "" !== g &&
- ((h.length1 = h.length2 = g.length),
- h.diffs.push([0, g]));
- for (
- ;
- 0 !== d.diffs.length &&
- h.length1 < b - this.Patch_Margin;
-
- ) {
- var g = d.diffs[0][0],
- i = d.diffs[0][1];
- 1 === g
- ? ((h.length2 += i.length),
- (f += i.length),
- h.diffs.push(d.diffs.shift()),
- (j = !1))
- : -1 === g &&
- 1 == h.diffs.length &&
- 0 == h.diffs[0][0] &&
- i.length > 2 * b
- ? ((h.length1 += i.length),
- (e += i.length),
- (j = !1),
- h.diffs.push([g, i]),
- d.diffs.shift())
- : ((i = i.substring(
- 0,
- b - h.length1 - this.Patch_Margin
- )),
- (h.length1 += i.length),
- (e += i.length),
- 0 === g
- ? ((h.length2 += i.length), (f += i.length))
- : (j = !1),
- h.diffs.push([g, i]),
- i == d.diffs[0][1]
- ? d.diffs.shift()
- : (d.diffs[0][1] = d.diffs[0][1].substring(
- i.length
- )));
- }
- g = this.diff_text2(h.diffs);
- g = g.substring(g.length - this.Patch_Margin);
- i = this.diff_text1(d.diffs).substring(
- 0,
- this.Patch_Margin
- );
- "" !== i &&
- ((h.length1 += i.length),
- (h.length2 += i.length),
- 0 !== h.diffs.length &&
- 0 === h.diffs[h.diffs.length - 1][0]
- ? (h.diffs[h.diffs.length - 1][1] += i)
- : h.diffs.push([0, i]));
- j || a.splice(++c, 0, h);
- }
- }
- };
- diff_match_patch.prototype.patch_toText = function(a) {
- for (var b = [], c = 0; c < a.length; c++) b[c] = a[c];
- return b.join("");
- };
- diff_match_patch.prototype.patch_fromText = function(a) {
- var b = [];
- if (!a) return b;
- a = a.split("\n");
- for (
- var c = 0, d = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;
- c < a.length;
-
- ) {
- var e = a[c].match(d);
- if (!e) throw Error("Invalid patch string: " + a[c]);
- var f = new diff_match_patch.patch_obj();
- b.push(f);
- f.start1 = parseInt(e[1], 10);
- "" === e[2]
- ? (f.start1--, (f.length1 = 1))
- : "0" == e[2]
- ? (f.length1 = 0)
- : (f.start1--, (f.length1 = parseInt(e[2], 10)));
- f.start2 = parseInt(e[3], 10);
- "" === e[4]
- ? (f.start2--, (f.length2 = 1))
- : "0" == e[4]
- ? (f.length2 = 0)
- : (f.start2--, (f.length2 = parseInt(e[4], 10)));
- for (c++; c < a.length; ) {
- e = a[c].charAt(0);
- try {
- var g = decodeURI(a[c].substring(1));
- } catch (h) {
- throw Error("Illegal escape in patch_fromText: " + g);
- }
- if ("-" == e) f.diffs.push([-1, g]);
- else if ("+" == e) f.diffs.push([1, g]);
- else if (" " == e) f.diffs.push([0, g]);
- else if ("@" == e) break;
- else if ("" !== e)
- throw Error('Invalid patch mode "' + e + '" in: ' + g);
- c++;
- }
- }
- return b;
- };
- diff_match_patch.patch_obj = function() {
- this.diffs = [];
- this.start2 = this.start1 = null;
- this.length2 = this.length1 = 0;
- };
- diff_match_patch.patch_obj.prototype.toString = function() {
- var a, b;
- a =
- 0 === this.length1
- ? this.start1 + ",0"
- : 1 == this.length1
- ? this.start1 + 1
- : this.start1 + 1 + "," + this.length1;
- b =
- 0 === this.length2
- ? this.start2 + ",0"
- : 1 == this.length2
- ? this.start2 + 1
- : this.start2 + 1 + "," + this.length2;
- a = ["@@ -" + a + " +" + b + " @@\n"];
- var c;
- for (b = 0; b < this.diffs.length; b++) {
- switch (this.diffs[b][0]) {
- case 1:
- c = "+";
- break;
- case -1:
- c = "-";
- break;
- case 0:
- c = " ";
- }
- a[b + 1] = c + encodeURI(this.diffs[b][1]) + "\n";
- }
- return a.join("").replace(/%20/g, " ");
- };
- this.diff_match_patch = diff_match_patch;
- this.DIFF_DELETE = -1;
- this.DIFF_INSERT = 1;
- this.DIFF_EQUAL = 0;
-})();
+(function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}
+diff_match_patch.prototype.diff_main=function(a,b,c,d){"undefined"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error("Null input. (diff_main)");if(a==b)return a?[[0,a]]:[];"undefined"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);var f=this.diff_commonSuffix(a,b),g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0,b.length-f);a=this.diff_compute_(a,
+b,e,d);c&&a.unshift([0,c]);g&&a.push([0,g]);this.diff_cleanupMerge(a);return a};
+diff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[[1,b]];if(!b)return[[-1,a]];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[[1,e.substring(0,g)],[0,f],[1,e.substring(g+f.length)]],a.length>b.length&&(c[0][0]=c[2][0]=-1),c):1==f.length?[[-1,a],[1,b]]:(e=this.diff_halfMatch_(a,b))?(f=e[0],a=e[1],g=e[2],b=e[3],e=e[4],f=this.diff_main(f,g,c,d),c=this.diff_main(a,b,c,d),f.concat([[0,e]],c)):c&&100c);v++){for(var n=-v+r;n<=v-t;n+=2){var l=g+n,m;m=n==-v||n!=v&&j[l-1]d)t+=2;else if(s>e)r+=2;else if(q&&(l=g+k-n,0<=l&&l=
+u)return this.diff_bisectSplit_(a,b,m,s,c)}}for(n=-v+p;n<=v-w;n+=2){l=g+n;u=n==-v||n!=v&&i[l-1]d)w+=2;else if(m>e)p+=2;else if(!q&&(l=g+k-n,0<=l&&(l=u)))return this.diff_bisectSplit_(a,b,m,s,c)}}return[[-1,a],[1,b]]};
+diff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)};
+diff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b="",c=0,f=-1,g=d.length;fd?a=a.substring(c-d):c=a.length?[h,j,n,l,g]:null}if(0>=this.Diff_Timeout)return null;
+var d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.lengthd[4].length?g:d:d:g;var j;a.length>b.length?(g=h[0],d=h[1],e=h[2],j=h[3]):(e=h[0],j=h[1],g=h[2],d=h[3]);h=h[4];return[g,d,e,j,h]};
+diff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,j=0,i=0;f=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,[0,c.substring(0,d)]),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,[0,b.substring(0,e)]),a[f-1][0]=1,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=-1,a[f+1][1]=b.substring(e),f++;f++}f++}};
+diff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_),c=g&&c.match(diff_match_patch.linebreakRegex_),d=h&&d.match(diff_match_patch.linebreakRegex_),i=c&&a.match(diff_match_patch.blanklineEndRegex_),j=d&&b.match(diff_match_patch.blanklineStartRegex_);
+return i||j?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c=i&&(i=k,g=d,h=e,j=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c-1,1),c--),a[c][1]=
+h,j?a[c+1][1]=j:(a.splice(c+1,1),c--))}c++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/;
+diff_match_patch.prototype.diff_cleanupEfficiency=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,j=!1,i=!1;fb)break;e=c;f=d}return a.length!=g&&-1===a[g][0]?f:f+(b-e)};
+diff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=//g,f=/\n/g,g=0;g");switch(h){case 1:b[g]=''+j+" ";break;case -1:b[g]=''+j+"";break;case 0:b[g]=""+j+" "}}return b.join("")};
+diff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;ci)throw Error("Invalid number in diff_fromDelta: "+h);h=a.substring(e,e+=i);"="==f[g].charAt(0)?c[d++]=[0,h]:c[d++]=[-1,h];break;default:if(f[g])throw Error("Invalid diff operation in diff_fromDelta: "+
+f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source text length ("+a.length+").");return c};diff_match_patch.prototype.match_main=function(a,b,c){if(null==a||null==b||null==c)throw Error("Null input. (match_main)");c=Math.max(0,Math.min(c,a.length));return a==b?0:a.length?a.substring(c,c+b.length)==b?c:this.match_bitap_(a,b,c):-1};
+diff_match_patch.prototype.match_bitap_=function(a,b,c){function d(a,d){var e=a/b.length,g=Math.abs(c-d);return!f.Match_Distance?g?1:e:e+g/f.Match_Distance}if(b.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));for(var j=1<=i;p--){var w=e[a.charAt(p-1)];k[p]=0===t?(k[p+1]<<1|1)&w:(k[p+1]<<1|1)&w|((r[p+1]|r[p])<<1|1)|r[p+1];if(k[p]&j&&(w=d(t,p-1),w<=g))if(g=w,h=p-1,h>c)i=Math.max(1,2*c-h);else break}if(d(t+1,c)>g)break;r=k}return h};
+diff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c=2*this.Patch_Margin&&
+e&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}1!==i&&(f+=k.length);-1!==i&&(g+=k.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c};diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;cthis.Match_MaxBits){if(j=this.match_main(b,h.substring(0,this.Match_MaxBits),g),-1!=j&&(i=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==i||j>=i))j=-1}else j=this.match_main(b,h,g);
+if(-1==j)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=j-g,g=-1==i?b.substring(j,j+h.length):b.substring(j,i+this.Match_MaxBits),h==g)b=b.substring(0,j)+this.diff_text2(a[f].diffs)+b.substring(j+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);for(var h=0,k,i=0;ie[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs;0==e.length||0!=e[e.length-1][0]?(e.push([0,
+c]),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c};
+diff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c 2*b?(h.length1+=i.length,e+=i.length,j=!1,h.diffs.push([g,i]),d.diffs.shift()):(i=i.substring(0,b-h.length1-this.Patch_Margin),h.length1+=i.length,e+=i.length,0===g?(h.length2+=i.length,f+=i.length):j=!1,h.diffs.push([g,i]),i==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(i.length))}g=this.diff_text2(h.diffs);g=g.substring(g.length-this.Patch_Margin);i=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);""!==i&&
+(h.length1+=i.length,h.length2+=i.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=i:h.diffs.push([0,i]));j||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c= 2.0.0-beta.1",
- 7: ">= 4.0.0"
- };
- b.REVISION_CHANGES = o;
- var p = "[object Object]";
- d.prototype = {
- constructor: d,
- logger: l["default"],
- log: l["default"].log,
- registerHelper: function(a, b) {
- if (f.toString.call(a) === p) {
- if (b)
- throw new h["default"](
- "Arg not supported with multiple helpers"
- );
- f.extend(this.helpers, a);
- } else this.helpers[a] = b;
- },
- unregisterHelper: function(a) {
- delete this.helpers[a];
- },
- registerPartial: function(a, b) {
- if (f.toString.call(a) === p) f.extend(this.partials, a);
- else {
- if ("undefined" == typeof b)
- throw new h["default"](
- 'Attempting to register a partial called "' +
- a +
- '" as undefined'
- );
- this.partials[a] = b;
- }
- },
- unregisterPartial: function(a) {
- delete this.partials[a];
- },
- registerDecorator: function(a, b) {
- if (f.toString.call(a) === p) {
- if (b)
- throw new h["default"](
- "Arg not supported with multiple decorators"
- );
- f.extend(this.decorators, a);
- } else this.decorators[a] = b;
- },
- unregisterDecorator: function(a) {
- delete this.decorators[a];
- }
- };
- var q = l["default"].log;
- (b.log = q),
- (b.createFrame = f.createFrame),
- (b.logger = l["default"]);
- },
- function(a, b) {
- "use strict";
- function c(a) {
- return k[a];
- }
- function d(a) {
- for (var b = 1; b < arguments.length; b++)
- for (var c in arguments[b])
- Object.prototype.hasOwnProperty.call(arguments[b], c) &&
- (a[c] = arguments[b][c]);
- return a;
- }
- function e(a, b) {
- for (var c = 0, d = a.length; d > c; c++)
- if (a[c] === b) return c;
- return -1;
- }
- function f(a) {
- if ("string" != typeof a) {
- if (a && a.toHTML) return a.toHTML();
- if (null == a) return "";
- if (!a) return a + "";
- a = "" + a;
- }
- return m.test(a) ? a.replace(l, c) : a;
- }
- function g(a) {
- return a || 0 === a ? (p(a) && 0 === a.length ? !0 : !1) : !0;
- }
- function h(a) {
- var b = d({}, a);
- return (b._parent = a), b;
- }
- function i(a, b) {
- return (a.path = b), a;
- }
- function j(a, b) {
- return (a ? a + "." : "") + b;
- }
- (b.__esModule = !0),
- (b.extend = d),
- (b.indexOf = e),
- (b.escapeExpression = f),
- (b.isEmpty = g),
- (b.createFrame = h),
- (b.blockParams = i),
- (b.appendContextPath = j);
- var k = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'",
- "`": "`",
- "=": "="
- },
- l = /[&<>"'`=]/g,
- m = /[&<>"'`=]/,
- n = Object.prototype.toString;
- b.toString = n;
- var o = function(a) {
- return "function" == typeof a;
- };
- o(/x/) &&
- (b.isFunction = o = function(a) {
- return (
- "function" == typeof a &&
- "[object Function]" === n.call(a)
- );
- }),
- (b.isFunction = o);
- var p =
- Array.isArray ||
- function(a) {
- return a && "object" == typeof a
- ? "[object Array]" === n.call(a)
- : !1;
- };
- b.isArray = p;
- },
- function(a, b) {
- "use strict";
- function c(a, b) {
- var e = b && b.loc,
- f = void 0,
- g = void 0;
- e &&
- ((f = e.start.line),
- (g = e.start.column),
- (a += " - " + f + ":" + g));
- for (
- var h = Error.prototype.constructor.call(this, a), i = 0;
- i < d.length;
- i++
- )
- this[d[i]] = h[d[i]];
- Error.captureStackTrace && Error.captureStackTrace(this, c),
- e && ((this.lineNumber = f), (this.column = g));
- }
- b.__esModule = !0;
- var d = [
- "description",
- "fileName",
- "lineNumber",
- "message",
- "name",
- "number",
- "stack"
- ];
- (c.prototype = new Error()),
- (b["default"] = c),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- function d(a) {
- g["default"](a),
- i["default"](a),
- k["default"](a),
- m["default"](a),
- o["default"](a),
- q["default"](a),
- s["default"](a);
- }
- var e = c(1)["default"];
- (b.__esModule = !0), (b.registerDefaultHelpers = d);
- var f = c(8),
- g = e(f),
- h = c(9),
- i = e(h),
- j = c(10),
- k = e(j),
- l = c(11),
- m = e(l),
- n = c(12),
- o = e(n),
- p = c(13),
- q = e(p),
- r = c(14),
- s = e(r);
- },
- function(a, b, c) {
- "use strict";
- b.__esModule = !0;
- var d = c(5);
- (b["default"] = function(a) {
- a.registerHelper("blockHelperMissing", function(b, c) {
- var e = c.inverse,
- f = c.fn;
- if (b === !0) return f(this);
- if (b === !1 || null == b) return e(this);
- if (d.isArray(b))
- return b.length > 0
- ? (c.ids && (c.ids = [c.name]),
- a.helpers.each(b, c))
- : e(this);
- if (c.data && c.ids) {
- var g = d.createFrame(c.data);
- (g.contextPath = d.appendContextPath(
- c.data.contextPath,
- c.name
- )),
- (c = { data: g });
- }
- return f(b, c);
- });
- }),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- var d = c(1)["default"];
- b.__esModule = !0;
- var e = c(5),
- f = c(6),
- g = d(f);
- (b["default"] = function(a) {
- a.registerHelper("each", function(a, b) {
- function c(b, c, f) {
- j &&
- ((j.key = b),
- (j.index = c),
- (j.first = 0 === c),
- (j.last = !!f),
- k && (j.contextPath = k + b)),
- (i += d(a[b], {
- data: j,
- blockParams: e.blockParams(
- [a[b], b],
- [k + b, null]
- )
- }));
- }
- if (!b)
- throw new g["default"]("Must pass iterator to #each");
- var d = b.fn,
- f = b.inverse,
- h = 0,
- i = "",
- j = void 0,
- k = void 0;
- if (
- (b.data &&
- b.ids &&
- (k =
- e.appendContextPath(
- b.data.contextPath,
- b.ids[0]
- ) + "."),
- e.isFunction(a) && (a = a.call(this)),
- b.data && (j = e.createFrame(b.data)),
- a && "object" == typeof a)
- )
- if (e.isArray(a))
- for (var l = a.length; l > h; h++)
- h in a && c(h, h, h === a.length - 1);
- else {
- var m = void 0;
- for (var n in a)
- a.hasOwnProperty(n) &&
- (void 0 !== m && c(m, h - 1), (m = n), h++);
- void 0 !== m && c(m, h - 1, !0);
- }
- return 0 === h && (i = f(this)), i;
- });
- }),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- var d = c(1)["default"];
- b.__esModule = !0;
- var e = c(6),
- f = d(e);
- (b["default"] = function(a) {
- a.registerHelper("helperMissing", function() {
- if (1 !== arguments.length)
- throw new f["default"](
- 'Missing helper: "' +
- arguments[arguments.length - 1].name +
- '"'
- );
- });
- }),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- b.__esModule = !0;
- var d = c(5);
- (b["default"] = function(a) {
- a.registerHelper("if", function(a, b) {
- return (
- d.isFunction(a) && (a = a.call(this)),
- (!b.hash.includeZero && !a) || d.isEmpty(a)
- ? b.inverse(this)
- : b.fn(this)
- );
- }),
- a.registerHelper("unless", function(b, c) {
- return a.helpers["if"].call(this, b, {
- fn: c.inverse,
- inverse: c.fn,
- hash: c.hash
- });
- });
- }),
- (a.exports = b["default"]);
- },
- function(a, b) {
- "use strict";
- (b.__esModule = !0),
- (b["default"] = function(a) {
- a.registerHelper("log", function() {
- for (
- var b = [void 0],
- c = arguments[arguments.length - 1],
- d = 0;
- d < arguments.length - 1;
- d++
- )
- b.push(arguments[d]);
- var e = 1;
- null != c.hash.level
- ? (e = c.hash.level)
- : c.data &&
- null != c.data.level &&
- (e = c.data.level),
- (b[0] = e),
- a.log.apply(a, b);
- });
- }),
- (a.exports = b["default"]);
- },
- function(a, b) {
- "use strict";
- (b.__esModule = !0),
- (b["default"] = function(a) {
- a.registerHelper("lookup", function(a, b) {
- return a && a[b];
- });
- }),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- b.__esModule = !0;
- var d = c(5);
- (b["default"] = function(a) {
- a.registerHelper("with", function(a, b) {
- d.isFunction(a) && (a = a.call(this));
- var c = b.fn;
- if (d.isEmpty(a)) return b.inverse(this);
- var e = b.data;
- return (
- b.data &&
- b.ids &&
- ((e = d.createFrame(b.data)),
- (e.contextPath = d.appendContextPath(
- b.data.contextPath,
- b.ids[0]
- ))),
- c(a, {
- data: e,
- blockParams: d.blockParams(
- [a],
- [e && e.contextPath]
- )
- })
- );
- });
- }),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- function d(a) {
- g["default"](a);
- }
- var e = c(1)["default"];
- (b.__esModule = !0), (b.registerDefaultDecorators = d);
- var f = c(16),
- g = e(f);
- },
- function(a, b, c) {
- "use strict";
- b.__esModule = !0;
- var d = c(5);
- (b["default"] = function(a) {
- a.registerDecorator("inline", function(a, b, c, e) {
- var f = a;
- return (
- b.partials ||
- ((b.partials = {}),
- (f = function(e, f) {
- var g = c.partials;
- c.partials = d.extend({}, g, b.partials);
- var h = a(e, f);
- return (c.partials = g), h;
- })),
- (b.partials[e.args[0]] = e.fn),
- f
- );
- });
- }),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- b.__esModule = !0;
- var d = c(5),
- e = {
- methodMap: ["debug", "info", "warn", "error"],
- level: "info",
- lookupLevel: function(a) {
- if ("string" == typeof a) {
- var b = d.indexOf(e.methodMap, a.toLowerCase());
- a = b >= 0 ? b : parseInt(a, 10);
- }
- return a;
- },
- log: function(a) {
- if (
- ((a = e.lookupLevel(a)),
- "undefined" != typeof console &&
- e.lookupLevel(e.level) <= a)
- ) {
- var b = e.methodMap[a];
- console[b] || (b = "log");
- for (
- var c = arguments.length,
- d = Array(c > 1 ? c - 1 : 0),
- f = 1;
- c > f;
- f++
- )
- d[f - 1] = arguments[f];
- console[b].apply(console, d);
- }
- }
- };
- (b["default"] = e), (a.exports = b["default"]);
- },
- function(a, b) {
- "use strict";
- function c(a) {
- this.string = a;
- }
- (b.__esModule = !0),
- (c.prototype.toString = c.prototype.toHTML = function() {
- return "" + this.string;
- }),
- (b["default"] = c),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- function d(a) {
- var b = (a && a[0]) || 1,
- c = r.COMPILER_REVISION;
- if (b !== c) {
- if (c > b) {
- var d = r.REVISION_CHANGES[c],
- e = r.REVISION_CHANGES[b];
- throw new q["default"](
- "Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" +
- d +
- ") or downgrade your runtime to an older version (" +
- e +
- ")."
- );
- }
- throw new q["default"](
- "Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" +
- a[1] +
- ")."
- );
- }
- }
- function e(a, b) {
- function c(c, d, e) {
- e.hash &&
- ((d = o.extend({}, d, e.hash)),
- e.ids && (e.ids[0] = !0)),
- (c = b.VM.resolvePartial.call(this, c, d, e));
- var f = b.VM.invokePartial.call(this, c, d, e);
- if (
- (null == f &&
- b.compile &&
- ((e.partials[e.name] = b.compile(
- c,
- a.compilerOptions,
- b
- )),
- (f = e.partials[e.name](d, e))),
- null != f)
- ) {
- if (e.indent) {
- for (
- var g = f.split("\n"), h = 0, i = g.length;
- i > h && (g[h] || h + 1 !== i);
- h++
- )
- g[h] = e.indent + g[h];
- f = g.join("\n");
- }
- return f;
- }
- throw new q["default"](
- "The partial " +
- e.name +
- " could not be compiled when running in runtime-only mode"
- );
- }
- function d(b) {
- function c(b) {
- return (
- "" + a.main(e, b, e.helpers, e.partials, g, i, h)
- );
- }
- var f =
- arguments.length <= 1 || void 0 === arguments[1]
- ? {}
- : arguments[1],
- g = f.data;
- d._setup(f), !f.partial && a.useData && (g = j(b, g));
- var h = void 0,
- i = a.useBlockParams ? [] : void 0;
- return (
- a.useDepths &&
- (h = f.depths
- ? b !== f.depths[0]
- ? [b].concat(f.depths)
- : f.depths
- : [b]),
- (c = k(a.main, c, e, f.depths || [], g, i))(b, f)
- );
- }
- if (!b)
- throw new q["default"]("No environment passed to template");
- if (!a || !a.main)
- throw new q["default"](
- "Unknown template object: " + typeof a
- );
- (a.main.decorator = a.main_d), b.VM.checkRevision(a.compiler);
- var e = {
- strict: function(a, b) {
- if (!(b in a))
- throw new q["default"](
- '"' + b + '" not defined in ' + a
- );
- return a[b];
- },
- lookup: function(a, b) {
- for (var c = a.length, d = 0; c > d; d++)
- if (a[d] && null != a[d][b]) return a[d][b];
- },
- lambda: function(a, b) {
- return "function" == typeof a ? a.call(b) : a;
- },
- escapeExpression: o.escapeExpression,
- invokePartial: c,
- fn: function(b) {
- var c = a[b];
- return (c.decorator = a[b + "_d"]), c;
- },
- programs: [],
- program: function(a, b, c, d, e) {
- var g = this.programs[a],
- h = this.fn(a);
- return (
- b || e || d || c
- ? (g = f(this, a, h, b, c, d, e))
- : g || (g = this.programs[a] = f(this, a, h)),
- g
- );
- },
- data: function(a, b) {
- for (; a && b--; ) a = a._parent;
- return a;
- },
- merge: function(a, b) {
- var c = a || b;
- return a && b && a !== b && (c = o.extend({}, b, a)), c;
- },
- noop: b.VM.noop,
- compilerInfo: a.compiler
- };
- return (
- (d.isTop = !0),
- (d._setup = function(c) {
- c.partial
- ? ((e.helpers = c.helpers),
- (e.partials = c.partials),
- (e.decorators = c.decorators))
- : ((e.helpers = e.merge(c.helpers, b.helpers)),
- a.usePartial &&
- (e.partials = e.merge(
- c.partials,
- b.partials
- )),
- (a.usePartial || a.useDecorators) &&
- (e.decorators = e.merge(
- c.decorators,
- b.decorators
- )));
- }),
- (d._child = function(b, c, d, g) {
- if (a.useBlockParams && !d)
- throw new q["default"]("must pass block params");
- if (a.useDepths && !g)
- throw new q["default"]("must pass parent depths");
- return f(e, b, a[b], c, 0, d, g);
- }),
- d
- );
- }
- function f(a, b, c, d, e, f, g) {
- function h(b) {
- var e =
- arguments.length <= 1 || void 0 === arguments[1]
- ? {}
- : arguments[1],
- h = g;
- return (
- g && b !== g[0] && (h = [b].concat(g)),
- c(
- a,
- b,
- a.helpers,
- a.partials,
- e.data || d,
- f && [e.blockParams].concat(f),
- h
- )
- );
- }
- return (
- (h = k(c, h, a, g, d, f)),
- (h.program = b),
- (h.depth = g ? g.length : 0),
- (h.blockParams = e || 0),
- h
- );
- }
- function g(a, b, c) {
- return (
- a
- ? a.call ||
- c.name ||
- ((c.name = a), (a = c.partials[a]))
- : (a =
- "@partial-block" === c.name
- ? c.data["partial-block"]
- : c.partials[c.name]),
- a
- );
- }
- function h(a, b, c) {
- (c.partial = !0),
- c.ids &&
- (c.data.contextPath = c.ids[0] || c.data.contextPath);
- var d = void 0;
- if (
- (c.fn &&
- c.fn !== i &&
- ((c.data = r.createFrame(c.data)),
- (d = c.data["partial-block"] = c.fn),
- d.partials &&
- (c.partials = o.extend(
- {},
- c.partials,
- d.partials
- ))),
- void 0 === a && d && (a = d),
- void 0 === a)
- )
- throw new q["default"](
- "The partial " + c.name + " could not be found"
- );
- return a instanceof Function ? a(b, c) : void 0;
- }
- function i() {
- return "";
- }
- function j(a, b) {
- return (
- (b && "root" in b) ||
- ((b = b ? r.createFrame(b) : {}), (b.root = a)),
- b
- );
- }
- function k(a, b, c, d, e, f) {
- if (a.decorator) {
- var g = {};
- (b = a.decorator(b, g, c, d && d[0], e, f, d)),
- o.extend(b, g);
- }
- return b;
- }
- var l = c(3)["default"],
- m = c(1)["default"];
- (b.__esModule = !0),
- (b.checkRevision = d),
- (b.template = e),
- (b.wrapProgram = f),
- (b.resolvePartial = g),
- (b.invokePartial = h),
- (b.noop = i);
- var n = c(5),
- o = l(n),
- p = c(6),
- q = m(p),
- r = c(4);
- },
- function(a, b) {
- (function(c) {
- "use strict";
- (b.__esModule = !0),
- (b["default"] = function(a) {
- var b = "undefined" != typeof c ? c : window,
- d = b.Handlebars;
- a.noConflict = function() {
- return b.Handlebars === a && (b.Handlebars = d), a;
- };
- }),
- (a.exports = b["default"]);
- }.call(
- b,
- (function() {
- return this;
- })()
- ));
- },
- function(a, b) {
- "use strict";
- b.__esModule = !0;
- var c = {
- helpers: {
- helperExpression: function(a) {
- return (
- "SubExpression" === a.type ||
- (("MustacheStatement" === a.type ||
- "BlockStatement" === a.type) &&
- !!((a.params && a.params.length) || a.hash))
- );
- },
- scopedId: function(a) {
- return /^\.|this\b/.test(a.original);
- },
- simpleId: function(a) {
- return (
- 1 === a.parts.length &&
- !c.helpers.scopedId(a) &&
- !a.depth
- );
- }
- }
- };
- (b["default"] = c), (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- function d(a, b) {
- if ("Program" === a.type) return a;
- (h["default"].yy = n),
- (n.locInfo = function(a) {
- return new n.SourceLocation(b && b.srcName, a);
- });
- var c = new j["default"](b);
- return c.accept(h["default"].parse(a));
- }
- var e = c(1)["default"],
- f = c(3)["default"];
- (b.__esModule = !0), (b.parse = d);
- var g = c(23),
- h = e(g),
- i = c(24),
- j = e(i),
- k = c(26),
- l = f(k),
- m = c(5);
- b.parser = h["default"];
- var n = {};
- m.extend(n, l);
- },
- function(a, b) {
- "use strict";
- var c = (function() {
- function a() {
- this.yy = {};
- }
- var b = {
- trace: function() {},
- yy: {},
- symbols_: {
- error: 2,
- root: 3,
- program: 4,
- EOF: 5,
- program_repetition0: 6,
- statement: 7,
- mustache: 8,
- block: 9,
- rawBlock: 10,
- partial: 11,
- partialBlock: 12,
- content: 13,
- COMMENT: 14,
- CONTENT: 15,
- openRawBlock: 16,
- rawBlock_repetition_plus0: 17,
- END_RAW_BLOCK: 18,
- OPEN_RAW_BLOCK: 19,
- helperName: 20,
- openRawBlock_repetition0: 21,
- openRawBlock_option0: 22,
- CLOSE_RAW_BLOCK: 23,
- openBlock: 24,
- block_option0: 25,
- closeBlock: 26,
- openInverse: 27,
- block_option1: 28,
- OPEN_BLOCK: 29,
- openBlock_repetition0: 30,
- openBlock_option0: 31,
- openBlock_option1: 32,
- CLOSE: 33,
- OPEN_INVERSE: 34,
- openInverse_repetition0: 35,
- openInverse_option0: 36,
- openInverse_option1: 37,
- openInverseChain: 38,
- OPEN_INVERSE_CHAIN: 39,
- openInverseChain_repetition0: 40,
- openInverseChain_option0: 41,
- openInverseChain_option1: 42,
- inverseAndProgram: 43,
- INVERSE: 44,
- inverseChain: 45,
- inverseChain_option0: 46,
- OPEN_ENDBLOCK: 47,
- OPEN: 48,
- mustache_repetition0: 49,
- mustache_option0: 50,
- OPEN_UNESCAPED: 51,
- mustache_repetition1: 52,
- mustache_option1: 53,
- CLOSE_UNESCAPED: 54,
- OPEN_PARTIAL: 55,
- partialName: 56,
- partial_repetition0: 57,
- partial_option0: 58,
- openPartialBlock: 59,
- OPEN_PARTIAL_BLOCK: 60,
- openPartialBlock_repetition0: 61,
- openPartialBlock_option0: 62,
- param: 63,
- sexpr: 64,
- OPEN_SEXPR: 65,
- sexpr_repetition0: 66,
- sexpr_option0: 67,
- CLOSE_SEXPR: 68,
- hash: 69,
- hash_repetition_plus0: 70,
- hashSegment: 71,
- ID: 72,
- EQUALS: 73,
- blockParams: 74,
- OPEN_BLOCK_PARAMS: 75,
- blockParams_repetition_plus0: 76,
- CLOSE_BLOCK_PARAMS: 77,
- path: 78,
- dataName: 79,
- STRING: 80,
- NUMBER: 81,
- BOOLEAN: 82,
- UNDEFINED: 83,
- NULL: 84,
- DATA: 85,
- pathSegments: 86,
- SEP: 87,
- $accept: 0,
- $end: 1
- },
- terminals_: {
- 2: "error",
- 5: "EOF",
- 14: "COMMENT",
- 15: "CONTENT",
- 18: "END_RAW_BLOCK",
- 19: "OPEN_RAW_BLOCK",
- 23: "CLOSE_RAW_BLOCK",
- 29: "OPEN_BLOCK",
- 33: "CLOSE",
- 34: "OPEN_INVERSE",
- 39: "OPEN_INVERSE_CHAIN",
- 44: "INVERSE",
- 47: "OPEN_ENDBLOCK",
- 48: "OPEN",
- 51: "OPEN_UNESCAPED",
- 54: "CLOSE_UNESCAPED",
- 55: "OPEN_PARTIAL",
- 60: "OPEN_PARTIAL_BLOCK",
- 65: "OPEN_SEXPR",
- 68: "CLOSE_SEXPR",
- 72: "ID",
- 73: "EQUALS",
- 75: "OPEN_BLOCK_PARAMS",
- 77: "CLOSE_BLOCK_PARAMS",
- 80: "STRING",
- 81: "NUMBER",
- 82: "BOOLEAN",
- 83: "UNDEFINED",
- 84: "NULL",
- 85: "DATA",
- 87: "SEP"
- },
- productions_: [
- 0,
- [3, 2],
- [4, 1],
- [7, 1],
- [7, 1],
- [7, 1],
- [7, 1],
- [7, 1],
- [7, 1],
- [7, 1],
- [13, 1],
- [10, 3],
- [16, 5],
- [9, 4],
- [9, 4],
- [24, 6],
- [27, 6],
- [38, 6],
- [43, 2],
- [45, 3],
- [45, 1],
- [26, 3],
- [8, 5],
- [8, 5],
- [11, 5],
- [12, 3],
- [59, 5],
- [63, 1],
- [63, 1],
- [64, 5],
- [69, 1],
- [71, 3],
- [74, 3],
- [20, 1],
- [20, 1],
- [20, 1],
- [20, 1],
- [20, 1],
- [20, 1],
- [20, 1],
- [56, 1],
- [56, 1],
- [79, 2],
- [78, 1],
- [86, 3],
- [86, 1],
- [6, 0],
- [6, 2],
- [17, 1],
- [17, 2],
- [21, 0],
- [21, 2],
- [22, 0],
- [22, 1],
- [25, 0],
- [25, 1],
- [28, 0],
- [28, 1],
- [30, 0],
- [30, 2],
- [31, 0],
- [31, 1],
- [32, 0],
- [32, 1],
- [35, 0],
- [35, 2],
- [36, 0],
- [36, 1],
- [37, 0],
- [37, 1],
- [40, 0],
- [40, 2],
- [41, 0],
- [41, 1],
- [42, 0],
- [42, 1],
- [46, 0],
- [46, 1],
- [49, 0],
- [49, 2],
- [50, 0],
- [50, 1],
- [52, 0],
- [52, 2],
- [53, 0],
- [53, 1],
- [57, 0],
- [57, 2],
- [58, 0],
- [58, 1],
- [61, 0],
- [61, 2],
- [62, 0],
- [62, 1],
- [66, 0],
- [66, 2],
- [67, 0],
- [67, 1],
- [70, 1],
- [70, 2],
- [76, 1],
- [76, 2]
- ],
- performAction: function(a, b, c, d, e, f, g) {
- var h = f.length - 1;
- switch (e) {
- case 1:
- return f[h - 1];
- case 2:
- this.$ = d.prepareProgram(f[h]);
- break;
- case 3:
- this.$ = f[h];
- break;
- case 4:
- this.$ = f[h];
- break;
- case 5:
- this.$ = f[h];
- break;
- case 6:
- this.$ = f[h];
- break;
- case 7:
- this.$ = f[h];
- break;
- case 8:
- this.$ = f[h];
- break;
- case 9:
- this.$ = {
- type: "CommentStatement",
- value: d.stripComment(f[h]),
- strip: d.stripFlags(f[h], f[h]),
- loc: d.locInfo(this._$)
- };
- break;
- case 10:
- this.$ = {
- type: "ContentStatement",
- original: f[h],
- value: f[h],
- loc: d.locInfo(this._$)
- };
- break;
- case 11:
- this.$ = d.prepareRawBlock(
- f[h - 2],
- f[h - 1],
- f[h],
- this._$
- );
- break;
- case 12:
- this.$ = {
- path: f[h - 3],
- params: f[h - 2],
- hash: f[h - 1]
- };
- break;
- case 13:
- this.$ = d.prepareBlock(
- f[h - 3],
- f[h - 2],
- f[h - 1],
- f[h],
- !1,
- this._$
- );
- break;
- case 14:
- this.$ = d.prepareBlock(
- f[h - 3],
- f[h - 2],
- f[h - 1],
- f[h],
- !0,
- this._$
- );
- break;
- case 15:
- this.$ = {
- open: f[h - 5],
- path: f[h - 4],
- params: f[h - 3],
- hash: f[h - 2],
- blockParams: f[h - 1],
- strip: d.stripFlags(f[h - 5], f[h])
- };
- break;
- case 16:
- this.$ = {
- path: f[h - 4],
- params: f[h - 3],
- hash: f[h - 2],
- blockParams: f[h - 1],
- strip: d.stripFlags(f[h - 5], f[h])
- };
- break;
- case 17:
- this.$ = {
- path: f[h - 4],
- params: f[h - 3],
- hash: f[h - 2],
- blockParams: f[h - 1],
- strip: d.stripFlags(f[h - 5], f[h])
- };
- break;
- case 18:
- this.$ = {
- strip: d.stripFlags(f[h - 1], f[h - 1]),
- program: f[h]
- };
- break;
- case 19:
- var i = d.prepareBlock(
- f[h - 2],
- f[h - 1],
- f[h],
- f[h],
- !1,
- this._$
- ),
- j = d.prepareProgram([i], f[h - 1].loc);
- (j.chained = !0),
- (this.$ = {
- strip: f[h - 2].strip,
- program: j,
- chain: !0
- });
- break;
- case 20:
- this.$ = f[h];
- break;
- case 21:
- this.$ = {
- path: f[h - 1],
- strip: d.stripFlags(f[h - 2], f[h])
- };
- break;
- case 22:
- this.$ = d.prepareMustache(
- f[h - 3],
- f[h - 2],
- f[h - 1],
- f[h - 4],
- d.stripFlags(f[h - 4], f[h]),
- this._$
- );
- break;
- case 23:
- this.$ = d.prepareMustache(
- f[h - 3],
- f[h - 2],
- f[h - 1],
- f[h - 4],
- d.stripFlags(f[h - 4], f[h]),
- this._$
- );
- break;
- case 24:
- this.$ = {
- type: "PartialStatement",
- name: f[h - 3],
- params: f[h - 2],
- hash: f[h - 1],
- indent: "",
- strip: d.stripFlags(f[h - 4], f[h]),
- loc: d.locInfo(this._$)
- };
- break;
- case 25:
- this.$ = d.preparePartialBlock(
- f[h - 2],
- f[h - 1],
- f[h],
- this._$
- );
- break;
- case 26:
- this.$ = {
- path: f[h - 3],
- params: f[h - 2],
- hash: f[h - 1],
- strip: d.stripFlags(f[h - 4], f[h])
- };
- break;
- case 27:
- this.$ = f[h];
- break;
- case 28:
- this.$ = f[h];
- break;
- case 29:
- this.$ = {
- type: "SubExpression",
- path: f[h - 3],
- params: f[h - 2],
- hash: f[h - 1],
- loc: d.locInfo(this._$)
- };
- break;
- case 30:
- this.$ = {
- type: "Hash",
- pairs: f[h],
- loc: d.locInfo(this._$)
- };
- break;
- case 31:
- this.$ = {
- type: "HashPair",
- key: d.id(f[h - 2]),
- value: f[h],
- loc: d.locInfo(this._$)
- };
- break;
- case 32:
- this.$ = d.id(f[h - 1]);
- break;
- case 33:
- this.$ = f[h];
- break;
- case 34:
- this.$ = f[h];
- break;
- case 35:
- this.$ = {
- type: "StringLiteral",
- value: f[h],
- original: f[h],
- loc: d.locInfo(this._$)
- };
- break;
- case 36:
- this.$ = {
- type: "NumberLiteral",
- value: Number(f[h]),
- original: Number(f[h]),
- loc: d.locInfo(this._$)
- };
- break;
- case 37:
- this.$ = {
- type: "BooleanLiteral",
- value: "true" === f[h],
- original: "true" === f[h],
- loc: d.locInfo(this._$)
- };
- break;
- case 38:
- this.$ = {
- type: "UndefinedLiteral",
- original: void 0,
- value: void 0,
- loc: d.locInfo(this._$)
- };
- break;
- case 39:
- this.$ = {
- type: "NullLiteral",
- original: null,
- value: null,
- loc: d.locInfo(this._$)
- };
- break;
- case 40:
- this.$ = f[h];
- break;
- case 41:
- this.$ = f[h];
- break;
- case 42:
- this.$ = d.preparePath(!0, f[h], this._$);
- break;
- case 43:
- this.$ = d.preparePath(!1, f[h], this._$);
- break;
- case 44:
- f[h - 2].push({
- part: d.id(f[h]),
- original: f[h],
- separator: f[h - 1]
- }),
- (this.$ = f[h - 2]);
- break;
- case 45:
- this.$ = [
- { part: d.id(f[h]), original: f[h] }
- ];
- break;
- case 46:
- this.$ = [];
- break;
- case 47:
- f[h - 1].push(f[h]);
- break;
- case 48:
- this.$ = [f[h]];
- break;
- case 49:
- f[h - 1].push(f[h]);
- break;
- case 50:
- this.$ = [];
- break;
- case 51:
- f[h - 1].push(f[h]);
- break;
- case 58:
- this.$ = [];
- break;
- case 59:
- f[h - 1].push(f[h]);
- break;
- case 64:
- this.$ = [];
- break;
- case 65:
- f[h - 1].push(f[h]);
- break;
- case 70:
- this.$ = [];
- break;
- case 71:
- f[h - 1].push(f[h]);
- break;
- case 78:
- this.$ = [];
- break;
- case 79:
- f[h - 1].push(f[h]);
- break;
- case 82:
- this.$ = [];
- break;
- case 83:
- f[h - 1].push(f[h]);
- break;
- case 86:
- this.$ = [];
- break;
- case 87:
- f[h - 1].push(f[h]);
- break;
- case 90:
- this.$ = [];
- break;
- case 91:
- f[h - 1].push(f[h]);
- break;
- case 94:
- this.$ = [];
- break;
- case 95:
- f[h - 1].push(f[h]);
- break;
- case 98:
- this.$ = [f[h]];
- break;
- case 99:
- f[h - 1].push(f[h]);
- break;
- case 100:
- this.$ = [f[h]];
- break;
- case 101:
- f[h - 1].push(f[h]);
- }
- },
- table: [
- {
- 3: 1,
- 4: 2,
- 5: [2, 46],
- 6: 3,
- 14: [2, 46],
- 15: [2, 46],
- 19: [2, 46],
- 29: [2, 46],
- 34: [2, 46],
- 48: [2, 46],
- 51: [2, 46],
- 55: [2, 46],
- 60: [2, 46]
- },
- { 1: [3] },
- { 5: [1, 4] },
- {
- 5: [2, 2],
- 7: 5,
- 8: 6,
- 9: 7,
- 10: 8,
- 11: 9,
- 12: 10,
- 13: 11,
- 14: [1, 12],
- 15: [1, 20],
- 16: 17,
- 19: [1, 23],
- 24: 15,
- 27: 16,
- 29: [1, 21],
- 34: [1, 22],
- 39: [2, 2],
- 44: [2, 2],
- 47: [2, 2],
- 48: [1, 13],
- 51: [1, 14],
- 55: [1, 18],
- 59: 19,
- 60: [1, 24]
- },
- { 1: [2, 1] },
- {
- 5: [2, 47],
- 14: [2, 47],
- 15: [2, 47],
- 19: [2, 47],
- 29: [2, 47],
- 34: [2, 47],
- 39: [2, 47],
- 44: [2, 47],
- 47: [2, 47],
- 48: [2, 47],
- 51: [2, 47],
- 55: [2, 47],
- 60: [2, 47]
- },
- {
- 5: [2, 3],
- 14: [2, 3],
- 15: [2, 3],
- 19: [2, 3],
- 29: [2, 3],
- 34: [2, 3],
- 39: [2, 3],
- 44: [2, 3],
- 47: [2, 3],
- 48: [2, 3],
- 51: [2, 3],
- 55: [2, 3],
- 60: [2, 3]
- },
- {
- 5: [2, 4],
- 14: [2, 4],
- 15: [2, 4],
- 19: [2, 4],
- 29: [2, 4],
- 34: [2, 4],
- 39: [2, 4],
- 44: [2, 4],
- 47: [2, 4],
- 48: [2, 4],
- 51: [2, 4],
- 55: [2, 4],
- 60: [2, 4]
- },
- {
- 5: [2, 5],
- 14: [2, 5],
- 15: [2, 5],
- 19: [2, 5],
- 29: [2, 5],
- 34: [2, 5],
- 39: [2, 5],
- 44: [2, 5],
- 47: [2, 5],
- 48: [2, 5],
- 51: [2, 5],
- 55: [2, 5],
- 60: [2, 5]
- },
- {
- 5: [2, 6],
- 14: [2, 6],
- 15: [2, 6],
- 19: [2, 6],
- 29: [2, 6],
- 34: [2, 6],
- 39: [2, 6],
- 44: [2, 6],
- 47: [2, 6],
- 48: [2, 6],
- 51: [2, 6],
- 55: [2, 6],
- 60: [2, 6]
- },
- {
- 5: [2, 7],
- 14: [2, 7],
- 15: [2, 7],
- 19: [2, 7],
- 29: [2, 7],
- 34: [2, 7],
- 39: [2, 7],
- 44: [2, 7],
- 47: [2, 7],
- 48: [2, 7],
- 51: [2, 7],
- 55: [2, 7],
- 60: [2, 7]
- },
- {
- 5: [2, 8],
- 14: [2, 8],
- 15: [2, 8],
- 19: [2, 8],
- 29: [2, 8],
- 34: [2, 8],
- 39: [2, 8],
- 44: [2, 8],
- 47: [2, 8],
- 48: [2, 8],
- 51: [2, 8],
- 55: [2, 8],
- 60: [2, 8]
- },
- {
- 5: [2, 9],
- 14: [2, 9],
- 15: [2, 9],
- 19: [2, 9],
- 29: [2, 9],
- 34: [2, 9],
- 39: [2, 9],
- 44: [2, 9],
- 47: [2, 9],
- 48: [2, 9],
- 51: [2, 9],
- 55: [2, 9],
- 60: [2, 9]
- },
- {
- 20: 25,
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 20: 36,
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 4: 37,
- 6: 3,
- 14: [2, 46],
- 15: [2, 46],
- 19: [2, 46],
- 29: [2, 46],
- 34: [2, 46],
- 39: [2, 46],
- 44: [2, 46],
- 47: [2, 46],
- 48: [2, 46],
- 51: [2, 46],
- 55: [2, 46],
- 60: [2, 46]
- },
- {
- 4: 38,
- 6: 3,
- 14: [2, 46],
- 15: [2, 46],
- 19: [2, 46],
- 29: [2, 46],
- 34: [2, 46],
- 44: [2, 46],
- 47: [2, 46],
- 48: [2, 46],
- 51: [2, 46],
- 55: [2, 46],
- 60: [2, 46]
- },
- { 13: 40, 15: [1, 20], 17: 39 },
- {
- 20: 42,
- 56: 41,
- 64: 43,
- 65: [1, 44],
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 4: 45,
- 6: 3,
- 14: [2, 46],
- 15: [2, 46],
- 19: [2, 46],
- 29: [2, 46],
- 34: [2, 46],
- 47: [2, 46],
- 48: [2, 46],
- 51: [2, 46],
- 55: [2, 46],
- 60: [2, 46]
- },
- {
- 5: [2, 10],
- 14: [2, 10],
- 15: [2, 10],
- 18: [2, 10],
- 19: [2, 10],
- 29: [2, 10],
- 34: [2, 10],
- 39: [2, 10],
- 44: [2, 10],
- 47: [2, 10],
- 48: [2, 10],
- 51: [2, 10],
- 55: [2, 10],
- 60: [2, 10]
- },
- {
- 20: 46,
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 20: 47,
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 20: 48,
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 20: 42,
- 56: 49,
- 64: 43,
- 65: [1, 44],
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 33: [2, 78],
- 49: 50,
- 65: [2, 78],
- 72: [2, 78],
- 80: [2, 78],
- 81: [2, 78],
- 82: [2, 78],
- 83: [2, 78],
- 84: [2, 78],
- 85: [2, 78]
- },
- {
- 23: [2, 33],
- 33: [2, 33],
- 54: [2, 33],
- 65: [2, 33],
- 68: [2, 33],
- 72: [2, 33],
- 75: [2, 33],
- 80: [2, 33],
- 81: [2, 33],
- 82: [2, 33],
- 83: [2, 33],
- 84: [2, 33],
- 85: [2, 33]
- },
- {
- 23: [2, 34],
- 33: [2, 34],
- 54: [2, 34],
- 65: [2, 34],
- 68: [2, 34],
- 72: [2, 34],
- 75: [2, 34],
- 80: [2, 34],
- 81: [2, 34],
- 82: [2, 34],
- 83: [2, 34],
- 84: [2, 34],
- 85: [2, 34]
- },
- {
- 23: [2, 35],
- 33: [2, 35],
- 54: [2, 35],
- 65: [2, 35],
- 68: [2, 35],
- 72: [2, 35],
- 75: [2, 35],
- 80: [2, 35],
- 81: [2, 35],
- 82: [2, 35],
- 83: [2, 35],
- 84: [2, 35],
- 85: [2, 35]
- },
- {
- 23: [2, 36],
- 33: [2, 36],
- 54: [2, 36],
- 65: [2, 36],
- 68: [2, 36],
- 72: [2, 36],
- 75: [2, 36],
- 80: [2, 36],
- 81: [2, 36],
- 82: [2, 36],
- 83: [2, 36],
- 84: [2, 36],
- 85: [2, 36]
- },
- {
- 23: [2, 37],
- 33: [2, 37],
- 54: [2, 37],
- 65: [2, 37],
- 68: [2, 37],
- 72: [2, 37],
- 75: [2, 37],
- 80: [2, 37],
- 81: [2, 37],
- 82: [2, 37],
- 83: [2, 37],
- 84: [2, 37],
- 85: [2, 37]
- },
- {
- 23: [2, 38],
- 33: [2, 38],
- 54: [2, 38],
- 65: [2, 38],
- 68: [2, 38],
- 72: [2, 38],
- 75: [2, 38],
- 80: [2, 38],
- 81: [2, 38],
- 82: [2, 38],
- 83: [2, 38],
- 84: [2, 38],
- 85: [2, 38]
- },
- {
- 23: [2, 39],
- 33: [2, 39],
- 54: [2, 39],
- 65: [2, 39],
- 68: [2, 39],
- 72: [2, 39],
- 75: [2, 39],
- 80: [2, 39],
- 81: [2, 39],
- 82: [2, 39],
- 83: [2, 39],
- 84: [2, 39],
- 85: [2, 39]
- },
- {
- 23: [2, 43],
- 33: [2, 43],
- 54: [2, 43],
- 65: [2, 43],
- 68: [2, 43],
- 72: [2, 43],
- 75: [2, 43],
- 80: [2, 43],
- 81: [2, 43],
- 82: [2, 43],
- 83: [2, 43],
- 84: [2, 43],
- 85: [2, 43],
- 87: [1, 51]
- },
- { 72: [1, 35], 86: 52 },
- {
- 23: [2, 45],
- 33: [2, 45],
- 54: [2, 45],
- 65: [2, 45],
- 68: [2, 45],
- 72: [2, 45],
- 75: [2, 45],
- 80: [2, 45],
- 81: [2, 45],
- 82: [2, 45],
- 83: [2, 45],
- 84: [2, 45],
- 85: [2, 45],
- 87: [2, 45]
- },
- {
- 52: 53,
- 54: [2, 82],
- 65: [2, 82],
- 72: [2, 82],
- 80: [2, 82],
- 81: [2, 82],
- 82: [2, 82],
- 83: [2, 82],
- 84: [2, 82],
- 85: [2, 82]
- },
- {
- 25: 54,
- 38: 56,
- 39: [1, 58],
- 43: 57,
- 44: [1, 59],
- 45: 55,
- 47: [2, 54]
- },
- { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] },
- { 13: 63, 15: [1, 20], 18: [1, 62] },
- { 15: [2, 48], 18: [2, 48] },
- {
- 33: [2, 86],
- 57: 64,
- 65: [2, 86],
- 72: [2, 86],
- 80: [2, 86],
- 81: [2, 86],
- 82: [2, 86],
- 83: [2, 86],
- 84: [2, 86],
- 85: [2, 86]
- },
- {
- 33: [2, 40],
- 65: [2, 40],
- 72: [2, 40],
- 80: [2, 40],
- 81: [2, 40],
- 82: [2, 40],
- 83: [2, 40],
- 84: [2, 40],
- 85: [2, 40]
- },
- {
- 33: [2, 41],
- 65: [2, 41],
- 72: [2, 41],
- 80: [2, 41],
- 81: [2, 41],
- 82: [2, 41],
- 83: [2, 41],
- 84: [2, 41],
- 85: [2, 41]
- },
- {
- 20: 65,
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- { 26: 66, 47: [1, 67] },
- {
- 30: 68,
- 33: [2, 58],
- 65: [2, 58],
- 72: [2, 58],
- 75: [2, 58],
- 80: [2, 58],
- 81: [2, 58],
- 82: [2, 58],
- 83: [2, 58],
- 84: [2, 58],
- 85: [2, 58]
- },
- {
- 33: [2, 64],
- 35: 69,
- 65: [2, 64],
- 72: [2, 64],
- 75: [2, 64],
- 80: [2, 64],
- 81: [2, 64],
- 82: [2, 64],
- 83: [2, 64],
- 84: [2, 64],
- 85: [2, 64]
- },
- {
- 21: 70,
- 23: [2, 50],
- 65: [2, 50],
- 72: [2, 50],
- 80: [2, 50],
- 81: [2, 50],
- 82: [2, 50],
- 83: [2, 50],
- 84: [2, 50],
- 85: [2, 50]
- },
- {
- 33: [2, 90],
- 61: 71,
- 65: [2, 90],
- 72: [2, 90],
- 80: [2, 90],
- 81: [2, 90],
- 82: [2, 90],
- 83: [2, 90],
- 84: [2, 90],
- 85: [2, 90]
- },
- {
- 20: 75,
- 33: [2, 80],
- 50: 72,
- 63: 73,
- 64: 76,
- 65: [1, 44],
- 69: 74,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- { 72: [1, 80] },
- {
- 23: [2, 42],
- 33: [2, 42],
- 54: [2, 42],
- 65: [2, 42],
- 68: [2, 42],
- 72: [2, 42],
- 75: [2, 42],
- 80: [2, 42],
- 81: [2, 42],
- 82: [2, 42],
- 83: [2, 42],
- 84: [2, 42],
- 85: [2, 42],
- 87: [1, 51]
- },
- {
- 20: 75,
- 53: 81,
- 54: [2, 84],
- 63: 82,
- 64: 76,
- 65: [1, 44],
- 69: 83,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- { 26: 84, 47: [1, 67] },
- { 47: [2, 55] },
- {
- 4: 85,
- 6: 3,
- 14: [2, 46],
- 15: [2, 46],
- 19: [2, 46],
- 29: [2, 46],
- 34: [2, 46],
- 39: [2, 46],
- 44: [2, 46],
- 47: [2, 46],
- 48: [2, 46],
- 51: [2, 46],
- 55: [2, 46],
- 60: [2, 46]
- },
- { 47: [2, 20] },
- {
- 20: 86,
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 4: 87,
- 6: 3,
- 14: [2, 46],
- 15: [2, 46],
- 19: [2, 46],
- 29: [2, 46],
- 34: [2, 46],
- 47: [2, 46],
- 48: [2, 46],
- 51: [2, 46],
- 55: [2, 46],
- 60: [2, 46]
- },
- { 26: 88, 47: [1, 67] },
- { 47: [2, 57] },
- {
- 5: [2, 11],
- 14: [2, 11],
- 15: [2, 11],
- 19: [2, 11],
- 29: [2, 11],
- 34: [2, 11],
- 39: [2, 11],
- 44: [2, 11],
- 47: [2, 11],
- 48: [2, 11],
- 51: [2, 11],
- 55: [2, 11],
- 60: [2, 11]
- },
- { 15: [2, 49], 18: [2, 49] },
- {
- 20: 75,
- 33: [2, 88],
- 58: 89,
- 63: 90,
- 64: 76,
- 65: [1, 44],
- 69: 91,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 65: [2, 94],
- 66: 92,
- 68: [2, 94],
- 72: [2, 94],
- 80: [2, 94],
- 81: [2, 94],
- 82: [2, 94],
- 83: [2, 94],
- 84: [2, 94],
- 85: [2, 94]
- },
- {
- 5: [2, 25],
- 14: [2, 25],
- 15: [2, 25],
- 19: [2, 25],
- 29: [2, 25],
- 34: [2, 25],
- 39: [2, 25],
- 44: [2, 25],
- 47: [2, 25],
- 48: [2, 25],
- 51: [2, 25],
- 55: [2, 25],
- 60: [2, 25]
- },
- {
- 20: 93,
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 20: 75,
- 31: 94,
- 33: [2, 60],
- 63: 95,
- 64: 76,
- 65: [1, 44],
- 69: 96,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 75: [2, 60],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 20: 75,
- 33: [2, 66],
- 36: 97,
- 63: 98,
- 64: 76,
- 65: [1, 44],
- 69: 99,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 75: [2, 66],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 20: 75,
- 22: 100,
- 23: [2, 52],
- 63: 101,
- 64: 76,
- 65: [1, 44],
- 69: 102,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 20: 75,
- 33: [2, 92],
- 62: 103,
- 63: 104,
- 64: 76,
- 65: [1, 44],
- 69: 105,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- { 33: [1, 106] },
- {
- 33: [2, 79],
- 65: [2, 79],
- 72: [2, 79],
- 80: [2, 79],
- 81: [2, 79],
- 82: [2, 79],
- 83: [2, 79],
- 84: [2, 79],
- 85: [2, 79]
- },
- { 33: [2, 81] },
- {
- 23: [2, 27],
- 33: [2, 27],
- 54: [2, 27],
- 65: [2, 27],
- 68: [2, 27],
- 72: [2, 27],
- 75: [2, 27],
- 80: [2, 27],
- 81: [2, 27],
- 82: [2, 27],
- 83: [2, 27],
- 84: [2, 27],
- 85: [2, 27]
- },
- {
- 23: [2, 28],
- 33: [2, 28],
- 54: [2, 28],
- 65: [2, 28],
- 68: [2, 28],
- 72: [2, 28],
- 75: [2, 28],
- 80: [2, 28],
- 81: [2, 28],
- 82: [2, 28],
- 83: [2, 28],
- 84: [2, 28],
- 85: [2, 28]
- },
- {
- 23: [2, 30],
- 33: [2, 30],
- 54: [2, 30],
- 68: [2, 30],
- 71: 107,
- 72: [1, 108],
- 75: [2, 30]
- },
- {
- 23: [2, 98],
- 33: [2, 98],
- 54: [2, 98],
- 68: [2, 98],
- 72: [2, 98],
- 75: [2, 98]
- },
- {
- 23: [2, 45],
- 33: [2, 45],
- 54: [2, 45],
- 65: [2, 45],
- 68: [2, 45],
- 72: [2, 45],
- 73: [1, 109],
- 75: [2, 45],
- 80: [2, 45],
- 81: [2, 45],
- 82: [2, 45],
- 83: [2, 45],
- 84: [2, 45],
- 85: [2, 45],
- 87: [2, 45]
- },
- {
- 23: [2, 44],
- 33: [2, 44],
- 54: [2, 44],
- 65: [2, 44],
- 68: [2, 44],
- 72: [2, 44],
- 75: [2, 44],
- 80: [2, 44],
- 81: [2, 44],
- 82: [2, 44],
- 83: [2, 44],
- 84: [2, 44],
- 85: [2, 44],
- 87: [2, 44]
- },
- { 54: [1, 110] },
- {
- 54: [2, 83],
- 65: [2, 83],
- 72: [2, 83],
- 80: [2, 83],
- 81: [2, 83],
- 82: [2, 83],
- 83: [2, 83],
- 84: [2, 83],
- 85: [2, 83]
- },
- { 54: [2, 85] },
- {
- 5: [2, 13],
- 14: [2, 13],
- 15: [2, 13],
- 19: [2, 13],
- 29: [2, 13],
- 34: [2, 13],
- 39: [2, 13],
- 44: [2, 13],
- 47: [2, 13],
- 48: [2, 13],
- 51: [2, 13],
- 55: [2, 13],
- 60: [2, 13]
- },
- {
- 38: 56,
- 39: [1, 58],
- 43: 57,
- 44: [1, 59],
- 45: 112,
- 46: 111,
- 47: [2, 76]
- },
- {
- 33: [2, 70],
- 40: 113,
- 65: [2, 70],
- 72: [2, 70],
- 75: [2, 70],
- 80: [2, 70],
- 81: [2, 70],
- 82: [2, 70],
- 83: [2, 70],
- 84: [2, 70],
- 85: [2, 70]
- },
- { 47: [2, 18] },
- {
- 5: [2, 14],
- 14: [2, 14],
- 15: [2, 14],
- 19: [2, 14],
- 29: [2, 14],
- 34: [2, 14],
- 39: [2, 14],
- 44: [2, 14],
- 47: [2, 14],
- 48: [2, 14],
- 51: [2, 14],
- 55: [2, 14],
- 60: [2, 14]
- },
- { 33: [1, 114] },
- {
- 33: [2, 87],
- 65: [2, 87],
- 72: [2, 87],
- 80: [2, 87],
- 81: [2, 87],
- 82: [2, 87],
- 83: [2, 87],
- 84: [2, 87],
- 85: [2, 87]
- },
- { 33: [2, 89] },
- {
- 20: 75,
- 63: 116,
- 64: 76,
- 65: [1, 44],
- 67: 115,
- 68: [2, 96],
- 69: 117,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- { 33: [1, 118] },
- { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] },
- {
- 33: [2, 59],
- 65: [2, 59],
- 72: [2, 59],
- 75: [2, 59],
- 80: [2, 59],
- 81: [2, 59],
- 82: [2, 59],
- 83: [2, 59],
- 84: [2, 59],
- 85: [2, 59]
- },
- { 33: [2, 61], 75: [2, 61] },
- { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] },
- {
- 33: [2, 65],
- 65: [2, 65],
- 72: [2, 65],
- 75: [2, 65],
- 80: [2, 65],
- 81: [2, 65],
- 82: [2, 65],
- 83: [2, 65],
- 84: [2, 65],
- 85: [2, 65]
- },
- { 33: [2, 67], 75: [2, 67] },
- { 23: [1, 124] },
- {
- 23: [2, 51],
- 65: [2, 51],
- 72: [2, 51],
- 80: [2, 51],
- 81: [2, 51],
- 82: [2, 51],
- 83: [2, 51],
- 84: [2, 51],
- 85: [2, 51]
- },
- { 23: [2, 53] },
- { 33: [1, 125] },
- {
- 33: [2, 91],
- 65: [2, 91],
- 72: [2, 91],
- 80: [2, 91],
- 81: [2, 91],
- 82: [2, 91],
- 83: [2, 91],
- 84: [2, 91],
- 85: [2, 91]
- },
- { 33: [2, 93] },
- {
- 5: [2, 22],
- 14: [2, 22],
- 15: [2, 22],
- 19: [2, 22],
- 29: [2, 22],
- 34: [2, 22],
- 39: [2, 22],
- 44: [2, 22],
- 47: [2, 22],
- 48: [2, 22],
- 51: [2, 22],
- 55: [2, 22],
- 60: [2, 22]
- },
- {
- 23: [2, 99],
- 33: [2, 99],
- 54: [2, 99],
- 68: [2, 99],
- 72: [2, 99],
- 75: [2, 99]
- },
- { 73: [1, 109] },
- {
- 20: 75,
- 63: 126,
- 64: 76,
- 65: [1, 44],
- 72: [1, 35],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 5: [2, 23],
- 14: [2, 23],
- 15: [2, 23],
- 19: [2, 23],
- 29: [2, 23],
- 34: [2, 23],
- 39: [2, 23],
- 44: [2, 23],
- 47: [2, 23],
- 48: [2, 23],
- 51: [2, 23],
- 55: [2, 23],
- 60: [2, 23]
- },
- { 47: [2, 19] },
- { 47: [2, 77] },
- {
- 20: 75,
- 33: [2, 72],
- 41: 127,
- 63: 128,
- 64: 76,
- 65: [1, 44],
- 69: 129,
- 70: 77,
- 71: 78,
- 72: [1, 79],
- 75: [2, 72],
- 78: 26,
- 79: 27,
- 80: [1, 28],
- 81: [1, 29],
- 82: [1, 30],
- 83: [1, 31],
- 84: [1, 32],
- 85: [1, 34],
- 86: 33
- },
- {
- 5: [2, 24],
- 14: [2, 24],
- 15: [2, 24],
- 19: [2, 24],
- 29: [2, 24],
- 34: [2, 24],
- 39: [2, 24],
- 44: [2, 24],
- 47: [2, 24],
- 48: [2, 24],
- 51: [2, 24],
- 55: [2, 24],
- 60: [2, 24]
- },
- { 68: [1, 130] },
- {
- 65: [2, 95],
- 68: [2, 95],
- 72: [2, 95],
- 80: [2, 95],
- 81: [2, 95],
- 82: [2, 95],
- 83: [2, 95],
- 84: [2, 95],
- 85: [2, 95]
- },
- { 68: [2, 97] },
- {
- 5: [2, 21],
- 14: [2, 21],
- 15: [2, 21],
- 19: [2, 21],
- 29: [2, 21],
- 34: [2, 21],
- 39: [2, 21],
- 44: [2, 21],
- 47: [2, 21],
- 48: [2, 21],
- 51: [2, 21],
- 55: [2, 21],
- 60: [2, 21]
- },
- { 33: [1, 131] },
- { 33: [2, 63] },
- { 72: [1, 133], 76: 132 },
- { 33: [1, 134] },
- { 33: [2, 69] },
- { 15: [2, 12] },
- {
- 14: [2, 26],
- 15: [2, 26],
- 19: [2, 26],
- 29: [2, 26],
- 34: [2, 26],
- 47: [2, 26],
- 48: [2, 26],
- 51: [2, 26],
- 55: [2, 26],
- 60: [2, 26]
- },
- {
- 23: [2, 31],
- 33: [2, 31],
- 54: [2, 31],
- 68: [2, 31],
- 72: [2, 31],
- 75: [2, 31]
- },
- { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] },
- {
- 33: [2, 71],
- 65: [2, 71],
- 72: [2, 71],
- 75: [2, 71],
- 80: [2, 71],
- 81: [2, 71],
- 82: [2, 71],
- 83: [2, 71],
- 84: [2, 71],
- 85: [2, 71]
- },
- { 33: [2, 73], 75: [2, 73] },
- {
- 23: [2, 29],
- 33: [2, 29],
- 54: [2, 29],
- 65: [2, 29],
- 68: [2, 29],
- 72: [2, 29],
- 75: [2, 29],
- 80: [2, 29],
- 81: [2, 29],
- 82: [2, 29],
- 83: [2, 29],
- 84: [2, 29],
- 85: [2, 29]
- },
- {
- 14: [2, 15],
- 15: [2, 15],
- 19: [2, 15],
- 29: [2, 15],
- 34: [2, 15],
- 39: [2, 15],
- 44: [2, 15],
- 47: [2, 15],
- 48: [2, 15],
- 51: [2, 15],
- 55: [2, 15],
- 60: [2, 15]
- },
- { 72: [1, 138], 77: [1, 137] },
- { 72: [2, 100], 77: [2, 100] },
- {
- 14: [2, 16],
- 15: [2, 16],
- 19: [2, 16],
- 29: [2, 16],
- 34: [2, 16],
- 44: [2, 16],
- 47: [2, 16],
- 48: [2, 16],
- 51: [2, 16],
- 55: [2, 16],
- 60: [2, 16]
- },
- { 33: [1, 139] },
- { 33: [2, 75] },
- { 33: [2, 32] },
- { 72: [2, 101], 77: [2, 101] },
- {
- 14: [2, 17],
- 15: [2, 17],
- 19: [2, 17],
- 29: [2, 17],
- 34: [2, 17],
- 39: [2, 17],
- 44: [2, 17],
- 47: [2, 17],
- 48: [2, 17],
- 51: [2, 17],
- 55: [2, 17],
- 60: [2, 17]
- }
- ],
- defaultActions: {
- 4: [2, 1],
- 55: [2, 55],
- 57: [2, 20],
- 61: [2, 57],
- 74: [2, 81],
- 83: [2, 85],
- 87: [2, 18],
- 91: [2, 89],
- 102: [2, 53],
- 105: [2, 93],
- 111: [2, 19],
- 112: [2, 77],
- 117: [2, 97],
- 120: [2, 63],
- 123: [2, 69],
- 124: [2, 12],
- 136: [2, 75],
- 137: [2, 32]
- },
- parseError: function(a, b) {
- throw new Error(a);
- },
- parse: function(a) {
- function b() {
- var a;
- return (
- (a = c.lexer.lex() || 1),
- "number" != typeof a &&
- (a = c.symbols_[a] || a),
- a
- );
- }
- var c = this,
- d = [0],
- e = [null],
- f = [],
- g = this.table,
- h = "",
- i = 0,
- j = 0,
- k = 0;
- this.lexer.setInput(a),
- (this.lexer.yy = this.yy),
- (this.yy.lexer = this.lexer),
- (this.yy.parser = this),
- "undefined" == typeof this.lexer.yylloc &&
- (this.lexer.yylloc = {});
- var l = this.lexer.yylloc;
- f.push(l);
- var m =
- this.lexer.options && this.lexer.options.ranges;
- "function" == typeof this.yy.parseError &&
- (this.parseError = this.yy.parseError);
- for (var n, o, p, q, r, s, t, u, v, w = {}; ; ) {
- if (
- ((p = d[d.length - 1]),
- this.defaultActions[p]
- ? (q = this.defaultActions[p])
- : ((null === n ||
- "undefined" == typeof n) &&
- (n = b()),
- (q = g[p] && g[p][n])),
- "undefined" == typeof q ||
- !q.length ||
- !q[0])
- ) {
- var x = "";
- if (!k) {
- v = [];
- for (s in g[p])
- this.terminals_[s] &&
- s > 2 &&
- v.push(
- "'" +
- this.terminals_[s] +
- "'"
- );
- (x = this.lexer.showPosition
- ? "Parse error on line " +
- (i + 1) +
- ":\n" +
- this.lexer.showPosition() +
- "\nExpecting " +
- v.join(", ") +
- ", got '" +
- (this.terminals_[n] || n) +
- "'"
- : "Parse error on line " +
- (i + 1) +
- ": Unexpected " +
- (1 == n
- ? "end of input"
- : "'" +
- (this.terminals_[n] || n) +
- "'")),
- this.parseError(x, {
- text: this.lexer.match,
- token: this.terminals_[n] || n,
- line: this.lexer.yylineno,
- loc: l,
- expected: v
- });
- }
- }
- if (q[0] instanceof Array && q.length > 1)
- throw new Error(
- "Parse Error: multiple actions possible at state: " +
- p +
- ", token: " +
- n
- );
- switch (q[0]) {
- case 1:
- d.push(n),
- e.push(this.lexer.yytext),
- f.push(this.lexer.yylloc),
- d.push(q[1]),
- (n = null),
- o
- ? ((n = o), (o = null))
- : ((j = this.lexer.yyleng),
- (h = this.lexer.yytext),
- (i = this.lexer.yylineno),
- (l = this.lexer.yylloc),
- k > 0 && k--);
- break;
- case 2:
- if (
- ((t = this.productions_[q[1]][1]),
- (w.$ = e[e.length - t]),
- (w._$ = {
- first_line:
- f[f.length - (t || 1)]
- .first_line,
- last_line:
- f[f.length - 1].last_line,
- first_column:
- f[f.length - (t || 1)]
- .first_column,
- last_column:
- f[f.length - 1].last_column
- }),
- m &&
- (w._$.range = [
- f[f.length - (t || 1)]
- .range[0],
- f[f.length - 1].range[1]
- ]),
- (r = this.performAction.call(
- w,
- h,
- j,
- i,
- this.yy,
- q[1],
- e,
- f
- )),
- "undefined" != typeof r)
- )
- return r;
- t &&
- ((d = d.slice(0, -1 * t * 2)),
- (e = e.slice(0, -1 * t)),
- (f = f.slice(0, -1 * t))),
- d.push(this.productions_[q[1]][0]),
- e.push(w.$),
- f.push(w._$),
- (u =
- g[d[d.length - 2]][
- d[d.length - 1]
- ]),
- d.push(u);
- break;
- case 3:
- return !0;
- }
- }
- return !0;
- }
- },
- c = (function() {
- var a = {
- EOF: 1,
- parseError: function(a, b) {
- if (!this.yy.parser) throw new Error(a);
- this.yy.parser.parseError(a, b);
- },
- setInput: function(a) {
- return (
- (this._input = a),
- (this._more = this._less = this.done = !1),
- (this.yylineno = this.yyleng = 0),
- (this.yytext = this.matched = this.match =
- ""),
- (this.conditionStack = ["INITIAL"]),
- (this.yylloc = {
- first_line: 1,
- first_column: 0,
- last_line: 1,
- last_column: 0
- }),
- this.options.ranges &&
- (this.yylloc.range = [0, 0]),
- (this.offset = 0),
- this
- );
- },
- input: function() {
- var a = this._input[0];
- (this.yytext += a),
- this.yyleng++,
- this.offset++,
- (this.match += a),
- (this.matched += a);
- var b = a.match(/(?:\r\n?|\n).*/g);
- return (
- b
- ? (this.yylineno++,
- this.yylloc.last_line++)
- : this.yylloc.last_column++,
- this.options.ranges &&
- this.yylloc.range[1]++,
- (this._input = this._input.slice(1)),
- a
- );
- },
- unput: function(a) {
- var b = a.length,
- c = a.split(/(?:\r\n?|\n)/g);
- (this._input = a + this._input),
- (this.yytext = this.yytext.substr(
- 0,
- this.yytext.length - b - 1
- )),
- (this.offset -= b);
- var d = this.match.split(/(?:\r\n?|\n)/g);
- (this.match = this.match.substr(
- 0,
- this.match.length - 1
- )),
- (this.matched = this.matched.substr(
- 0,
- this.matched.length - 1
- )),
- c.length - 1 &&
- (this.yylineno -= c.length - 1);
- var e = this.yylloc.range;
- return (
- (this.yylloc = {
- first_line: this.yylloc.first_line,
- last_line: this.yylineno + 1,
- first_column: this.yylloc.first_column,
- last_column: c
- ? (c.length === d.length
- ? this.yylloc.first_column
- : 0) +
- d[d.length - c.length].length -
- c[0].length
- : this.yylloc.first_column - b
- }),
- this.options.ranges &&
- (this.yylloc.range = [
- e[0],
- e[0] + this.yyleng - b
- ]),
- this
- );
- },
- more: function() {
- return (this._more = !0), this;
- },
- less: function(a) {
- this.unput(this.match.slice(a));
- },
- pastInput: function() {
- var a = this.matched.substr(
- 0,
- this.matched.length - this.match.length
- );
- return (
- (a.length > 20 ? "..." : "") +
- a.substr(-20).replace(/\n/g, "")
- );
- },
- upcomingInput: function() {
- var a = this.match;
- return (
- a.length < 20 &&
- (a += this._input.substr(
- 0,
- 20 - a.length
- )),
- (
- a.substr(0, 20) +
- (a.length > 20 ? "..." : "")
- ).replace(/\n/g, "")
- );
- },
- showPosition: function() {
- var a = this.pastInput(),
- b = new Array(a.length + 1).join("-");
- return (
- a + this.upcomingInput() + "\n" + b + "^"
- );
- },
- next: function() {
- if (this.done) return this.EOF;
- this._input || (this.done = !0);
- var a, b, c, d, e;
- this._more ||
- ((this.yytext = ""), (this.match = ""));
- for (
- var f = this._currentRules(), g = 0;
- g < f.length &&
- ((c = this._input.match(this.rules[f[g]])),
- !c ||
- (b && !(c[0].length > b[0].length)) ||
- ((b = c), (d = g), this.options.flex));
- g++
- );
- return b
- ? ((e = b[0].match(/(?:\r\n?|\n).*/g)),
- e && (this.yylineno += e.length),
- (this.yylloc = {
- first_line: this.yylloc.last_line,
- last_line: this.yylineno + 1,
- first_column: this.yylloc.last_column,
- last_column: e
- ? e[e.length - 1].length -
- e[e.length - 1].match(
- /\r?\n?/
- )[0].length
- : this.yylloc.last_column +
- b[0].length
- }),
- (this.yytext += b[0]),
- (this.match += b[0]),
- (this.matches = b),
- (this.yyleng = this.yytext.length),
- this.options.ranges &&
- (this.yylloc.range = [
- this.offset,
- (this.offset += this.yyleng)
- ]),
- (this._more = !1),
- (this._input = this._input.slice(
- b[0].length
- )),
- (this.matched += b[0]),
- (a = this.performAction.call(
- this,
- this.yy,
- this,
- f[d],
- this.conditionStack[
- this.conditionStack.length - 1
- ]
- )),
- this.done &&
- this._input &&
- (this.done = !1),
- a ? a : void 0)
- : "" === this._input
- ? this.EOF
- : this.parseError(
- "Lexical error on line " +
- (this.yylineno + 1) +
- ". Unrecognized text.\n" +
- this.showPosition(),
- {
- text: "",
- token: null,
- line: this.yylineno
- }
- );
- },
- lex: function() {
- var a = this.next();
- return "undefined" != typeof a ? a : this.lex();
- },
- begin: function(a) {
- this.conditionStack.push(a);
- },
- popState: function() {
- return this.conditionStack.pop();
- },
- _currentRules: function() {
- return this.conditions[
- this.conditionStack[
- this.conditionStack.length - 1
- ]
- ].rules;
- },
- topState: function() {
- return this.conditionStack[
- this.conditionStack.length - 2
- ];
- },
- pushState: function(a) {
- this.begin(a);
- }
- };
- return (
- (a.options = {}),
- (a.performAction = function(a, b, c, d) {
- function e(a, c) {
- return (b.yytext = b.yytext.substr(
- a,
- b.yyleng - c
- ));
- }
- switch (c) {
- case 0:
- if (
- ("\\\\" === b.yytext.slice(-2)
- ? (e(0, 1), this.begin("mu"))
- : "\\" === b.yytext.slice(-1)
- ? (e(0, 1), this.begin("emu"))
- : this.begin("mu"),
- b.yytext)
- )
- return 15;
- break;
- case 1:
- return 15;
- case 2:
- return this.popState(), 15;
- case 3:
- return this.begin("raw"), 15;
- case 4:
- return (
- this.popState(),
- "raw" ===
- this.conditionStack[
- this.conditionStack.length - 1
- ]
- ? 15
- : ((b.yytext = b.yytext.substr(
- 5,
- b.yyleng - 9
- )),
- "END_RAW_BLOCK")
- );
- case 5:
- return 15;
- case 6:
- return this.popState(), 14;
- case 7:
- return 65;
- case 8:
- return 68;
- case 9:
- return 19;
- case 10:
- return (
- this.popState(),
- this.begin("raw"),
- 23
- );
- case 11:
- return 55;
- case 12:
- return 60;
- case 13:
- return 29;
- case 14:
- return 47;
- case 15:
- return this.popState(), 44;
- case 16:
- return this.popState(), 44;
- case 17:
- return 34;
- case 18:
- return 39;
- case 19:
- return 51;
- case 20:
- return 48;
- case 21:
- this.unput(b.yytext),
- this.popState(),
- this.begin("com");
- break;
- case 22:
- return this.popState(), 14;
- case 23:
- return 48;
- case 24:
- return 73;
- case 25:
- return 72;
- case 26:
- return 72;
- case 27:
- return 87;
- case 28:
- break;
- case 29:
- return this.popState(), 54;
- case 30:
- return this.popState(), 33;
- case 31:
- return (
- (b.yytext = e(1, 2).replace(
- /\\"/g,
- '"'
- )),
- 80
- );
- case 32:
- return (
- (b.yytext = e(1, 2).replace(
- /\\'/g,
- "'"
- )),
- 80
- );
- case 33:
- return 85;
- case 34:
- return 82;
- case 35:
- return 82;
- case 36:
- return 83;
- case 37:
- return 84;
- case 38:
- return 81;
- case 39:
- return 75;
- case 40:
- return 77;
- case 41:
- return 72;
- case 42:
- return (
- (b.yytext = b.yytext.replace(
- /\\([\\\]])/g,
- "$1"
- )),
- 72
- );
- case 43:
- return "INVALID";
- case 44:
- return 5;
- }
- }),
- (a.rules = [
- /^(?:[^\x00]*?(?=(\{\{)))/,
- /^(?:[^\x00]+)/,
- /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,
- /^(?:\{\{\{\{(?=[^\/]))/,
- /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,
- /^(?:[^\x00]*?(?=(\{\{\{\{)))/,
- /^(?:[\s\S]*?--(~)?\}\})/,
- /^(?:\()/,
- /^(?:\))/,
- /^(?:\{\{\{\{)/,
- /^(?:\}\}\}\})/,
- /^(?:\{\{(~)?>)/,
- /^(?:\{\{(~)?#>)/,
- /^(?:\{\{(~)?#\*?)/,
- /^(?:\{\{(~)?\/)/,
- /^(?:\{\{(~)?\^\s*(~)?\}\})/,
- /^(?:\{\{(~)?\s*else\s*(~)?\}\})/,
- /^(?:\{\{(~)?\^)/,
- /^(?:\{\{(~)?\s*else\b)/,
- /^(?:\{\{(~)?\{)/,
- /^(?:\{\{(~)?&)/,
- /^(?:\{\{(~)?!--)/,
- /^(?:\{\{(~)?![\s\S]*?\}\})/,
- /^(?:\{\{(~)?\*?)/,
- /^(?:=)/,
- /^(?:\.\.)/,
- /^(?:\.(?=([=~}\s\/.)|])))/,
- /^(?:[\/.])/,
- /^(?:\s+)/,
- /^(?:\}(~)?\}\})/,
- /^(?:(~)?\}\})/,
- /^(?:"(\\["]|[^"])*")/,
- /^(?:'(\\[']|[^'])*')/,
- /^(?:@)/,
- /^(?:true(?=([~}\s)])))/,
- /^(?:false(?=([~}\s)])))/,
- /^(?:undefined(?=([~}\s)])))/,
- /^(?:null(?=([~}\s)])))/,
- /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,
- /^(?:as\s+\|)/,
- /^(?:\|)/,
- /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,
- /^(?:\[(\\\]|[^\]])*\])/,
- /^(?:.)/,
- /^(?:$)/
- ]),
- (a.conditions = {
- mu: {
- rules: [
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 17,
- 18,
- 19,
- 20,
- 21,
- 22,
- 23,
- 24,
- 25,
- 26,
- 27,
- 28,
- 29,
- 30,
- 31,
- 32,
- 33,
- 34,
- 35,
- 36,
- 37,
- 38,
- 39,
- 40,
- 41,
- 42,
- 43,
- 44
- ],
- inclusive: !1
- },
- emu: { rules: [2], inclusive: !1 },
- com: { rules: [6], inclusive: !1 },
- raw: { rules: [3, 4, 5], inclusive: !1 },
- INITIAL: { rules: [0, 1, 44], inclusive: !0 }
- }),
- a
- );
- })();
- return (
- (b.lexer = c), (a.prototype = b), (b.Parser = a), new a()
- );
- })();
- (b.__esModule = !0), (b["default"] = c);
- },
- function(a, b, c) {
- "use strict";
- function d() {
- var a =
- arguments.length <= 0 || void 0 === arguments[0]
- ? {}
- : arguments[0];
- this.options = a;
- }
- function e(a, b, c) {
- void 0 === b && (b = a.length);
- var d = a[b - 1],
- e = a[b - 2];
- return d
- ? "ContentStatement" === d.type
- ? (e || !c ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(
- d.original
- )
- : void 0
- : c;
- }
- function f(a, b, c) {
- void 0 === b && (b = -1);
- var d = a[b + 1],
- e = a[b + 2];
- return d
- ? "ContentStatement" === d.type
- ? (e || !c ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(
- d.original
- )
- : void 0
- : c;
- }
- function g(a, b, c) {
- var d = a[null == b ? 0 : b + 1];
- if (
- d &&
- "ContentStatement" === d.type &&
- (c || !d.rightStripped)
- ) {
- var e = d.value;
- (d.value = d.value.replace(
- c ? /^\s+/ : /^[ \t]*\r?\n?/,
- ""
- )),
- (d.rightStripped = d.value !== e);
- }
- }
- function h(a, b, c) {
- var d = a[null == b ? a.length - 1 : b - 1];
- if (
- d &&
- "ContentStatement" === d.type &&
- (c || !d.leftStripped)
- ) {
- var e = d.value;
- return (
- (d.value = d.value.replace(c ? /\s+$/ : /[ \t]+$/, "")),
- (d.leftStripped = d.value !== e),
- d.leftStripped
- );
- }
- }
- var i = c(1)["default"];
- b.__esModule = !0;
- var j = c(25),
- k = i(j);
- (d.prototype = new k["default"]()),
- (d.prototype.Program = function(a) {
- var b = !this.options.ignoreStandalone,
- c = !this.isRootSeen;
- this.isRootSeen = !0;
- for (var d = a.body, i = 0, j = d.length; j > i; i++) {
- var k = d[i],
- l = this.accept(k);
- if (l) {
- var m = e(d, i, c),
- n = f(d, i, c),
- o = l.openStandalone && m,
- p = l.closeStandalone && n,
- q = l.inlineStandalone && m && n;
- l.close && g(d, i, !0),
- l.open && h(d, i, !0),
- b &&
- q &&
- (g(d, i),
- h(d, i) &&
- "PartialStatement" === k.type &&
- (k.indent = /([ \t]+$)/.exec(
- d[i - 1].original
- )[1])),
- b &&
- o &&
- (g((k.program || k.inverse).body), h(d, i)),
- b &&
- p &&
- (g(d, i), h((k.inverse || k.program).body));
- }
- }
- return a;
- }),
- (d.prototype.BlockStatement = d.prototype.DecoratorBlock = d.prototype.PartialBlockStatement = function(
- a
- ) {
- this.accept(a.program), this.accept(a.inverse);
- var b = a.program || a.inverse,
- c = a.program && a.inverse,
- d = c,
- i = c;
- if (c && c.chained)
- for (d = c.body[0].program; i.chained; )
- i = i.body[i.body.length - 1].program;
- var j = {
- open: a.openStrip.open,
- close: a.closeStrip.close,
- openStandalone: f(b.body),
- closeStandalone: e((d || b).body)
- };
- if ((a.openStrip.close && g(b.body, null, !0), c)) {
- var k = a.inverseStrip;
- k.open && h(b.body, null, !0),
- k.close && g(d.body, null, !0),
- a.closeStrip.open && h(i.body, null, !0),
- !this.options.ignoreStandalone &&
- e(b.body) &&
- f(d.body) &&
- (h(b.body), g(d.body));
- } else a.closeStrip.open && h(b.body, null, !0);
- return j;
- }),
- (d.prototype.Decorator = d.prototype.MustacheStatement = function(
- a
- ) {
- return a.strip;
- }),
- (d.prototype.PartialStatement = d.prototype.CommentStatement = function(
- a
- ) {
- var b = a.strip || {};
- return {
- inlineStandalone: !0,
- open: b.open,
- close: b.close
- };
- }),
- (b["default"] = d),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- function d() {
- this.parents = [];
- }
- function e(a) {
- this.acceptRequired(a, "path"),
- this.acceptArray(a.params),
- this.acceptKey(a, "hash");
- }
- function f(a) {
- e.call(this, a),
- this.acceptKey(a, "program"),
- this.acceptKey(a, "inverse");
- }
- function g(a) {
- this.acceptRequired(a, "name"),
- this.acceptArray(a.params),
- this.acceptKey(a, "hash");
- }
- var h = c(1)["default"];
- b.__esModule = !0;
- var i = c(6),
- j = h(i);
- (d.prototype = {
- constructor: d,
- mutating: !1,
- acceptKey: function(a, b) {
- var c = this.accept(a[b]);
- if (this.mutating) {
- if (c && !d.prototype[c.type])
- throw new j["default"](
- 'Unexpected node type "' +
- c.type +
- '" found when accepting ' +
- b +
- " on " +
- a.type
- );
- a[b] = c;
- }
- },
- acceptRequired: function(a, b) {
- if ((this.acceptKey(a, b), !a[b]))
- throw new j["default"](a.type + " requires " + b);
- },
- acceptArray: function(a) {
- for (var b = 0, c = a.length; c > b; b++)
- this.acceptKey(a, b),
- a[b] || (a.splice(b, 1), b--, c--);
- },
- accept: function(a) {
- if (a) {
- if (!this[a.type])
- throw new j["default"](
- "Unknown type: " + a.type,
- a
- );
- this.current && this.parents.unshift(this.current),
- (this.current = a);
- var b = this[a.type](a);
- return (
- (this.current = this.parents.shift()),
- !this.mutating || b ? b : b !== !1 ? a : void 0
- );
- }
- },
- Program: function(a) {
- this.acceptArray(a.body);
- },
- MustacheStatement: e,
- Decorator: e,
- BlockStatement: f,
- DecoratorBlock: f,
- PartialStatement: g,
- PartialBlockStatement: function(a) {
- g.call(this, a), this.acceptKey(a, "program");
- },
- ContentStatement: function() {},
- CommentStatement: function() {},
- SubExpression: e,
- PathExpression: function() {},
- StringLiteral: function() {},
- NumberLiteral: function() {},
- BooleanLiteral: function() {},
- UndefinedLiteral: function() {},
- NullLiteral: function() {},
- Hash: function(a) {
- this.acceptArray(a.pairs);
- },
- HashPair: function(a) {
- this.acceptRequired(a, "value");
- }
- }),
- (b["default"] = d),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- function d(a, b) {
- if (
- ((b = b.path ? b.path.original : b), a.path.original !== b)
- ) {
- var c = { loc: a.path.loc };
- throw new q["default"](
- a.path.original + " doesn't match " + b,
- c
- );
- }
- }
- function e(a, b) {
- (this.source = a),
- (this.start = {
- line: b.first_line,
- column: b.first_column
- }),
- (this.end = { line: b.last_line, column: b.last_column });
- }
- function f(a) {
- return /^\[.*\]$/.test(a) ? a.substr(1, a.length - 2) : a;
- }
- function g(a, b) {
- return {
- open: "~" === a.charAt(2),
- close: "~" === b.charAt(b.length - 3)
- };
- }
- function h(a) {
- return a
- .replace(/^\{\{~?\!-?-?/, "")
- .replace(/-?-?~?\}\}$/, "");
- }
- function i(a, b, c) {
- c = this.locInfo(c);
- for (
- var d = a ? "@" : "",
- e = [],
- f = 0,
- g = "",
- h = 0,
- i = b.length;
- i > h;
- h++
- ) {
- var j = b[h].part,
- k = b[h].original !== j;
- if (
- ((d += (b[h].separator || "") + j),
- k || (".." !== j && "." !== j && "this" !== j))
- )
- e.push(j);
- else {
- if (e.length > 0)
- throw new q["default"]("Invalid path: " + d, {
- loc: c
- });
- ".." === j && (f++, (g += "../"));
- }
- }
- return {
- type: "PathExpression",
- data: a,
- depth: f,
- parts: e,
- original: d,
- loc: c
- };
- }
- function j(a, b, c, d, e, f) {
- var g = d.charAt(3) || d.charAt(2),
- h = "{" !== g && "&" !== g,
- i = /\*/.test(d);
- return {
- type: i ? "Decorator" : "MustacheStatement",
- path: a,
- params: b,
- hash: c,
- escaped: h,
- strip: e,
- loc: this.locInfo(f)
- };
- }
- function k(a, b, c, e) {
- d(a, c), (e = this.locInfo(e));
- var f = { type: "Program", body: b, strip: {}, loc: e };
- return {
- type: "BlockStatement",
- path: a.path,
- params: a.params,
- hash: a.hash,
- program: f,
- openStrip: {},
- inverseStrip: {},
- closeStrip: {},
- loc: e
- };
- }
- function l(a, b, c, e, f, g) {
- e && e.path && d(a, e);
- var h = /\*/.test(a.open);
- b.blockParams = a.blockParams;
- var i = void 0,
- j = void 0;
- if (c) {
- if (h)
- throw new q["default"](
- "Unexpected inverse block on decorator",
- c
- );
- c.chain && (c.program.body[0].closeStrip = e.strip),
- (j = c.strip),
- (i = c.program);
- }
- return (
- f && ((f = i), (i = b), (b = f)),
- {
- type: h ? "DecoratorBlock" : "BlockStatement",
- path: a.path,
- params: a.params,
- hash: a.hash,
- program: b,
- inverse: i,
- openStrip: a.strip,
- inverseStrip: j,
- closeStrip: e && e.strip,
- loc: this.locInfo(g)
- }
- );
- }
- function m(a, b) {
- if (!b && a.length) {
- var c = a[0].loc,
- d = a[a.length - 1].loc;
- c &&
- d &&
- (b = {
- source: c.source,
- start: {
- line: c.start.line,
- column: c.start.column
- },
- end: { line: d.end.line, column: d.end.column }
- });
- }
- return { type: "Program", body: a, strip: {}, loc: b };
- }
- function n(a, b, c, e) {
- return (
- d(a, c),
- {
- type: "PartialBlockStatement",
- name: a.path,
- params: a.params,
- hash: a.hash,
- program: b,
- openStrip: a.strip,
- closeStrip: c && c.strip,
- loc: this.locInfo(e)
- }
- );
- }
- var o = c(1)["default"];
- (b.__esModule = !0),
- (b.SourceLocation = e),
- (b.id = f),
- (b.stripFlags = g),
- (b.stripComment = h),
- (b.preparePath = i),
- (b.prepareMustache = j),
- (b.prepareRawBlock = k),
- (b.prepareBlock = l),
- (b.prepareProgram = m),
- (b.preparePartialBlock = n);
- var p = c(6),
- q = o(p);
- },
- function(a, b, c) {
- "use strict";
- function d() {}
- function e(a, b, c) {
- if (null == a || ("string" != typeof a && "Program" !== a.type))
- throw new k["default"](
- "You must pass a string or Handlebars AST to Handlebars.precompile. You passed " +
- a
- );
- (b = b || {}),
- "data" in b || (b.data = !0),
- b.compat && (b.useDepths = !0);
- var d = c.parse(a, b),
- e = new c.Compiler().compile(d, b);
- return new c.JavaScriptCompiler().compile(e, b);
- }
- function f(a, b, c) {
- function d() {
- var d = c.parse(a, b),
- e = new c.Compiler().compile(d, b),
- f = new c.JavaScriptCompiler().compile(
- e,
- b,
- void 0,
- !0
- );
- return c.template(f);
- }
- function e(a, b) {
- return f || (f = d()), f.call(this, a, b);
- }
- if (
- (void 0 === b && (b = {}),
- null == a || ("string" != typeof a && "Program" !== a.type))
- )
- throw new k["default"](
- "You must pass a string or Handlebars AST to Handlebars.compile. You passed " +
- a
- );
- "data" in b || (b.data = !0), b.compat && (b.useDepths = !0);
- var f = void 0;
- return (
- (e._setup = function(a) {
- return f || (f = d()), f._setup(a);
- }),
- (e._child = function(a, b, c, e) {
- return f || (f = d()), f._child(a, b, c, e);
- }),
- e
- );
- }
- function g(a, b) {
- if (a === b) return !0;
- if (l.isArray(a) && l.isArray(b) && a.length === b.length) {
- for (var c = 0; c < a.length; c++)
- if (!g(a[c], b[c])) return !1;
- return !0;
- }
- }
- function h(a) {
- if (!a.path.parts) {
- var b = a.path;
- a.path = {
- type: "PathExpression",
- data: !1,
- depth: 0,
- parts: [b.original + ""],
- original: b.original + "",
- loc: b.loc
- };
- }
- }
- var i = c(1)["default"];
- (b.__esModule = !0),
- (b.Compiler = d),
- (b.precompile = e),
- (b.compile = f);
- var j = c(6),
- k = i(j),
- l = c(5),
- m = c(21),
- n = i(m),
- o = [].slice;
- d.prototype = {
- compiler: d,
- equals: function(a) {
- var b = this.opcodes.length;
- if (a.opcodes.length !== b) return !1;
- for (var c = 0; b > c; c++) {
- var d = this.opcodes[c],
- e = a.opcodes[c];
- if (d.opcode !== e.opcode || !g(d.args, e.args))
- return !1;
- }
- b = this.children.length;
- for (var c = 0; b > c; c++)
- if (!this.children[c].equals(a.children[c])) return !1;
- return !0;
- },
- guid: 0,
- compile: function(a, b) {
- (this.sourceNode = []),
- (this.opcodes = []),
- (this.children = []),
- (this.options = b),
- (this.stringParams = b.stringParams),
- (this.trackIds = b.trackIds),
- (b.blockParams = b.blockParams || []);
- var c = b.knownHelpers;
- if (
- ((b.knownHelpers = {
- helperMissing: !0,
- blockHelperMissing: !0,
- each: !0,
- if: !0,
- unless: !0,
- with: !0,
- log: !0,
- lookup: !0
- }),
- c)
- )
- for (var d in c) d in c && (b.knownHelpers[d] = c[d]);
- return this.accept(a);
- },
- compileProgram: function(a) {
- var b = new this.compiler(),
- c = b.compile(a, this.options),
- d = this.guid++;
- return (
- (this.usePartial = this.usePartial || c.usePartial),
- (this.children[d] = c),
- (this.useDepths = this.useDepths || c.useDepths),
- d
- );
- },
- accept: function(a) {
- if (!this[a.type])
- throw new k["default"]("Unknown type: " + a.type, a);
- this.sourceNode.unshift(a);
- var b = this[a.type](a);
- return this.sourceNode.shift(), b;
- },
- Program: function(a) {
- this.options.blockParams.unshift(a.blockParams);
- for (var b = a.body, c = b.length, d = 0; c > d; d++)
- this.accept(b[d]);
- return (
- this.options.blockParams.shift(),
- (this.isSimple = 1 === c),
- (this.blockParams = a.blockParams
- ? a.blockParams.length
- : 0),
- this
- );
- },
- BlockStatement: function(a) {
- h(a);
- var b = a.program,
- c = a.inverse;
- (b = b && this.compileProgram(b)),
- (c = c && this.compileProgram(c));
- var d = this.classifySexpr(a);
- "helper" === d
- ? this.helperSexpr(a, b, c)
- : "simple" === d
- ? (this.simpleSexpr(a),
- this.opcode("pushProgram", b),
- this.opcode("pushProgram", c),
- this.opcode("emptyHash"),
- this.opcode("blockValue", a.path.original))
- : (this.ambiguousSexpr(a, b, c),
- this.opcode("pushProgram", b),
- this.opcode("pushProgram", c),
- this.opcode("emptyHash"),
- this.opcode("ambiguousBlockValue")),
- this.opcode("append");
- },
- DecoratorBlock: function(a) {
- var b = a.program && this.compileProgram(a.program),
- c = this.setupFullMustacheParams(a, b, void 0),
- d = a.path;
- (this.useDecorators = !0),
- this.opcode("registerDecorator", c.length, d.original);
- },
- PartialStatement: function(a) {
- this.usePartial = !0;
- var b = a.program;
- b && (b = this.compileProgram(a.program));
- var c = a.params;
- if (c.length > 1)
- throw new k["default"](
- "Unsupported number of partial arguments: " +
- c.length,
- a
- );
- c.length ||
- (this.options.explicitPartialContext
- ? this.opcode("pushLiteral", "undefined")
- : c.push({
- type: "PathExpression",
- parts: [],
- depth: 0
- }));
- var d = a.name.original,
- e = "SubExpression" === a.name.type;
- e && this.accept(a.name),
- this.setupFullMustacheParams(a, b, void 0, !0);
- var f = a.indent || "";
- this.options.preventIndent &&
- f &&
- (this.opcode("appendContent", f), (f = "")),
- this.opcode("invokePartial", e, d, f),
- this.opcode("append");
- },
- PartialBlockStatement: function(a) {
- this.PartialStatement(a);
- },
- MustacheStatement: function(a) {
- this.SubExpression(a),
- a.escaped && !this.options.noEscape
- ? this.opcode("appendEscaped")
- : this.opcode("append");
- },
- Decorator: function(a) {
- this.DecoratorBlock(a);
- },
- ContentStatement: function(a) {
- a.value && this.opcode("appendContent", a.value);
- },
- CommentStatement: function() {},
- SubExpression: function(a) {
- h(a);
- var b = this.classifySexpr(a);
- "simple" === b
- ? this.simpleSexpr(a)
- : "helper" === b
- ? this.helperSexpr(a)
- : this.ambiguousSexpr(a);
- },
- ambiguousSexpr: function(a, b, c) {
- var d = a.path,
- e = d.parts[0],
- f = null != b || null != c;
- this.opcode("getContext", d.depth),
- this.opcode("pushProgram", b),
- this.opcode("pushProgram", c),
- (d.strict = !0),
- this.accept(d),
- this.opcode("invokeAmbiguous", e, f);
- },
- simpleSexpr: function(a) {
- var b = a.path;
- (b.strict = !0),
- this.accept(b),
- this.opcode("resolvePossibleLambda");
- },
- helperSexpr: function(a, b, c) {
- var d = this.setupFullMustacheParams(a, b, c),
- e = a.path,
- f = e.parts[0];
- if (this.options.knownHelpers[f])
- this.opcode("invokeKnownHelper", d.length, f);
- else {
- if (this.options.knownHelpersOnly)
- throw new k["default"](
- "You specified knownHelpersOnly, but used the unknown helper " +
- f,
- a
- );
- (e.strict = !0),
- (e.falsy = !0),
- this.accept(e),
- this.opcode(
- "invokeHelper",
- d.length,
- e.original,
- n["default"].helpers.simpleId(e)
- );
- }
- },
- PathExpression: function(a) {
- this.addDepth(a.depth), this.opcode("getContext", a.depth);
- var b = a.parts[0],
- c = n["default"].helpers.scopedId(a),
- d = !a.depth && !c && this.blockParamIndex(b);
- d
- ? this.opcode("lookupBlockParam", d, a.parts)
- : b
- ? a.data
- ? ((this.options.data = !0),
- this.opcode(
- "lookupData",
- a.depth,
- a.parts,
- a.strict
- ))
- : this.opcode(
- "lookupOnContext",
- a.parts,
- a.falsy,
- a.strict,
- c
- )
- : this.opcode("pushContext");
- },
- StringLiteral: function(a) {
- this.opcode("pushString", a.value);
- },
- NumberLiteral: function(a) {
- this.opcode("pushLiteral", a.value);
- },
- BooleanLiteral: function(a) {
- this.opcode("pushLiteral", a.value);
- },
- UndefinedLiteral: function() {
- this.opcode("pushLiteral", "undefined");
- },
- NullLiteral: function() {
- this.opcode("pushLiteral", "null");
- },
- Hash: function(a) {
- var b = a.pairs,
- c = 0,
- d = b.length;
- for (this.opcode("pushHash"); d > c; c++)
- this.pushParam(b[c].value);
- for (; c--; ) this.opcode("assignToHash", b[c].key);
- this.opcode("popHash");
- },
- opcode: function(a) {
- this.opcodes.push({
- opcode: a,
- args: o.call(arguments, 1),
- loc: this.sourceNode[0].loc
- });
- },
- addDepth: function(a) {
- a && (this.useDepths = !0);
- },
- classifySexpr: function(a) {
- var b = n["default"].helpers.simpleId(a.path),
- c = b && !!this.blockParamIndex(a.path.parts[0]),
- d = !c && n["default"].helpers.helperExpression(a),
- e = !c && (d || b);
- if (e && !d) {
- var f = a.path.parts[0],
- g = this.options;
- g.knownHelpers[f]
- ? (d = !0)
- : g.knownHelpersOnly && (e = !1);
- }
- return d ? "helper" : e ? "ambiguous" : "simple";
- },
- pushParams: function(a) {
- for (var b = 0, c = a.length; c > b; b++)
- this.pushParam(a[b]);
- },
- pushParam: function(a) {
- var b = null != a.value ? a.value : a.original || "";
- if (this.stringParams)
- b.replace &&
- (b = b
- .replace(/^(\.?\.\/)*/g, "")
- .replace(/\//g, ".")),
- a.depth && this.addDepth(a.depth),
- this.opcode("getContext", a.depth || 0),
- this.opcode("pushStringParam", b, a.type),
- "SubExpression" === a.type && this.accept(a);
- else {
- if (this.trackIds) {
- var c = void 0;
- if (
- (!a.parts ||
- n["default"].helpers.scopedId(a) ||
- a.depth ||
- (c = this.blockParamIndex(a.parts[0])),
- c)
- ) {
- var d = a.parts.slice(1).join(".");
- this.opcode("pushId", "BlockParam", c, d);
- } else
- (b = a.original || b),
- b.replace &&
- (b = b
- .replace(/^this(?:\.|$)/, "")
- .replace(/^\.\//, "")
- .replace(/^\.$/, "")),
- this.opcode("pushId", a.type, b);
- }
- this.accept(a);
- }
- },
- setupFullMustacheParams: function(a, b, c, d) {
- var e = a.params;
- return (
- this.pushParams(e),
- this.opcode("pushProgram", b),
- this.opcode("pushProgram", c),
- a.hash
- ? this.accept(a.hash)
- : this.opcode("emptyHash", d),
- e
- );
- },
- blockParamIndex: function(a) {
- for (
- var b = 0, c = this.options.blockParams.length;
- c > b;
- b++
- ) {
- var d = this.options.blockParams[b],
- e = d && l.indexOf(d, a);
- if (d && e >= 0) return [b, e];
- }
- }
- };
- },
- function(a, b, c) {
- "use strict";
- function d(a) {
- this.value = a;
- }
- function e() {}
- function f(a, b, c, d) {
- var e = b.popStack(),
- f = 0,
- g = c.length;
- for (a && g--; g > f; f++) e = b.nameLookup(e, c[f], d);
- return a
- ? [
- b.aliasable("container.strict"),
- "(",
- e,
- ", ",
- b.quotedString(c[f]),
- ")"
- ]
- : e;
- }
- var g = c(1)["default"];
- b.__esModule = !0;
- var h = c(4),
- i = c(6),
- j = g(i),
- k = c(5),
- l = c(29),
- m = g(l);
- (e.prototype = {
- nameLookup: function(a, b) {
- return e.isValidJavaScriptVariableName(b)
- ? [a, ".", b]
- : [a, "[", JSON.stringify(b), "]"];
- },
- depthedLookup: function(a) {
- return [
- this.aliasable("container.lookup"),
- '(depths, "',
- a,
- '")'
- ];
- },
- compilerInfo: function() {
- var a = h.COMPILER_REVISION,
- b = h.REVISION_CHANGES[a];
- return [a, b];
- },
- appendToBuffer: function(a, b, c) {
- return (
- k.isArray(a) || (a = [a]),
- (a = this.source.wrap(a, b)),
- this.environment.isSimple
- ? ["return ", a, ";"]
- : c
- ? ["buffer += ", a, ";"]
- : ((a.appendToBuffer = !0), a)
- );
- },
- initializeBuffer: function() {
- return this.quotedString("");
- },
- compile: function(a, b, c, d) {
- (this.environment = a),
- (this.options = b),
- (this.stringParams = this.options.stringParams),
- (this.trackIds = this.options.trackIds),
- (this.precompile = !d),
- (this.name = this.environment.name),
- (this.isChild = !!c),
- (this.context = c || {
- decorators: [],
- programs: [],
- environments: []
- }),
- this.preamble(),
- (this.stackSlot = 0),
- (this.stackVars = []),
- (this.aliases = {}),
- (this.registers = { list: [] }),
- (this.hashes = []),
- (this.compileStack = []),
- (this.inlineStack = []),
- (this.blockParams = []),
- this.compileChildren(a, b),
- (this.useDepths =
- this.useDepths ||
- a.useDepths ||
- a.useDecorators ||
- this.options.compat),
- (this.useBlockParams =
- this.useBlockParams || a.useBlockParams);
- var e = a.opcodes,
- f = void 0,
- g = void 0,
- h = void 0,
- i = void 0;
- for (h = 0, i = e.length; i > h; h++)
- (f = e[h]),
- (this.source.currentLocation = f.loc),
- (g = g || f.loc),
- this[f.opcode].apply(this, f.args);
- if (
- ((this.source.currentLocation = g),
- this.pushSource(""),
- this.stackSlot ||
- this.inlineStack.length ||
- this.compileStack.length)
- )
- throw new j["default"](
- "Compile completed with content left on stack"
- );
- this.decorators.isEmpty()
- ? (this.decorators = void 0)
- : ((this.useDecorators = !0),
- this.decorators.prepend(
- "var decorators = container.decorators;\n"
- ),
- this.decorators.push("return fn;"),
- d
- ? (this.decorators = Function.apply(this, [
- "fn",
- "props",
- "container",
- "depth0",
- "data",
- "blockParams",
- "depths",
- this.decorators.merge()
- ]))
- : (this.decorators.prepend(
- "function(fn, props, container, depth0, data, blockParams, depths) {\n"
- ),
- this.decorators.push("}\n"),
- (this.decorators = this.decorators.merge())));
- var k = this.createFunctionContext(d);
- if (this.isChild) return k;
- var l = { compiler: this.compilerInfo(), main: k };
- this.decorators &&
- ((l.main_d = this.decorators), (l.useDecorators = !0));
- var m = this.context,
- n = m.programs,
- o = m.decorators;
- for (h = 0, i = n.length; i > h; h++)
- n[h] &&
- ((l[h] = n[h]),
- o[h] &&
- ((l[h + "_d"] = o[h]), (l.useDecorators = !0)));
- return (
- this.environment.usePartial && (l.usePartial = !0),
- this.options.data && (l.useData = !0),
- this.useDepths && (l.useDepths = !0),
- this.useBlockParams && (l.useBlockParams = !0),
- this.options.compat && (l.compat = !0),
- d
- ? (l.compilerOptions = this.options)
- : ((l.compiler = JSON.stringify(l.compiler)),
- (this.source.currentLocation = {
- start: { line: 1, column: 0 }
- }),
- (l = this.objectLiteral(l)),
- b.srcName
- ? ((l = l.toStringWithSourceMap({
- file: b.destName
- })),
- (l.map = l.map && l.map.toString()))
- : (l = l.toString())),
- l
- );
- },
- preamble: function() {
- (this.lastContext = 0),
- (this.source = new m["default"](this.options.srcName)),
- (this.decorators = new m["default"](
- this.options.srcName
- ));
- },
- createFunctionContext: function(a) {
- var b = "",
- c = this.stackVars.concat(this.registers.list);
- c.length > 0 && (b += ", " + c.join(", "));
- var d = 0;
- for (var e in this.aliases) {
- var f = this.aliases[e];
- this.aliases.hasOwnProperty(e) &&
- f.children &&
- f.referenceCount > 1 &&
- ((b += ", alias" + ++d + "=" + e),
- (f.children[0] = "alias" + d));
- }
- var g = [
- "container",
- "depth0",
- "helpers",
- "partials",
- "data"
- ];
- (this.useBlockParams || this.useDepths) &&
- g.push("blockParams"),
- this.useDepths && g.push("depths");
- var h = this.mergeSource(b);
- return a
- ? (g.push(h), Function.apply(this, g))
- : this.source.wrap([
- "function(",
- g.join(","),
- ") {\n ",
- h,
- "}"
- ]);
- },
- mergeSource: function(a) {
- var b = this.environment.isSimple,
- c = !this.forceBuffer,
- d = void 0,
- e = void 0,
- f = void 0,
- g = void 0;
- return (
- this.source.each(function(a) {
- a.appendToBuffer
- ? (f ? a.prepend(" + ") : (f = a), (g = a))
- : (f &&
- (e ? f.prepend("buffer += ") : (d = !0),
- g.add(";"),
- (f = g = void 0)),
- (e = !0),
- b || (c = !1));
- }),
- c
- ? f
- ? (f.prepend("return "), g.add(";"))
- : e || this.source.push('return "";')
- : ((a +=
- ", buffer = " +
- (d ? "" : this.initializeBuffer())),
- f
- ? (f.prepend("return buffer + "), g.add(";"))
- : this.source.push("return buffer;")),
- a &&
- this.source.prepend(
- "var " + a.substring(2) + (d ? "" : ";\n")
- ),
- this.source.merge()
- );
- },
- blockValue: function(a) {
- var b = this.aliasable("helpers.blockHelperMissing"),
- c = [this.contextName(0)];
- this.setupHelperArgs(a, 0, c);
- var d = this.popStack();
- c.splice(1, 0, d),
- this.push(this.source.functionCall(b, "call", c));
- },
- ambiguousBlockValue: function() {
- var a = this.aliasable("helpers.blockHelperMissing"),
- b = [this.contextName(0)];
- this.setupHelperArgs("", 0, b, !0), this.flushInline();
- var c = this.topStack();
- b.splice(1, 0, c),
- this.pushSource([
- "if (!",
- this.lastHelper,
- ") { ",
- c,
- " = ",
- this.source.functionCall(a, "call", b),
- "}"
- ]);
- },
- appendContent: function(a) {
- this.pendingContent
- ? (a = this.pendingContent + a)
- : (this.pendingLocation = this.source.currentLocation),
- (this.pendingContent = a);
- },
- append: function() {
- if (this.isInline())
- this.replaceStack(function(a) {
- return [" != null ? ", a, ' : ""'];
- }),
- this.pushSource(
- this.appendToBuffer(this.popStack())
- );
- else {
- var a = this.popStack();
- this.pushSource([
- "if (",
- a,
- " != null) { ",
- this.appendToBuffer(a, void 0, !0),
- " }"
- ]),
- this.environment.isSimple &&
- this.pushSource([
- "else { ",
- this.appendToBuffer("''", void 0, !0),
- " }"
- ]);
- }
- },
- appendEscaped: function() {
- this.pushSource(
- this.appendToBuffer([
- this.aliasable("container.escapeExpression"),
- "(",
- this.popStack(),
- ")"
- ])
- );
- },
- getContext: function(a) {
- this.lastContext = a;
- },
- pushContext: function() {
- this.pushStackLiteral(this.contextName(this.lastContext));
- },
- lookupOnContext: function(a, b, c, d) {
- var e = 0;
- d || !this.options.compat || this.lastContext
- ? this.pushContext()
- : this.push(this.depthedLookup(a[e++])),
- this.resolvePath("context", a, e, b, c);
- },
- lookupBlockParam: function(a, b) {
- (this.useBlockParams = !0),
- this.push(["blockParams[", a[0], "][", a[1], "]"]),
- this.resolvePath("context", b, 1);
- },
- lookupData: function(a, b, c) {
- a
- ? this.pushStackLiteral(
- "container.data(data, " + a + ")"
- )
- : this.pushStackLiteral("data"),
- this.resolvePath("data", b, 0, !0, c);
- },
- resolvePath: function(a, b, c, d, e) {
- var g = this;
- if (this.options.strict || this.options.assumeObjects)
- return void this.push(
- f(this.options.strict && e, this, b, a)
- );
- for (var h = b.length; h > c; c++)
- this.replaceStack(function(e) {
- var f = g.nameLookup(e, b[c], a);
- return d
- ? [" && ", f]
- : [" != null ? ", f, " : ", e];
- });
- },
- resolvePossibleLambda: function() {
- this.push([
- this.aliasable("container.lambda"),
- "(",
- this.popStack(),
- ", ",
- this.contextName(0),
- ")"
- ]);
- },
- pushStringParam: function(a, b) {
- this.pushContext(),
- this.pushString(b),
- "SubExpression" !== b &&
- ("string" == typeof a
- ? this.pushString(a)
- : this.pushStackLiteral(a));
- },
- emptyHash: function(a) {
- this.trackIds && this.push("{}"),
- this.stringParams && (this.push("{}"), this.push("{}")),
- this.pushStackLiteral(a ? "undefined" : "{}");
- },
- pushHash: function() {
- this.hash && this.hashes.push(this.hash),
- (this.hash = {
- values: [],
- types: [],
- contexts: [],
- ids: []
- });
- },
- popHash: function() {
- var a = this.hash;
- (this.hash = this.hashes.pop()),
- this.trackIds && this.push(this.objectLiteral(a.ids)),
- this.stringParams &&
- (this.push(this.objectLiteral(a.contexts)),
- this.push(this.objectLiteral(a.types))),
- this.push(this.objectLiteral(a.values));
- },
- pushString: function(a) {
- this.pushStackLiteral(this.quotedString(a));
- },
- pushLiteral: function(a) {
- this.pushStackLiteral(a);
- },
- pushProgram: function(a) {
- null != a
- ? this.pushStackLiteral(this.programExpression(a))
- : this.pushStackLiteral(null);
- },
- registerDecorator: function(a, b) {
- var c = this.nameLookup("decorators", b, "decorator"),
- d = this.setupHelperArgs(b, a);
- this.decorators.push([
- "fn = ",
- this.decorators.functionCall(c, "", [
- "fn",
- "props",
- "container",
- d
- ]),
- " || fn;"
- ]);
- },
- invokeHelper: function(a, b, c) {
- var d = this.popStack(),
- e = this.setupHelper(a, b),
- f = c ? [e.name, " || "] : "",
- g = ["("].concat(f, d);
- this.options.strict ||
- g.push(" || ", this.aliasable("helpers.helperMissing")),
- g.push(")"),
- this.push(
- this.source.functionCall(g, "call", e.callParams)
- );
- },
- invokeKnownHelper: function(a, b) {
- var c = this.setupHelper(a, b);
- this.push(
- this.source.functionCall(c.name, "call", c.callParams)
- );
- },
- invokeAmbiguous: function(a, b) {
- this.useRegister("helper");
- var c = this.popStack();
- this.emptyHash();
- var d = this.setupHelper(0, a, b),
- e = (this.lastHelper = this.nameLookup(
- "helpers",
- a,
- "helper"
- )),
- f = ["(", "(helper = ", e, " || ", c, ")"];
- this.options.strict ||
- ((f[0] = "(helper = "),
- f.push(
- " != null ? helper : ",
- this.aliasable("helpers.helperMissing")
- )),
- this.push([
- "(",
- f,
- d.paramsInit ? ["),(", d.paramsInit] : [],
- "),",
- "(typeof helper === ",
- this.aliasable('"function"'),
- " ? ",
- this.source.functionCall(
- "helper",
- "call",
- d.callParams
- ),
- " : helper))"
- ]);
- },
- invokePartial: function(a, b, c) {
- var d = [],
- e = this.setupParams(b, 1, d);
- a && ((b = this.popStack()), delete e.name),
- c && (e.indent = JSON.stringify(c)),
- (e.helpers = "helpers"),
- (e.partials = "partials"),
- (e.decorators = "container.decorators"),
- a
- ? d.unshift(b)
- : d.unshift(
- this.nameLookup("partials", b, "partial")
- ),
- this.options.compat && (e.depths = "depths"),
- (e = this.objectLiteral(e)),
- d.push(e),
- this.push(
- this.source.functionCall(
- "container.invokePartial",
- "",
- d
- )
- );
- },
- assignToHash: function(a) {
- var b = this.popStack(),
- c = void 0,
- d = void 0,
- e = void 0;
- this.trackIds && (e = this.popStack()),
- this.stringParams &&
- ((d = this.popStack()), (c = this.popStack()));
- var f = this.hash;
- c && (f.contexts[a] = c),
- d && (f.types[a] = d),
- e && (f.ids[a] = e),
- (f.values[a] = b);
- },
- pushId: function(a, b, c) {
- "BlockParam" === a
- ? this.pushStackLiteral(
- "blockParams[" +
- b[0] +
- "].path[" +
- b[1] +
- "]" +
- (c ? " + " + JSON.stringify("." + c) : "")
- )
- : "PathExpression" === a
- ? this.pushString(b)
- : "SubExpression" === a
- ? this.pushStackLiteral("true")
- : this.pushStackLiteral("null");
- },
- compiler: e,
- compileChildren: function(a, b) {
- for (
- var c = a.children,
- d = void 0,
- e = void 0,
- f = 0,
- g = c.length;
- g > f;
- f++
- ) {
- (d = c[f]), (e = new this.compiler());
- var h = this.matchExistingProgram(d);
- null == h
- ? (this.context.programs.push(""),
- (h = this.context.programs.length),
- (d.index = h),
- (d.name = "program" + h),
- (this.context.programs[h] = e.compile(
- d,
- b,
- this.context,
- !this.precompile
- )),
- (this.context.decorators[h] = e.decorators),
- (this.context.environments[h] = d),
- (this.useDepths = this.useDepths || e.useDepths),
- (this.useBlockParams =
- this.useBlockParams || e.useBlockParams))
- : ((d.index = h),
- (d.name = "program" + h),
- (this.useDepths = this.useDepths || d.useDepths),
- (this.useBlockParams =
- this.useBlockParams || d.useBlockParams));
- }
- },
- matchExistingProgram: function(a) {
- for (
- var b = 0, c = this.context.environments.length;
- c > b;
- b++
- ) {
- var d = this.context.environments[b];
- if (d && d.equals(a)) return b;
- }
- },
- programExpression: function(a) {
- var b = this.environment.children[a],
- c = [b.index, "data", b.blockParams];
- return (
- (this.useBlockParams || this.useDepths) &&
- c.push("blockParams"),
- this.useDepths && c.push("depths"),
- "container.program(" + c.join(", ") + ")"
- );
- },
- useRegister: function(a) {
- this.registers[a] ||
- ((this.registers[a] = !0), this.registers.list.push(a));
- },
- push: function(a) {
- return (
- a instanceof d || (a = this.source.wrap(a)),
- this.inlineStack.push(a),
- a
- );
- },
- pushStackLiteral: function(a) {
- this.push(new d(a));
- },
- pushSource: function(a) {
- this.pendingContent &&
- (this.source.push(
- this.appendToBuffer(
- this.source.quotedString(this.pendingContent),
- this.pendingLocation
- )
- ),
- (this.pendingContent = void 0)),
- a && this.source.push(a);
- },
- replaceStack: function(a) {
- var b = ["("],
- c = void 0,
- e = void 0,
- f = void 0;
- if (!this.isInline())
- throw new j["default"]("replaceStack on non-inline");
- var g = this.popStack(!0);
- if (g instanceof d)
- (c = [g.value]), (b = ["(", c]), (f = !0);
- else {
- e = !0;
- var h = this.incrStack();
- (b = ["((", this.push(h), " = ", g, ")"]),
- (c = this.topStack());
- }
- var i = a.call(this, c);
- f || this.popStack(),
- e && this.stackSlot--,
- this.push(b.concat(i, ")"));
- },
- incrStack: function() {
- return (
- this.stackSlot++,
- this.stackSlot > this.stackVars.length &&
- this.stackVars.push("stack" + this.stackSlot),
- this.topStackName()
- );
- },
- topStackName: function() {
- return "stack" + this.stackSlot;
- },
- flushInline: function() {
- var a = this.inlineStack;
- this.inlineStack = [];
- for (var b = 0, c = a.length; c > b; b++) {
- var e = a[b];
- if (e instanceof d) this.compileStack.push(e);
- else {
- var f = this.incrStack();
- this.pushSource([f, " = ", e, ";"]),
- this.compileStack.push(f);
- }
- }
- },
- isInline: function() {
- return this.inlineStack.length;
- },
- popStack: function(a) {
- var b = this.isInline(),
- c = (b ? this.inlineStack : this.compileStack).pop();
- if (!a && c instanceof d) return c.value;
- if (!b) {
- if (!this.stackSlot)
- throw new j["default"]("Invalid stack pop");
- this.stackSlot--;
- }
- return c;
- },
- topStack: function() {
- var a = this.isInline()
- ? this.inlineStack
- : this.compileStack,
- b = a[a.length - 1];
- return b instanceof d ? b.value : b;
- },
- contextName: function(a) {
- return this.useDepths && a
- ? "depths[" + a + "]"
- : "depth" + a;
- },
- quotedString: function(a) {
- return this.source.quotedString(a);
- },
- objectLiteral: function(a) {
- return this.source.objectLiteral(a);
- },
- aliasable: function(a) {
- var b = this.aliases[a];
- return b
- ? (b.referenceCount++, b)
- : ((b = this.aliases[a] = this.source.wrap(a)),
- (b.aliasable = !0),
- (b.referenceCount = 1),
- b);
- },
- setupHelper: function(a, b, c) {
- var d = [],
- e = this.setupHelperArgs(b, a, d, c),
- f = this.nameLookup("helpers", b, "helper"),
- g = this.aliasable(
- this.contextName(0) +
- " != null ? " +
- this.contextName(0) +
- " : {}"
- );
- return {
- params: d,
- paramsInit: e,
- name: f,
- callParams: [g].concat(d)
- };
- },
- setupParams: function(a, b, c) {
- var d = {},
- e = [],
- f = [],
- g = [],
- h = !c,
- i = void 0;
- h && (c = []),
- (d.name = this.quotedString(a)),
- (d.hash = this.popStack()),
- this.trackIds && (d.hashIds = this.popStack()),
- this.stringParams &&
- ((d.hashTypes = this.popStack()),
- (d.hashContexts = this.popStack()));
- var j = this.popStack(),
- k = this.popStack();
- (k || j) &&
- ((d.fn = k || "container.noop"),
- (d.inverse = j || "container.noop"));
- for (var l = b; l--; )
- (i = this.popStack()),
- (c[l] = i),
- this.trackIds && (g[l] = this.popStack()),
- this.stringParams &&
- ((f[l] = this.popStack()),
- (e[l] = this.popStack()));
- return (
- h && (d.args = this.source.generateArray(c)),
- this.trackIds && (d.ids = this.source.generateArray(g)),
- this.stringParams &&
- ((d.types = this.source.generateArray(f)),
- (d.contexts = this.source.generateArray(e))),
- this.options.data && (d.data = "data"),
- this.useBlockParams && (d.blockParams = "blockParams"),
- d
- );
- },
- setupHelperArgs: function(a, b, c, d) {
- var e = this.setupParams(a, b, c);
- return (
- (e = this.objectLiteral(e)),
- d
- ? (this.useRegister("options"),
- c.push("options"),
- ["options=", e])
- : c
- ? (c.push(e), "")
- : e
- );
- }
- }),
- (function() {
- for (
- var a = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(
- " "
- ),
- b = (e.RESERVED_WORDS = {}),
- c = 0,
- d = a.length;
- d > c;
- c++
- )
- b[a[c]] = !0;
- })(),
- (e.isValidJavaScriptVariableName = function(a) {
- return (
- !e.RESERVED_WORDS[a] &&
- /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)
- );
- }),
- (b["default"] = e),
- (a.exports = b["default"]);
- },
- function(a, b, c) {
- "use strict";
- function d(a, b, c) {
- if (f.isArray(a)) {
- for (var d = [], e = 0, g = a.length; g > e; e++)
- d.push(b.wrap(a[e], c));
- return d;
- }
- return "boolean" == typeof a || "number" == typeof a
- ? a + ""
- : a;
- }
- function e(a) {
- (this.srcFile = a), (this.source = []);
- }
- b.__esModule = !0;
- var f = c(5),
- g = void 0;
- try {
- } catch (h) {}
- g ||
- ((g = function(a, b, c, d) {
- (this.src = ""), d && this.add(d);
- }),
- (g.prototype = {
- add: function(a) {
- f.isArray(a) && (a = a.join("")), (this.src += a);
- },
- prepend: function(a) {
- f.isArray(a) && (a = a.join("")),
- (this.src = a + this.src);
- },
- toStringWithSourceMap: function() {
- return { code: this.toString() };
- },
- toString: function() {
- return this.src;
- }
- })),
- (e.prototype = {
- isEmpty: function() {
- return !this.source.length;
- },
- prepend: function(a, b) {
- this.source.unshift(this.wrap(a, b));
- },
- push: function(a, b) {
- this.source.push(this.wrap(a, b));
- },
- merge: function() {
- var a = this.empty();
- return (
- this.each(function(b) {
- a.add([" ", b, "\n"]);
- }),
- a
- );
- },
- each: function(a) {
- for (var b = 0, c = this.source.length; c > b; b++)
- a(this.source[b]);
- },
- empty: function() {
- var a = this.currentLocation || { start: {} };
- return new g(
- a.start.line,
- a.start.column,
- this.srcFile
- );
- },
- wrap: function(a) {
- var b =
- arguments.length <= 1 || void 0 === arguments[1]
- ? this.currentLocation || { start: {} }
- : arguments[1];
- return a instanceof g
- ? a
- : ((a = d(a, this, b)),
- new g(
- b.start.line,
- b.start.column,
- this.srcFile,
- a
- ));
- },
- functionCall: function(a, b, c) {
- return (
- (c = this.generateList(c)),
- this.wrap([a, b ? "." + b + "(" : "(", c, ")"])
- );
- },
- quotedString: function(a) {
- return (
- '"' +
- (a + "")
- .replace(/\\/g, "\\\\")
- .replace(/"/g, '\\"')
- .replace(/\n/g, "\\n")
- .replace(/\r/g, "\\r")
- .replace(/\u2028/g, "\\u2028")
- .replace(/\u2029/g, "\\u2029") +
- '"'
- );
- },
- objectLiteral: function(a) {
- var b = [];
- for (var c in a)
- if (a.hasOwnProperty(c)) {
- var e = d(a[c], this);
- "undefined" !== e &&
- b.push([this.quotedString(c), ":", e]);
- }
- var f = this.generateList(b);
- return f.prepend("{"), f.add("}"), f;
- },
- generateList: function(a) {
- for (
- var b = this.empty(), c = 0, e = a.length;
- e > c;
- c++
- )
- c && b.add(","), b.add(d(a[c], this));
- return b;
- },
- generateArray: function(a) {
- var b = this.generateList(a);
- return b.prepend("["), b.add("]"), b;
- }
- }),
- (b["default"] = e),
- (a.exports = b["default"]);
- }
- ]);
-});
+!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(21),i=e(h),j=c(22),k=c(27),l=c(28),m=e(l),n=c(25),o=e(n),p=c(20),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(18),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(19),p=e(o),q=c(20),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(7),j=c(15),k=c(17),l=e(k),m="4.0.5";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;bc;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return a||0===a?p(a)&&0===a.length?!0:!1:!0}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===n.call(a):!1};b.isArray=p},function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;l>h;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;c>f;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=r.COMPILER_REVISION;if(b!==c){if(c>b){var d=r.REVISION_CHANGES[c],e=r.REVISION_CHANGES[b];throw new q["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new q["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=o.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;i>h&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new q["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!==f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new q["default"]("No environment passed to template");if(!a||!a.main)throw new q["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new q["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:o.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=o.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new q["default"]("must pass block params");if(a.useDepths&&!g)throw new q["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!==g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var d=void 0;if(c.fn&&c.fn!==i&&(c.data=r.createFrame(c.data),d=c.data["partial-block"]=c.fn,d.partials&&(c.partials=o.extend({},c.partials,d.partials))),void 0===a&&d&&(a=d),void 0===a)throw new q["default"]("The partial "+c.name+" could not be found");return a instanceof Function?a(b,c):void 0}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?r.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),o.extend(b,g)}return b}var l=c(3)["default"],m=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var n=c(5),o=l(n),p=c(6),q=m(p),r=c(4)},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;h["default"].yy=n,n.locInfo=function(a){return new n.SourceLocation(b&&b.srcName,a)};var c=new j["default"](b);return c.accept(h["default"].parse(a))}var e=c(1)["default"],f=c(3)["default"];b.__esModule=!0,b.parse=d;var g=c(23),h=e(g),i=c(24),j=e(i),k=c(26),l=f(k),m=c(5);b.parser=h["default"];var n={};m.extend(n,l)},function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],
+48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.__esModule=!0,b["default"]=c},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(25),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;j>i;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;c>b;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;i>h;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(l.isArray(a)&&l.isArray(b)&&a.length===b.length){for(var c=0;cc;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(b.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;c>d;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,n["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=n["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");d>c;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=n["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&n["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||n["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;c>b;b++){var d=this.options.blockParams[b],e=d&&l.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;g>f;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var g=c(1)["default"];b.__esModule=!0;var h=c(4),i=c(6),j=g(i),k=c(5),l=c(29),m=g(l);e.prototype={nameLookup:function(a,b){return e.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=h.COMPILER_REVISION,b=h.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return k.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;i>h;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(d);if(this.isChild)return k;var l={compiler:this.compilerInfo(),main:k};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;i>h;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new m["default"](this.options.srcName),this.decorators=new m["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;h>c;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),
+d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;g>f;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);null==h?(this.context.programs.push(""),h=this.context.programs.length,d.index=h,d.name="program"+h,this.context.programs[h]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[h]=e.decorators,this.context.environments[h]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams):(d.index=h,d.name="program"+h,this.useDepths=this.useDepths||d.useDepths,this.useBlockParams=this.useBlockParams||d.useBlockParams)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new j["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;c>b;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new j["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;d>c;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(f.isArray(a)){for(var d=[],e=0,g=a.length;g>e;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}b.__esModule=!0;var f=c(5),g=void 0;try{}catch(h){}g||(g=function(a,b,c,d){this.src="",d&&this.add(d)},g.prototype={add:function(a){f.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){f.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;c>b;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new g(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof g?a:(a=d(a,this,b),new g(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;e>c;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])});
\ No newline at end of file
diff --git a/docs/api/vendor/jquery.min.js b/docs/api/vendor/jquery.min.js
index fd1f8aec..349030de 100644
--- a/docs/api/vendor/jquery.min.js
+++ b/docs/api/vendor/jquery.min.js
@@ -1,5739 +1,4 @@
/*! jQuery v2.2.1 | (c) jQuery Foundation | jquery.org/license */
-!(function(a, b) {
- "object" == typeof module && "object" == typeof module.exports
- ? (module.exports = a.document
- ? b(a, !0)
- : function(a) {
- if (!a.document)
- throw new Error(
- "jQuery requires a window with a document"
- );
- return b(a);
- })
- : b(a);
-})("undefined" != typeof window ? window : this, function(a, b) {
- var c = [],
- d = a.document,
- e = c.slice,
- f = c.concat,
- g = c.push,
- h = c.indexOf,
- i = {},
- j = i.toString,
- k = i.hasOwnProperty,
- l = {},
- m = "2.2.1",
- n = function(a, b) {
- return new n.fn.init(a, b);
- },
- o = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
- p = /^-ms-/,
- q = /-([\da-z])/gi,
- r = function(a, b) {
- return b.toUpperCase();
- };
- (n.fn = n.prototype = {
- jquery: m,
- constructor: n,
- selector: "",
- length: 0,
- toArray: function() {
- return e.call(this);
- },
- get: function(a) {
- return null != a
- ? 0 > a
- ? this[a + this.length]
- : this[a]
- : e.call(this);
- },
- pushStack: function(a) {
- var b = n.merge(this.constructor(), a);
- return (b.prevObject = this), (b.context = this.context), b;
- },
- each: function(a) {
- return n.each(this, a);
- },
- map: function(a) {
- return this.pushStack(
- n.map(this, function(b, c) {
- return a.call(b, c, b);
- })
- );
- },
- slice: function() {
- return this.pushStack(e.apply(this, arguments));
- },
- first: function() {
- return this.eq(0);
- },
- last: function() {
- return this.eq(-1);
- },
- eq: function(a) {
- var b = this.length,
- c = +a + (0 > a ? b : 0);
- return this.pushStack(c >= 0 && b > c ? [this[c]] : []);
- },
- end: function() {
- return this.prevObject || this.constructor();
- },
- push: g,
- sort: c.sort,
- splice: c.splice
- }),
- (n.extend = n.fn.extend = function() {
- var a,
- b,
- c,
- d,
- e,
- f,
- g = arguments[0] || {},
- h = 1,
- i = arguments.length,
- j = !1;
- for (
- "boolean" == typeof g &&
- ((j = g), (g = arguments[h] || {}), h++),
- "object" == typeof g || n.isFunction(g) || (g = {}),
- h === i && ((g = this), h--);
- i > h;
- h++
- )
- if (null != (a = arguments[h]))
- for (b in a)
- (c = g[b]),
- (d = a[b]),
- g !== d &&
- (j &&
- d &&
- (n.isPlainObject(d) || (e = n.isArray(d)))
- ? (e
- ? ((e = !1),
- (f = c && n.isArray(c) ? c : []))
- : (f =
- c && n.isPlainObject(c)
- ? c
- : {}),
- (g[b] = n.extend(j, f, d)))
- : void 0 !== d && (g[b] = d));
- return g;
- }),
- n.extend({
- expando: "jQuery" + (m + Math.random()).replace(/\D/g, ""),
- isReady: !0,
- error: function(a) {
- throw new Error(a);
- },
- noop: function() {},
- isFunction: function(a) {
- return "function" === n.type(a);
- },
- isArray: Array.isArray,
- isWindow: function(a) {
- return null != a && a === a.window;
- },
- isNumeric: function(a) {
- var b = a && a.toString();
- return !n.isArray(a) && b - parseFloat(b) + 1 >= 0;
- },
- isPlainObject: function(a) {
- return "object" !== n.type(a) || a.nodeType || n.isWindow(a)
- ? !1
- : a.constructor &&
- !k.call(a.constructor.prototype, "isPrototypeOf")
- ? !1
- : !0;
- },
- isEmptyObject: function(a) {
- var b;
- for (b in a) return !1;
- return !0;
- },
- type: function(a) {
- return null == a
- ? a + ""
- : "object" == typeof a || "function" == typeof a
- ? i[j.call(a)] || "object"
- : typeof a;
- },
- globalEval: function(a) {
- var b,
- c = eval;
- (a = n.trim(a)),
- a &&
- (1 === a.indexOf("use strict")
- ? ((b = d.createElement("script")),
- (b.text = a),
- d.head.appendChild(b).parentNode.removeChild(b))
- : c(a));
- },
- camelCase: function(a) {
- return a.replace(p, "ms-").replace(q, r);
- },
- nodeName: function(a, b) {
- return (
- a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase()
- );
- },
- each: function(a, b) {
- var c,
- d = 0;
- if (s(a)) {
- for (c = a.length; c > d; d++)
- if (b.call(a[d], d, a[d]) === !1) break;
- } else for (d in a) if (b.call(a[d], d, a[d]) === !1) break;
- return a;
- },
- trim: function(a) {
- return null == a ? "" : (a + "").replace(o, "");
- },
- makeArray: function(a, b) {
- var c = b || [];
- return (
- null != a &&
- (s(Object(a))
- ? n.merge(c, "string" == typeof a ? [a] : a)
- : g.call(c, a)),
- c
- );
- },
- inArray: function(a, b, c) {
- return null == b ? -1 : h.call(b, a, c);
- },
- merge: function(a, b) {
- for (var c = +b.length, d = 0, e = a.length; c > d; d++)
- a[e++] = b[d];
- return (a.length = e), a;
- },
- grep: function(a, b, c) {
- for (var d, e = [], f = 0, g = a.length, h = !c; g > f; f++)
- (d = !b(a[f], f)), d !== h && e.push(a[f]);
- return e;
- },
- map: function(a, b, c) {
- var d,
- e,
- g = 0,
- h = [];
- if (s(a))
- for (d = a.length; d > g; g++)
- (e = b(a[g], g, c)), null != e && h.push(e);
- else for (g in a) (e = b(a[g], g, c)), null != e && h.push(e);
- return f.apply([], h);
- },
- guid: 1,
- proxy: function(a, b) {
- var c, d, f;
- return (
- "string" == typeof b && ((c = a[b]), (b = a), (a = c)),
- n.isFunction(a)
- ? ((d = e.call(arguments, 2)),
- (f = function() {
- return a.apply(
- b || this,
- d.concat(e.call(arguments))
- );
- }),
- (f.guid = a.guid = a.guid || n.guid++),
- f)
- : void 0
- );
- },
- now: Date.now,
- support: l
- }),
- "function" == typeof Symbol &&
- (n.fn[Symbol.iterator] = c[Symbol.iterator]),
- n.each(
- "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
- " "
- ),
- function(a, b) {
- i["[object " + b + "]"] = b.toLowerCase();
- }
- );
- function s(a) {
- var b = !!a && "length" in a && a.length,
- c = n.type(a);
- return "function" === c || n.isWindow(a)
- ? !1
- : "array" === c ||
- 0 === b ||
- ("number" == typeof b && b > 0 && b - 1 in a);
- }
- var t = (function(a) {
- var b,
- c,
- d,
- e,
- f,
- g,
- h,
- i,
- j,
- k,
- l,
- m,
- n,
- o,
- p,
- q,
- r,
- s,
- t,
- u = "sizzle" + 1 * new Date(),
- v = a.document,
- w = 0,
- x = 0,
- y = ga(),
- z = ga(),
- A = ga(),
- B = function(a, b) {
- return a === b && (l = !0), 0;
- },
- C = 1 << 31,
- D = {}.hasOwnProperty,
- E = [],
- F = E.pop,
- G = E.push,
- H = E.push,
- I = E.slice,
- J = function(a, b) {
- for (var c = 0, d = a.length; d > c; c++)
- if (a[c] === b) return c;
- return -1;
- },
- K =
- "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
- L = "[\\x20\\t\\r\\n\\f]",
- M = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
- N =
- "\\[" +
- L +
- "*(" +
- M +
- ")(?:" +
- L +
- "*([*^$|!~]?=)" +
- L +
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" +
- M +
- "))|)" +
- L +
- "*\\]",
- O =
- ":(" +
- M +
- ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" +
- N +
- ")*)|.*)\\)|)",
- P = new RegExp(L + "+", "g"),
- Q = new RegExp(
- "^" + L + "+|((?:^|[^\\\\])(?:\\\\.)*)" + L + "+$",
- "g"
- ),
- R = new RegExp("^" + L + "*," + L + "*"),
- S = new RegExp("^" + L + "*([>+~]|" + L + ")" + L + "*"),
- T = new RegExp("=" + L + "*([^\\]'\"]*?)" + L + "*\\]", "g"),
- U = new RegExp(O),
- V = new RegExp("^" + M + "$"),
- W = {
- ID: new RegExp("^#(" + M + ")"),
- CLASS: new RegExp("^\\.(" + M + ")"),
- TAG: new RegExp("^(" + M + "|[*])"),
- ATTR: new RegExp("^" + N),
- PSEUDO: new RegExp("^" + O),
- CHILD: new RegExp(
- "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
- L +
- "*(even|odd|(([+-]|)(\\d*)n|)" +
- L +
- "*(?:([+-]|)" +
- L +
- "*(\\d+)|))" +
- L +
- "*\\)|)",
- "i"
- ),
- bool: new RegExp("^(?:" + K + ")$", "i"),
- needsContext: new RegExp(
- "^" +
- L +
- "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- L +
- "*((?:-\\d)?\\d*)" +
- L +
- "*\\)|)(?=[^-]|$)",
- "i"
- )
- },
- X = /^(?:input|select|textarea|button)$/i,
- Y = /^h\d$/i,
- Z = /^[^{]+\{\s*\[native \w/,
- $ = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
- _ = /[+~]/,
- aa = /'|\\/g,
- ba = new RegExp(
- "\\\\([\\da-f]{1,6}" + L + "?|(" + L + ")|.)",
- "ig"
- ),
- ca = function(a, b, c) {
- var d = "0x" + b - 65536;
- return d !== d || c
- ? b
- : 0 > d
- ? String.fromCharCode(d + 65536)
- : String.fromCharCode(
- (d >> 10) | 55296,
- (1023 & d) | 56320
- );
- },
- da = function() {
- m();
- };
- try {
- H.apply((E = I.call(v.childNodes)), v.childNodes),
- E[v.childNodes.length].nodeType;
- } catch (ea) {
- H = {
- apply: E.length
- ? function(a, b) {
- G.apply(a, I.call(b));
- }
- : function(a, b) {
- var c = a.length,
- d = 0;
- while ((a[c++] = b[d++]));
- a.length = c - 1;
- }
- };
- }
- function fa(a, b, d, e) {
- var f,
- h,
- j,
- k,
- l,
- o,
- r,
- s,
- w = b && b.ownerDocument,
- x = b ? b.nodeType : 9;
- if (
- ((d = d || []),
- "string" != typeof a || !a || (1 !== x && 9 !== x && 11 !== x))
- )
- return d;
- if (
- !e &&
- ((b ? b.ownerDocument || b : v) !== n && m(b), (b = b || n), p)
- ) {
- if (11 !== x && (o = $.exec(a)))
- if ((f = o[1])) {
- if (9 === x) {
- if (!(j = b.getElementById(f))) return d;
- if (j.id === f) return d.push(j), d;
- } else if (
- w &&
- (j = w.getElementById(f)) &&
- t(b, j) &&
- j.id === f
- )
- return d.push(j), d;
- } else {
- if (o[2])
- return H.apply(d, b.getElementsByTagName(a)), d;
- if (
- (f = o[3]) &&
- c.getElementsByClassName &&
- b.getElementsByClassName
- )
- return H.apply(d, b.getElementsByClassName(f)), d;
- }
- if (c.qsa && !A[a + " "] && (!q || !q.test(a))) {
- if (1 !== x) (w = b), (s = a);
- else if ("object" !== b.nodeName.toLowerCase()) {
- (k = b.getAttribute("id"))
- ? (k = k.replace(aa, "\\$&"))
- : b.setAttribute("id", (k = u)),
- (r = g(a)),
- (h = r.length),
- (l = V.test(k) ? "#" + k : "[id='" + k + "']");
- while (h--) r[h] = l + " " + qa(r[h]);
- (s = r.join(",")),
- (w = (_.test(a) && oa(b.parentNode)) || b);
- }
- if (s)
- try {
- return H.apply(d, w.querySelectorAll(s)), d;
- } catch (y) {
- } finally {
- k === u && b.removeAttribute("id");
- }
- }
- }
- return i(a.replace(Q, "$1"), b, d, e);
- }
- function ga() {
- var a = [];
- function b(c, e) {
- return (
- a.push(c + " ") > d.cacheLength && delete b[a.shift()],
- (b[c + " "] = e)
- );
- }
- return b;
- }
- function ha(a) {
- return (a[u] = !0), a;
- }
- function ia(a) {
- var b = n.createElement("div");
- try {
- return !!a(b);
- } catch (c) {
- return !1;
- } finally {
- b.parentNode && b.parentNode.removeChild(b), (b = null);
- }
- }
- function ja(a, b) {
- var c = a.split("|"),
- e = c.length;
- while (e--) d.attrHandle[c[e]] = b;
- }
- function ka(a, b) {
- var c = b && a,
- d =
- c &&
- 1 === a.nodeType &&
- 1 === b.nodeType &&
- (~b.sourceIndex || C) - (~a.sourceIndex || C);
- if (d) return d;
- if (c) while ((c = c.nextSibling)) if (c === b) return -1;
- return a ? 1 : -1;
- }
- function la(a) {
- return function(b) {
- var c = b.nodeName.toLowerCase();
- return "input" === c && b.type === a;
- };
- }
- function ma(a) {
- return function(b) {
- var c = b.nodeName.toLowerCase();
- return ("input" === c || "button" === c) && b.type === a;
- };
- }
- function na(a) {
- return ha(function(b) {
- return (
- (b = +b),
- ha(function(c, d) {
- var e,
- f = a([], c.length, b),
- g = f.length;
- while (g--) c[(e = f[g])] && (c[e] = !(d[e] = c[e]));
- })
- );
- });
- }
- function oa(a) {
- return a && "undefined" != typeof a.getElementsByTagName && a;
- }
- (c = fa.support = {}),
- (f = fa.isXML = function(a) {
- var b = a && (a.ownerDocument || a).documentElement;
- return b ? "HTML" !== b.nodeName : !1;
- }),
- (m = fa.setDocument = function(a) {
- var b,
- e,
- g = a ? a.ownerDocument || a : v;
- return g !== n && 9 === g.nodeType && g.documentElement
- ? ((n = g),
- (o = n.documentElement),
- (p = !f(n)),
- (e = n.defaultView) &&
- e.top !== e &&
- (e.addEventListener
- ? e.addEventListener("unload", da, !1)
- : e.attachEvent && e.attachEvent("onunload", da)),
- (c.attributes = ia(function(a) {
- return (
- (a.className = "i"), !a.getAttribute("className")
- );
- })),
- (c.getElementsByTagName = ia(function(a) {
- return (
- a.appendChild(n.createComment("")),
- !a.getElementsByTagName("*").length
- );
- })),
- (c.getElementsByClassName = Z.test(
- n.getElementsByClassName
- )),
- (c.getById = ia(function(a) {
- return (
- (o.appendChild(a).id = u),
- !n.getElementsByName ||
- !n.getElementsByName(u).length
- );
- })),
- c.getById
- ? ((d.find.ID = function(a, b) {
- if (
- "undefined" != typeof b.getElementById &&
- p
- ) {
- var c = b.getElementById(a);
- return c ? [c] : [];
- }
- }),
- (d.filter.ID = function(a) {
- var b = a.replace(ba, ca);
- return function(a) {
- return a.getAttribute("id") === b;
- };
- }))
- : (delete d.find.ID,
- (d.filter.ID = function(a) {
- var b = a.replace(ba, ca);
- return function(a) {
- var c =
- "undefined" !=
- typeof a.getAttributeNode &&
- a.getAttributeNode("id");
- return c && c.value === b;
- };
- })),
- (d.find.TAG = c.getElementsByTagName
- ? function(a, b) {
- return "undefined" !=
- typeof b.getElementsByTagName
- ? b.getElementsByTagName(a)
- : c.qsa
- ? b.querySelectorAll(a)
- : void 0;
- }
- : function(a, b) {
- var c,
- d = [],
- e = 0,
- f = b.getElementsByTagName(a);
- if ("*" === a) {
- while ((c = f[e++]))
- 1 === c.nodeType && d.push(c);
- return d;
- }
- return f;
- }),
- (d.find.CLASS =
- c.getElementsByClassName &&
- function(a, b) {
- return "undefined" !=
- typeof b.getElementsByClassName && p
- ? b.getElementsByClassName(a)
- : void 0;
- }),
- (r = []),
- (q = []),
- (c.qsa = Z.test(n.querySelectorAll)) &&
- (ia(function(a) {
- (o.appendChild(a).innerHTML =
- " "),
- a.querySelectorAll("[msallowcapture^='']")
- .length &&
- q.push("[*^$]=" + L + "*(?:''|\"\")"),
- a.querySelectorAll("[selected]").length ||
- q.push(
- "\\[" + L + "*(?:value|" + K + ")"
- ),
- a.querySelectorAll("[id~=" + u + "-]")
- .length || q.push("~="),
- a.querySelectorAll(":checked").length ||
- q.push(":checked"),
- a.querySelectorAll("a#" + u + "+*").length ||
- q.push(".#.+[+~]");
- }),
- ia(function(a) {
- var b = n.createElement("input");
- b.setAttribute("type", "hidden"),
- a.appendChild(b).setAttribute("name", "D"),
- a.querySelectorAll("[name=d]").length &&
- q.push("name" + L + "*[*^$|!~]?="),
- a.querySelectorAll(":enabled").length ||
- q.push(":enabled", ":disabled"),
- a.querySelectorAll("*,:x"),
- q.push(",.*:");
- })),
- (c.matchesSelector = Z.test(
- (s =
- o.matches ||
- o.webkitMatchesSelector ||
- o.mozMatchesSelector ||
- o.oMatchesSelector ||
- o.msMatchesSelector)
- )) &&
- ia(function(a) {
- (c.disconnectedMatch = s.call(a, "div")),
- s.call(a, "[s!='']:x"),
- r.push("!=", O);
- }),
- (q = q.length && new RegExp(q.join("|"))),
- (r = r.length && new RegExp(r.join("|"))),
- (b = Z.test(o.compareDocumentPosition)),
- (t =
- b || Z.test(o.contains)
- ? function(a, b) {
- var c =
- 9 === a.nodeType
- ? a.documentElement
- : a,
- d = b && b.parentNode;
- return (
- a === d ||
- !(
- !d ||
- 1 !== d.nodeType ||
- !(c.contains
- ? c.contains(d)
- : a.compareDocumentPosition &&
- 16 &
- a.compareDocumentPosition(
- d
- ))
- )
- );
- }
- : function(a, b) {
- if (b)
- while ((b = b.parentNode))
- if (b === a) return !0;
- return !1;
- }),
- (B = b
- ? function(a, b) {
- if (a === b) return (l = !0), 0;
- var d =
- !a.compareDocumentPosition -
- !b.compareDocumentPosition;
- return d
- ? d
- : ((d =
- (a.ownerDocument || a) ===
- (b.ownerDocument || b)
- ? a.compareDocumentPosition(b)
- : 1),
- 1 & d ||
- (!c.sortDetached &&
- b.compareDocumentPosition(a) === d)
- ? a === n ||
- (a.ownerDocument === v && t(v, a))
- ? -1
- : b === n ||
- (b.ownerDocument === v &&
- t(v, b))
- ? 1
- : k
- ? J(k, a) - J(k, b)
- : 0
- : 4 & d
- ? -1
- : 1);
- }
- : function(a, b) {
- if (a === b) return (l = !0), 0;
- var c,
- d = 0,
- e = a.parentNode,
- f = b.parentNode,
- g = [a],
- h = [b];
- if (!e || !f)
- return a === n
- ? -1
- : b === n
- ? 1
- : e
- ? -1
- : f
- ? 1
- : k
- ? J(k, a) - J(k, b)
- : 0;
- if (e === f) return ka(a, b);
- c = a;
- while ((c = c.parentNode)) g.unshift(c);
- c = b;
- while ((c = c.parentNode)) h.unshift(c);
- while (g[d] === h[d]) d++;
- return d
- ? ka(g[d], h[d])
- : g[d] === v
- ? -1
- : h[d] === v
- ? 1
- : 0;
- }),
- n)
- : n;
- }),
- (fa.matches = function(a, b) {
- return fa(a, null, null, b);
- }),
- (fa.matchesSelector = function(a, b) {
- if (
- ((a.ownerDocument || a) !== n && m(a),
- (b = b.replace(T, "='$1']")),
- c.matchesSelector &&
- p &&
- !A[b + " "] &&
- (!r || !r.test(b)) &&
- (!q || !q.test(b)))
- )
- try {
- var d = s.call(a, b);
- if (
- d ||
- c.disconnectedMatch ||
- (a.document && 11 !== a.document.nodeType)
- )
- return d;
- } catch (e) {}
- return fa(b, n, null, [a]).length > 0;
- }),
- (fa.contains = function(a, b) {
- return (a.ownerDocument || a) !== n && m(a), t(a, b);
- }),
- (fa.attr = function(a, b) {
- (a.ownerDocument || a) !== n && m(a);
- var e = d.attrHandle[b.toLowerCase()],
- f =
- e && D.call(d.attrHandle, b.toLowerCase())
- ? e(a, b, !p)
- : void 0;
- return void 0 !== f
- ? f
- : c.attributes || !p
- ? a.getAttribute(b)
- : (f = a.getAttributeNode(b)) && f.specified
- ? f.value
- : null;
- }),
- (fa.error = function(a) {
- throw new Error("Syntax error, unrecognized expression: " + a);
- }),
- (fa.uniqueSort = function(a) {
- var b,
- d = [],
- e = 0,
- f = 0;
- if (
- ((l = !c.detectDuplicates),
- (k = !c.sortStable && a.slice(0)),
- a.sort(B),
- l)
- ) {
- while ((b = a[f++])) b === a[f] && (e = d.push(f));
- while (e--) a.splice(d[e], 1);
- }
- return (k = null), a;
- }),
- (e = fa.getText = function(a) {
- var b,
- c = "",
- d = 0,
- f = a.nodeType;
- if (f) {
- if (1 === f || 9 === f || 11 === f) {
- if ("string" == typeof a.textContent)
- return a.textContent;
- for (a = a.firstChild; a; a = a.nextSibling) c += e(a);
- } else if (3 === f || 4 === f) return a.nodeValue;
- } else while ((b = a[d++])) c += e(b);
- return c;
- }),
- (d = fa.selectors = {
- cacheLength: 50,
- createPseudo: ha,
- match: W,
- attrHandle: {},
- find: {},
- relative: {
- ">": { dir: "parentNode", first: !0 },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: !0 },
- "~": { dir: "previousSibling" }
- },
- preFilter: {
- ATTR: function(a) {
- return (
- (a[1] = a[1].replace(ba, ca)),
- (a[3] = (a[3] || a[4] || a[5] || "").replace(
- ba,
- ca
- )),
- "~=" === a[2] && (a[3] = " " + a[3] + " "),
- a.slice(0, 4)
- );
- },
- CHILD: function(a) {
- return (
- (a[1] = a[1].toLowerCase()),
- "nth" === a[1].slice(0, 3)
- ? (a[3] || fa.error(a[0]),
- (a[4] = +(a[4]
- ? a[5] + (a[6] || 1)
- : 2 *
- ("even" === a[3] || "odd" === a[3]))),
- (a[5] = +(a[7] + a[8] || "odd" === a[3])))
- : a[3] && fa.error(a[0]),
- a
- );
- },
- PSEUDO: function(a) {
- var b,
- c = !a[6] && a[2];
- return W.CHILD.test(a[0])
- ? null
- : (a[3]
- ? (a[2] = a[4] || a[5] || "")
- : c &&
- U.test(c) &&
- (b = g(c, !0)) &&
- (b =
- c.indexOf(")", c.length - b) -
- c.length) &&
- ((a[0] = a[0].slice(0, b)),
- (a[2] = c.slice(0, b))),
- a.slice(0, 3));
- }
- },
- filter: {
- TAG: function(a) {
- var b = a.replace(ba, ca).toLowerCase();
- return "*" === a
- ? function() {
- return !0;
- }
- : function(a) {
- return (
- a.nodeName &&
- a.nodeName.toLowerCase() === b
- );
- };
- },
- CLASS: function(a) {
- var b = y[a + " "];
- return (
- b ||
- ((b = new RegExp(
- "(^|" + L + ")" + a + "(" + L + "|$)"
- )) &&
- y(a, function(a) {
- return b.test(
- ("string" == typeof a.className &&
- a.className) ||
- ("undefined" !=
- typeof a.getAttribute &&
- a.getAttribute("class")) ||
- ""
- );
- }))
- );
- },
- ATTR: function(a, b, c) {
- return function(d) {
- var e = fa.attr(d, a);
- return null == e
- ? "!=" === b
- : b
- ? ((e += ""),
- "=" === b
- ? e === c
- : "!=" === b
- ? e !== c
- : "^=" === b
- ? c && 0 === e.indexOf(c)
- : "*=" === b
- ? c && e.indexOf(c) > -1
- : "$=" === b
- ? c && e.slice(-c.length) === c
- : "~=" === b
- ? (" " + e.replace(P, " ") + " ").indexOf(
- c
- ) > -1
- : "|=" === b
- ? e === c ||
- e.slice(0, c.length + 1) === c + "-"
- : !1)
- : !0;
- };
- },
- CHILD: function(a, b, c, d, e) {
- var f = "nth" !== a.slice(0, 3),
- g = "last" !== a.slice(-4),
- h = "of-type" === b;
- return 1 === d && 0 === e
- ? function(a) {
- return !!a.parentNode;
- }
- : function(b, c, i) {
- var j,
- k,
- l,
- m,
- n,
- o,
- p =
- f !== g
- ? "nextSibling"
- : "previousSibling",
- q = b.parentNode,
- r = h && b.nodeName.toLowerCase(),
- s = !i && !h,
- t = !1;
- if (q) {
- if (f) {
- while (p) {
- m = b;
- while ((m = m[p]))
- if (
- h
- ? m.nodeName.toLowerCase() ===
- r
- : 1 === m.nodeType
- )
- return !1;
- o = p =
- "only" === a &&
- !o &&
- "nextSibling";
- }
- return !0;
- }
- if (
- ((o = [
- g ? q.firstChild : q.lastChild
- ]),
- g && s)
- ) {
- (m = q),
- (l = m[u] || (m[u] = {})),
- (k =
- l[m.uniqueID] ||
- (l[m.uniqueID] = {})),
- (j = k[a] || []),
- (n = j[0] === w && j[1]),
- (t = n && j[2]),
- (m = n && q.childNodes[n]);
- while (
- (m =
- (++n && m && m[p]) ||
- (t = n = 0) ||
- o.pop())
- )
- if (
- 1 === m.nodeType &&
- ++t &&
- m === b
- ) {
- k[a] = [w, n, t];
- break;
- }
- } else if (
- (s &&
- ((m = b),
- (l = m[u] || (m[u] = {})),
- (k =
- l[m.uniqueID] ||
- (l[m.uniqueID] = {})),
- (j = k[a] || []),
- (n = j[0] === w && j[1]),
- (t = n)),
- t === !1)
- )
- while (
- (m =
- (++n && m && m[p]) ||
- (t = n = 0) ||
- o.pop())
- )
- if (
- (h
- ? m.nodeName.toLowerCase() ===
- r
- : 1 === m.nodeType) &&
- ++t &&
- (s &&
- ((l =
- m[u] || (m[u] = {})),
- (k =
- l[m.uniqueID] ||
- (l[m.uniqueID] = {})),
- (k[a] = [w, t])),
- m === b)
- )
- break;
- return (
- (t -= e),
- t === d || (t % d === 0 && t / d >= 0)
- );
- }
- };
- },
- PSEUDO: function(a, b) {
- var c,
- e =
- d.pseudos[a] ||
- d.setFilters[a.toLowerCase()] ||
- fa.error("unsupported pseudo: " + a);
- return e[u]
- ? e(b)
- : e.length > 1
- ? ((c = [a, a, "", b]),
- d.setFilters.hasOwnProperty(a.toLowerCase())
- ? ha(function(a, c) {
- var d,
- f = e(a, b),
- g = f.length;
- while (g--)
- (d = J(a, f[g])),
- (a[d] = !(c[d] = f[g]));
- })
- : function(a) {
- return e(a, 0, c);
- })
- : e;
- }
- },
- pseudos: {
- not: ha(function(a) {
- var b = [],
- c = [],
- d = h(a.replace(Q, "$1"));
- return d[u]
- ? ha(function(a, b, c, e) {
- var f,
- g = d(a, null, e, []),
- h = a.length;
- while (h--)
- (f = g[h]) && (a[h] = !(b[h] = f));
- })
- : function(a, e, f) {
- return (
- (b[0] = a),
- d(b, null, f, c),
- (b[0] = null),
- !c.pop()
- );
- };
- }),
- has: ha(function(a) {
- return function(b) {
- return fa(a, b).length > 0;
- };
- }),
- contains: ha(function(a) {
- return (
- (a = a.replace(ba, ca)),
- function(b) {
- return (
- (
- b.textContent ||
- b.innerText ||
- e(b)
- ).indexOf(a) > -1
- );
- }
- );
- }),
- lang: ha(function(a) {
- return (
- V.test(a || "") ||
- fa.error("unsupported lang: " + a),
- (a = a.replace(ba, ca).toLowerCase()),
- function(b) {
- var c;
- do
- if (
- (c = p
- ? b.lang
- : b.getAttribute("xml:lang") ||
- b.getAttribute("lang"))
- )
- return (
- (c = c.toLowerCase()),
- c === a || 0 === c.indexOf(a + "-")
- );
- while ((b = b.parentNode) && 1 === b.nodeType);
- return !1;
- }
- );
- }),
- target: function(b) {
- var c = a.location && a.location.hash;
- return c && c.slice(1) === b.id;
- },
- root: function(a) {
- return a === o;
- },
- focus: function(a) {
- return (
- a === n.activeElement &&
- (!n.hasFocus || n.hasFocus()) &&
- !!(a.type || a.href || ~a.tabIndex)
- );
- },
- enabled: function(a) {
- return a.disabled === !1;
- },
- disabled: function(a) {
- return a.disabled === !0;
- },
- checked: function(a) {
- var b = a.nodeName.toLowerCase();
- return (
- ("input" === b && !!a.checked) ||
- ("option" === b && !!a.selected)
- );
- },
- selected: function(a) {
- return (
- a.parentNode && a.parentNode.selectedIndex,
- a.selected === !0
- );
- },
- empty: function(a) {
- for (a = a.firstChild; a; a = a.nextSibling)
- if (a.nodeType < 6) return !1;
- return !0;
- },
- parent: function(a) {
- return !d.pseudos.empty(a);
- },
- header: function(a) {
- return Y.test(a.nodeName);
- },
- input: function(a) {
- return X.test(a.nodeName);
- },
- button: function(a) {
- var b = a.nodeName.toLowerCase();
- return (
- ("input" === b && "button" === a.type) ||
- "button" === b
- );
- },
- text: function(a) {
- var b;
- return (
- "input" === a.nodeName.toLowerCase() &&
- "text" === a.type &&
- (null == (b = a.getAttribute("type")) ||
- "text" === b.toLowerCase())
- );
- },
- first: na(function() {
- return [0];
- }),
- last: na(function(a, b) {
- return [b - 1];
- }),
- eq: na(function(a, b, c) {
- return [0 > c ? c + b : c];
- }),
- even: na(function(a, b) {
- for (var c = 0; b > c; c += 2) a.push(c);
- return a;
- }),
- odd: na(function(a, b) {
- for (var c = 1; b > c; c += 2) a.push(c);
- return a;
- }),
- lt: na(function(a, b, c) {
- for (var d = 0 > c ? c + b : c; --d >= 0; ) a.push(d);
- return a;
- }),
- gt: na(function(a, b, c) {
- for (var d = 0 > c ? c + b : c; ++d < b; ) a.push(d);
- return a;
- })
- }
- }),
- (d.pseudos.nth = d.pseudos.eq);
- for (b in {
- radio: !0,
- checkbox: !0,
- file: !0,
- password: !0,
- image: !0
- })
- d.pseudos[b] = la(b);
- for (b in { submit: !0, reset: !0 }) d.pseudos[b] = ma(b);
- function pa() {}
- (pa.prototype = d.filters = d.pseudos),
- (d.setFilters = new pa()),
- (g = fa.tokenize = function(a, b) {
- var c,
- e,
- f,
- g,
- h,
- i,
- j,
- k = z[a + " "];
- if (k) return b ? 0 : k.slice(0);
- (h = a), (i = []), (j = d.preFilter);
- while (h) {
- (!c || (e = R.exec(h))) &&
- (e && (h = h.slice(e[0].length) || h),
- i.push((f = []))),
- (c = !1),
- (e = S.exec(h)) &&
- ((c = e.shift()),
- f.push({ value: c, type: e[0].replace(Q, " ") }),
- (h = h.slice(c.length)));
- for (g in d.filter)
- !(e = W[g].exec(h)) ||
- (j[g] && !(e = j[g](e))) ||
- ((c = e.shift()),
- f.push({ value: c, type: g, matches: e }),
- (h = h.slice(c.length)));
- if (!c) break;
- }
- return b ? h.length : h ? fa.error(a) : z(a, i).slice(0);
- });
- function qa(a) {
- for (var b = 0, c = a.length, d = ""; c > b; b++) d += a[b].value;
- return d;
- }
- function ra(a, b, c) {
- var d = b.dir,
- e = c && "parentNode" === d,
- f = x++;
- return b.first
- ? function(b, c, f) {
- while ((b = b[d]))
- if (1 === b.nodeType || e) return a(b, c, f);
- }
- : function(b, c, g) {
- var h,
- i,
- j,
- k = [w, f];
- if (g) {
- while ((b = b[d]))
- if ((1 === b.nodeType || e) && a(b, c, g))
- return !0;
- } else
- while ((b = b[d]))
- if (1 === b.nodeType || e) {
- if (
- ((j = b[u] || (b[u] = {})),
- (i =
- j[b.uniqueID] ||
- (j[b.uniqueID] = {})),
- (h = i[d]) && h[0] === w && h[1] === f)
- )
- return (k[2] = h[2]);
- if (((i[d] = k), (k[2] = a(b, c, g))))
- return !0;
- }
- };
- }
- function sa(a) {
- return a.length > 1
- ? function(b, c, d) {
- var e = a.length;
- while (e--) if (!a[e](b, c, d)) return !1;
- return !0;
- }
- : a[0];
- }
- function ta(a, b, c) {
- for (var d = 0, e = b.length; e > d; d++) fa(a, b[d], c);
- return c;
- }
- function ua(a, b, c, d, e) {
- for (var f, g = [], h = 0, i = a.length, j = null != b; i > h; h++)
- (f = a[h]) && (!c || c(f, d, e)) && (g.push(f), j && b.push(h));
- return g;
- }
- function va(a, b, c, d, e, f) {
- return (
- d && !d[u] && (d = va(d)),
- e && !e[u] && (e = va(e, f)),
- ha(function(f, g, h, i) {
- var j,
- k,
- l,
- m = [],
- n = [],
- o = g.length,
- p = f || ta(b || "*", h.nodeType ? [h] : h, []),
- q = !a || (!f && b) ? p : ua(p, m, a, h, i),
- r = c ? (e || (f ? a : o || d) ? [] : g) : q;
- if ((c && c(q, r, h, i), d)) {
- (j = ua(r, n)), d(j, [], h, i), (k = j.length);
- while (k--) (l = j[k]) && (r[n[k]] = !(q[n[k]] = l));
- }
- if (f) {
- if (e || a) {
- if (e) {
- (j = []), (k = r.length);
- while (k--) (l = r[k]) && j.push((q[k] = l));
- e(null, (r = []), j, i);
- }
- k = r.length;
- while (k--)
- (l = r[k]) &&
- (j = e ? J(f, l) : m[k]) > -1 &&
- (f[j] = !(g[j] = l));
- }
- } else (r = ua(r === g ? r.splice(o, r.length) : r)), e ? e(null, g, r, i) : H.apply(g, r);
- })
- );
- }
- function wa(a) {
- for (
- var b,
- c,
- e,
- f = a.length,
- g = d.relative[a[0].type],
- h = g || d.relative[" "],
- i = g ? 1 : 0,
- k = ra(
- function(a) {
- return a === b;
- },
- h,
- !0
- ),
- l = ra(
- function(a) {
- return J(b, a) > -1;
- },
- h,
- !0
- ),
- m = [
- function(a, c, d) {
- var e =
- (!g && (d || c !== j)) ||
- ((b = c).nodeType ? k(a, c, d) : l(a, c, d));
- return (b = null), e;
- }
- ];
- f > i;
- i++
- )
- if ((c = d.relative[a[i].type])) m = [ra(sa(m), c)];
- else {
- if (
- ((c = d.filter[a[i].type].apply(null, a[i].matches)),
- c[u])
- ) {
- for (e = ++i; f > e; e++)
- if (d.relative[a[e].type]) break;
- return va(
- i > 1 && sa(m),
- i > 1 &&
- qa(
- a.slice(0, i - 1).concat({
- value: " " === a[i - 2].type ? "*" : ""
- })
- ).replace(Q, "$1"),
- c,
- e > i && wa(a.slice(i, e)),
- f > e && wa((a = a.slice(e))),
- f > e && qa(a)
- );
- }
- m.push(c);
- }
- return sa(m);
- }
- function xa(a, b) {
- var c = b.length > 0,
- e = a.length > 0,
- f = function(f, g, h, i, k) {
- var l,
- o,
- q,
- r = 0,
- s = "0",
- t = f && [],
- u = [],
- v = j,
- x = f || (e && d.find.TAG("*", k)),
- y = (w += null == v ? 1 : Math.random() || 0.1),
- z = x.length;
- for (
- k && (j = g === n || g || k);
- s !== z && null != (l = x[s]);
- s++
- ) {
- if (e && l) {
- (o = 0),
- g || l.ownerDocument === n || (m(l), (h = !p));
- while ((q = a[o++]))
- if (q(l, g || n, h)) {
- i.push(l);
- break;
- }
- k && (w = y);
- }
- c && ((l = !q && l) && r--, f && t.push(l));
- }
- if (((r += s), c && s !== r)) {
- o = 0;
- while ((q = b[o++])) q(t, u, g, h);
- if (f) {
- if (r > 0)
- while (s--) t[s] || u[s] || (u[s] = F.call(i));
- u = ua(u);
- }
- H.apply(i, u),
- k &&
- !f &&
- u.length > 0 &&
- r + b.length > 1 &&
- fa.uniqueSort(i);
- }
- return k && ((w = y), (j = v)), t;
- };
- return c ? ha(f) : f;
- }
- return (
- (h = fa.compile = function(a, b) {
- var c,
- d = [],
- e = [],
- f = A[a + " "];
- if (!f) {
- b || (b = g(a)), (c = b.length);
- while (c--) (f = wa(b[c])), f[u] ? d.push(f) : e.push(f);
- (f = A(a, xa(e, d))), (f.selector = a);
- }
- return f;
- }),
- (i = fa.select = function(a, b, e, f) {
- var i,
- j,
- k,
- l,
- m,
- n = "function" == typeof a && a,
- o = !f && g((a = n.selector || a));
- if (((e = e || []), 1 === o.length)) {
- if (
- ((j = o[0] = o[0].slice(0)),
- j.length > 2 &&
- "ID" === (k = j[0]).type &&
- c.getById &&
- 9 === b.nodeType &&
- p &&
- d.relative[j[1].type])
- ) {
- if (
- ((b = (d.find.ID(k.matches[0].replace(ba, ca), b) ||
- [])[0]),
- !b)
- )
- return e;
- n && (b = b.parentNode),
- (a = a.slice(j.shift().value.length));
- }
- i = W.needsContext.test(a) ? 0 : j.length;
- while (i--) {
- if (((k = j[i]), d.relative[(l = k.type)])) break;
- if (
- (m = d.find[l]) &&
- (f = m(
- k.matches[0].replace(ba, ca),
- (_.test(j[0].type) && oa(b.parentNode)) || b
- ))
- ) {
- if ((j.splice(i, 1), (a = f.length && qa(j)), !a))
- return H.apply(e, f), e;
- break;
- }
- }
- }
- return (
- (n || h(a, o))(
- f,
- b,
- !p,
- e,
- !b || (_.test(a) && oa(b.parentNode)) || b
- ),
- e
- );
- }),
- (c.sortStable =
- u
- .split("")
- .sort(B)
- .join("") === u),
- (c.detectDuplicates = !!l),
- m(),
- (c.sortDetached = ia(function(a) {
- return 1 & a.compareDocumentPosition(n.createElement("div"));
- })),
- ia(function(a) {
- return (
- (a.innerHTML = " "),
- "#" === a.firstChild.getAttribute("href")
- );
- }) ||
- ja("type|href|height|width", function(a, b, c) {
- return c
- ? void 0
- : a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2);
- }),
- (c.attributes &&
- ia(function(a) {
- return (
- (a.innerHTML = " "),
- a.firstChild.setAttribute("value", ""),
- "" === a.firstChild.getAttribute("value")
- );
- })) ||
- ja("value", function(a, b, c) {
- return c || "input" !== a.nodeName.toLowerCase()
- ? void 0
- : a.defaultValue;
- }),
- ia(function(a) {
- return null == a.getAttribute("disabled");
- }) ||
- ja(K, function(a, b, c) {
- var d;
- return c
- ? void 0
- : a[b] === !0
- ? b.toLowerCase()
- : (d = a.getAttributeNode(b)) && d.specified
- ? d.value
- : null;
- }),
- fa
- );
- })(a);
- (n.find = t),
- (n.expr = t.selectors),
- (n.expr[":"] = n.expr.pseudos),
- (n.uniqueSort = n.unique = t.uniqueSort),
- (n.text = t.getText),
- (n.isXMLDoc = t.isXML),
- (n.contains = t.contains);
- var u = function(a, b, c) {
- var d = [],
- e = void 0 !== c;
- while ((a = a[b]) && 9 !== a.nodeType)
- if (1 === a.nodeType) {
- if (e && n(a).is(c)) break;
- d.push(a);
- }
- return d;
- },
- v = function(a, b) {
- for (var c = []; a; a = a.nextSibling)
- 1 === a.nodeType && a !== b && c.push(a);
- return c;
- },
- w = n.expr.match.needsContext,
- x = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,
- y = /^.[^:#\[\.,]*$/;
- function z(a, b, c) {
- if (n.isFunction(b))
- return n.grep(a, function(a, d) {
- return !!b.call(a, d, a) !== c;
- });
- if (b.nodeType)
- return n.grep(a, function(a) {
- return (a === b) !== c;
- });
- if ("string" == typeof b) {
- if (y.test(b)) return n.filter(b, a, c);
- b = n.filter(b, a);
- }
- return n.grep(a, function(a) {
- return h.call(b, a) > -1 !== c;
- });
- }
- (n.filter = function(a, b, c) {
- var d = b[0];
- return (
- c && (a = ":not(" + a + ")"),
- 1 === b.length && 1 === d.nodeType
- ? n.find.matchesSelector(d, a)
- ? [d]
- : []
- : n.find.matches(
- a,
- n.grep(b, function(a) {
- return 1 === a.nodeType;
- })
- )
- );
- }),
- n.fn.extend({
- find: function(a) {
- var b,
- c = this.length,
- d = [],
- e = this;
- if ("string" != typeof a)
- return this.pushStack(
- n(a).filter(function() {
- for (b = 0; c > b; b++)
- if (n.contains(e[b], this)) return !0;
- })
- );
- for (b = 0; c > b; b++) n.find(a, e[b], d);
- return (
- (d = this.pushStack(c > 1 ? n.unique(d) : d)),
- (d.selector = this.selector ? this.selector + " " + a : a),
- d
- );
- },
- filter: function(a) {
- return this.pushStack(z(this, a || [], !1));
- },
- not: function(a) {
- return this.pushStack(z(this, a || [], !0));
- },
- is: function(a) {
- return !!z(
- this,
- "string" == typeof a && w.test(a) ? n(a) : a || [],
- !1
- ).length;
- }
- });
- var A,
- B = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
- C = (n.fn.init = function(a, b, c) {
- var e, f;
- if (!a) return this;
- if (((c = c || A), "string" == typeof a)) {
- if (
- ((e =
- "<" === a[0] && ">" === a[a.length - 1] && a.length >= 3
- ? [null, a, null]
- : B.exec(a)),
- !e || (!e[1] && b))
- )
- return !b || b.jquery
- ? (b || c).find(a)
- : this.constructor(b).find(a);
- if (e[1]) {
- if (
- ((b = b instanceof n ? b[0] : b),
- n.merge(
- this,
- n.parseHTML(
- e[1],
- b && b.nodeType ? b.ownerDocument || b : d,
- !0
- )
- ),
- x.test(e[1]) && n.isPlainObject(b))
- )
- for (e in b)
- n.isFunction(this[e])
- ? this[e](b[e])
- : this.attr(e, b[e]);
- return this;
- }
- return (
- (f = d.getElementById(e[2])),
- f && f.parentNode && ((this.length = 1), (this[0] = f)),
- (this.context = d),
- (this.selector = a),
- this
- );
- }
- return a.nodeType
- ? ((this.context = this[0] = a), (this.length = 1), this)
- : n.isFunction(a)
- ? void 0 !== c.ready
- ? c.ready(a)
- : a(n)
- : (void 0 !== a.selector &&
- ((this.selector = a.selector),
- (this.context = a.context)),
- n.makeArray(a, this));
- });
- (C.prototype = n.fn), (A = n(d));
- var D = /^(?:parents|prev(?:Until|All))/,
- E = { children: !0, contents: !0, next: !0, prev: !0 };
- n.fn.extend({
- has: function(a) {
- var b = n(a, this),
- c = b.length;
- return this.filter(function() {
- for (var a = 0; c > a; a++)
- if (n.contains(this, b[a])) return !0;
- });
- },
- closest: function(a, b) {
- for (
- var c,
- d = 0,
- e = this.length,
- f = [],
- g =
- w.test(a) || "string" != typeof a
- ? n(a, b || this.context)
- : 0;
- e > d;
- d++
- )
- for (c = this[d]; c && c !== b; c = c.parentNode)
- if (
- c.nodeType < 11 &&
- (g
- ? g.index(c) > -1
- : 1 === c.nodeType && n.find.matchesSelector(c, a))
- ) {
- f.push(c);
- break;
- }
- return this.pushStack(f.length > 1 ? n.uniqueSort(f) : f);
- },
- index: function(a) {
- return a
- ? "string" == typeof a
- ? h.call(n(a), this[0])
- : h.call(this, a.jquery ? a[0] : a)
- : this[0] && this[0].parentNode
- ? this.first().prevAll().length
- : -1;
- },
- add: function(a, b) {
- return this.pushStack(n.uniqueSort(n.merge(this.get(), n(a, b))));
- },
- addBack: function(a) {
- return this.add(
- null == a ? this.prevObject : this.prevObject.filter(a)
- );
- }
- });
- function F(a, b) {
- while ((a = a[b]) && 1 !== a.nodeType);
- return a;
- }
- n.each(
- {
- parent: function(a) {
- var b = a.parentNode;
- return b && 11 !== b.nodeType ? b : null;
- },
- parents: function(a) {
- return u(a, "parentNode");
- },
- parentsUntil: function(a, b, c) {
- return u(a, "parentNode", c);
- },
- next: function(a) {
- return F(a, "nextSibling");
- },
- prev: function(a) {
- return F(a, "previousSibling");
- },
- nextAll: function(a) {
- return u(a, "nextSibling");
- },
- prevAll: function(a) {
- return u(a, "previousSibling");
- },
- nextUntil: function(a, b, c) {
- return u(a, "nextSibling", c);
- },
- prevUntil: function(a, b, c) {
- return u(a, "previousSibling", c);
- },
- siblings: function(a) {
- return v((a.parentNode || {}).firstChild, a);
- },
- children: function(a) {
- return v(a.firstChild);
- },
- contents: function(a) {
- return a.contentDocument || n.merge([], a.childNodes);
- }
- },
- function(a, b) {
- n.fn[a] = function(c, d) {
- var e = n.map(this, b, c);
- return (
- "Until" !== a.slice(-5) && (d = c),
- d && "string" == typeof d && (e = n.filter(d, e)),
- this.length > 1 &&
- (E[a] || n.uniqueSort(e), D.test(a) && e.reverse()),
- this.pushStack(e)
- );
- };
- }
- );
- var G = /\S+/g;
- function H(a) {
- var b = {};
- return (
- n.each(a.match(G) || [], function(a, c) {
- b[c] = !0;
- }),
- b
- );
- }
- (n.Callbacks = function(a) {
- a = "string" == typeof a ? H(a) : n.extend({}, a);
- var b,
- c,
- d,
- e,
- f = [],
- g = [],
- h = -1,
- i = function() {
- for (e = a.once, d = b = !0; g.length; h = -1) {
- c = g.shift();
- while (++h < f.length)
- f[h].apply(c[0], c[1]) === !1 &&
- a.stopOnFalse &&
- ((h = f.length), (c = !1));
- }
- a.memory || (c = !1), (b = !1), e && (f = c ? [] : "");
- },
- j = {
- add: function() {
- return (
- f &&
- (c && !b && ((h = f.length - 1), g.push(c)),
- (function d(b) {
- n.each(b, function(b, c) {
- n.isFunction(c)
- ? (a.unique && j.has(c)) || f.push(c)
- : c &&
- c.length &&
- "string" !== n.type(c) &&
- d(c);
- });
- })(arguments),
- c && !b && i()),
- this
- );
- },
- remove: function() {
- return (
- n.each(arguments, function(a, b) {
- var c;
- while ((c = n.inArray(b, f, c)) > -1)
- f.splice(c, 1), h >= c && h--;
- }),
- this
- );
- },
- has: function(a) {
- return a ? n.inArray(a, f) > -1 : f.length > 0;
- },
- empty: function() {
- return f && (f = []), this;
- },
- disable: function() {
- return (e = g = []), (f = c = ""), this;
- },
- disabled: function() {
- return !f;
- },
- lock: function() {
- return (e = g = []), c || (f = c = ""), this;
- },
- locked: function() {
- return !!e;
- },
- fireWith: function(a, c) {
- return (
- e ||
- ((c = c || []),
- (c = [a, c.slice ? c.slice() : c]),
- g.push(c),
- b || i()),
- this
- );
- },
- fire: function() {
- return j.fireWith(this, arguments), this;
- },
- fired: function() {
- return !!d;
- }
- };
- return j;
- }),
- n.extend({
- Deferred: function(a) {
- var b = [
- [
- "resolve",
- "done",
- n.Callbacks("once memory"),
- "resolved"
- ],
- [
- "reject",
- "fail",
- n.Callbacks("once memory"),
- "rejected"
- ],
- ["notify", "progress", n.Callbacks("memory")]
- ],
- c = "pending",
- d = {
- state: function() {
- return c;
- },
- always: function() {
- return e.done(arguments).fail(arguments), this;
- },
- then: function() {
- var a = arguments;
- return n
- .Deferred(function(c) {
- n.each(b, function(b, f) {
- var g = n.isFunction(a[b]) && a[b];
- e[f[1]](function() {
- var a =
- g && g.apply(this, arguments);
- a && n.isFunction(a.promise)
- ? a
- .promise()
- .progress(c.notify)
- .done(c.resolve)
- .fail(c.reject)
- : c[f[0] + "With"](
- this === d
- ? c.promise()
- : this,
- g ? [a] : arguments
- );
- });
- }),
- (a = null);
- })
- .promise();
- },
- promise: function(a) {
- return null != a ? n.extend(a, d) : d;
- }
- },
- e = {};
- return (
- (d.pipe = d.then),
- n.each(b, function(a, f) {
- var g = f[2],
- h = f[3];
- (d[f[1]] = g.add),
- h &&
- g.add(
- function() {
- c = h;
- },
- b[1 ^ a][2].disable,
- b[2][2].lock
- ),
- (e[f[0]] = function() {
- return (
- e[f[0] + "With"](
- this === e ? d : this,
- arguments
- ),
- this
- );
- }),
- (e[f[0] + "With"] = g.fireWith);
- }),
- d.promise(e),
- a && a.call(e, e),
- e
- );
- },
- when: function(a) {
- var b = 0,
- c = e.call(arguments),
- d = c.length,
- f = 1 !== d || (a && n.isFunction(a.promise)) ? d : 0,
- g = 1 === f ? a : n.Deferred(),
- h = function(a, b, c) {
- return function(d) {
- (b[a] = this),
- (c[a] =
- arguments.length > 1
- ? e.call(arguments)
- : d),
- c === i
- ? g.notifyWith(b, c)
- : --f || g.resolveWith(b, c);
- };
- },
- i,
- j,
- k;
- if (d > 1)
- for (
- i = new Array(d), j = new Array(d), k = new Array(d);
- d > b;
- b++
- )
- c[b] && n.isFunction(c[b].promise)
- ? c[b]
- .promise()
- .progress(h(b, j, i))
- .done(h(b, k, c))
- .fail(g.reject)
- : --f;
- return f || g.resolveWith(k, c), g.promise();
- }
- });
- var I;
- (n.fn.ready = function(a) {
- return n.ready.promise().done(a), this;
- }),
- n.extend({
- isReady: !1,
- readyWait: 1,
- holdReady: function(a) {
- a ? n.readyWait++ : n.ready(!0);
- },
- ready: function(a) {
- (a === !0 ? --n.readyWait : n.isReady) ||
- ((n.isReady = !0),
- (a !== !0 && --n.readyWait > 0) ||
- (I.resolveWith(d, [n]),
- n.fn.triggerHandler &&
- (n(d).triggerHandler("ready"), n(d).off("ready"))));
- }
- });
- function J() {
- d.removeEventListener("DOMContentLoaded", J),
- a.removeEventListener("load", J),
- n.ready();
- }
- (n.ready.promise = function(b) {
- return (
- I ||
- ((I = n.Deferred()),
- "complete" === d.readyState ||
- ("loading" !== d.readyState && !d.documentElement.doScroll)
- ? a.setTimeout(n.ready)
- : (d.addEventListener("DOMContentLoaded", J),
- a.addEventListener("load", J))),
- I.promise(b)
- );
- }),
- n.ready.promise();
- var K = function(a, b, c, d, e, f, g) {
- var h = 0,
- i = a.length,
- j = null == c;
- if ("object" === n.type(c)) {
- e = !0;
- for (h in c) K(a, b, h, c[h], !0, f, g);
- } else if (
- void 0 !== d &&
- ((e = !0),
- n.isFunction(d) || (g = !0),
- j &&
- (g
- ? (b.call(a, d), (b = null))
- : ((j = b),
- (b = function(a, b, c) {
- return j.call(n(a), c);
- }))),
- b)
- )
- for (; i > h; h++)
- b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c)));
- return e ? a : j ? b.call(a) : i ? b(a[0], c) : f;
- },
- L = function(a) {
- return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType;
- };
- function M() {
- this.expando = n.expando + M.uid++;
- }
- (M.uid = 1),
- (M.prototype = {
- register: function(a, b) {
- var c = b || {};
- return (
- a.nodeType
- ? (a[this.expando] = c)
- : Object.defineProperty(a, this.expando, {
- value: c,
- writable: !0,
- configurable: !0
- }),
- a[this.expando]
- );
- },
- cache: function(a) {
- if (!L(a)) return {};
- var b = a[this.expando];
- return (
- b ||
- ((b = {}),
- L(a) &&
- (a.nodeType
- ? (a[this.expando] = b)
- : Object.defineProperty(a, this.expando, {
- value: b,
- configurable: !0
- }))),
- b
- );
- },
- set: function(a, b, c) {
- var d,
- e = this.cache(a);
- if ("string" == typeof b) e[b] = c;
- else for (d in b) e[d] = b[d];
- return e;
- },
- get: function(a, b) {
- return void 0 === b
- ? this.cache(a)
- : a[this.expando] && a[this.expando][b];
- },
- access: function(a, b, c) {
- var d;
- return void 0 === b ||
- (b && "string" == typeof b && void 0 === c)
- ? ((d = this.get(a, b)),
- void 0 !== d ? d : this.get(a, n.camelCase(b)))
- : (this.set(a, b, c), void 0 !== c ? c : b);
- },
- remove: function(a, b) {
- var c,
- d,
- e,
- f = a[this.expando];
- if (void 0 !== f) {
- if (void 0 === b) this.register(a);
- else {
- n.isArray(b)
- ? (d = b.concat(b.map(n.camelCase)))
- : ((e = n.camelCase(b)),
- b in f
- ? (d = [b, e])
- : ((d = e),
- (d = d in f ? [d] : d.match(G) || []))),
- (c = d.length);
- while (c--) delete f[d[c]];
- }
- (void 0 === b || n.isEmptyObject(f)) &&
- (a.nodeType
- ? (a[this.expando] = void 0)
- : delete a[this.expando]);
- }
- },
- hasData: function(a) {
- var b = a[this.expando];
- return void 0 !== b && !n.isEmptyObject(b);
- }
- });
- var N = new M(),
- O = new M(),
- P = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- Q = /[A-Z]/g;
- function R(a, b, c) {
- var d;
- if (void 0 === c && 1 === a.nodeType)
- if (
- ((d = "data-" + b.replace(Q, "-$&").toLowerCase()),
- (c = a.getAttribute(d)),
- "string" == typeof c)
- ) {
- try {
- c =
- "true" === c
- ? !0
- : "false" === c
- ? !1
- : "null" === c
- ? null
- : +c + "" === c
- ? +c
- : P.test(c)
- ? n.parseJSON(c)
- : c;
- } catch (e) {}
- O.set(a, b, c);
- } else c = void 0;
- return c;
- }
- n.extend({
- hasData: function(a) {
- return O.hasData(a) || N.hasData(a);
- },
- data: function(a, b, c) {
- return O.access(a, b, c);
- },
- removeData: function(a, b) {
- O.remove(a, b);
- },
- _data: function(a, b, c) {
- return N.access(a, b, c);
- },
- _removeData: function(a, b) {
- N.remove(a, b);
- }
- }),
- n.fn.extend({
- data: function(a, b) {
- var c,
- d,
- e,
- f = this[0],
- g = f && f.attributes;
- if (void 0 === a) {
- if (
- this.length &&
- ((e = O.get(f)),
- 1 === f.nodeType && !N.get(f, "hasDataAttrs"))
- ) {
- c = g.length;
- while (c--)
- g[c] &&
- ((d = g[c].name),
- 0 === d.indexOf("data-") &&
- ((d = n.camelCase(d.slice(5))),
- R(f, d, e[d])));
- N.set(f, "hasDataAttrs", !0);
- }
- return e;
- }
- return "object" == typeof a
- ? this.each(function() {
- O.set(this, a);
- })
- : K(
- this,
- function(b) {
- var c, d;
- if (f && void 0 === b) {
- if (
- ((c =
- O.get(f, a) ||
- O.get(
- f,
- a.replace(Q, "-$&").toLowerCase()
- )),
- void 0 !== c)
- )
- return c;
- if (
- ((d = n.camelCase(a)),
- (c = O.get(f, d)),
- void 0 !== c)
- )
- return c;
- if (((c = R(f, d, void 0)), void 0 !== c))
- return c;
- } else
- (d = n.camelCase(a)),
- this.each(function() {
- var c = O.get(this, d);
- O.set(this, d, b),
- a.indexOf("-") > -1 &&
- void 0 !== c &&
- O.set(this, a, b);
- });
- },
- null,
- b,
- arguments.length > 1,
- null,
- !0
- );
- },
- removeData: function(a) {
- return this.each(function() {
- O.remove(this, a);
- });
- }
- }),
- n.extend({
- queue: function(a, b, c) {
- var d;
- return a
- ? ((b = (b || "fx") + "queue"),
- (d = N.get(a, b)),
- c &&
- (!d || n.isArray(c)
- ? (d = N.access(a, b, n.makeArray(c)))
- : d.push(c)),
- d || [])
- : void 0;
- },
- dequeue: function(a, b) {
- b = b || "fx";
- var c = n.queue(a, b),
- d = c.length,
- e = c.shift(),
- f = n._queueHooks(a, b),
- g = function() {
- n.dequeue(a, b);
- };
- "inprogress" === e && ((e = c.shift()), d--),
- e &&
- ("fx" === b && c.unshift("inprogress"),
- delete f.stop,
- e.call(a, g, f)),
- !d && f && f.empty.fire();
- },
- _queueHooks: function(a, b) {
- var c = b + "queueHooks";
- return (
- N.get(a, c) ||
- N.access(a, c, {
- empty: n.Callbacks("once memory").add(function() {
- N.remove(a, [b + "queue", c]);
- })
- })
- );
- }
- }),
- n.fn.extend({
- queue: function(a, b) {
- var c = 2;
- return (
- "string" != typeof a && ((b = a), (a = "fx"), c--),
- arguments.length < c
- ? n.queue(this[0], a)
- : void 0 === b
- ? this
- : this.each(function() {
- var c = n.queue(this, a, b);
- n._queueHooks(this, a),
- "fx" === a &&
- "inprogress" !== c[0] &&
- n.dequeue(this, a);
- })
- );
- },
- dequeue: function(a) {
- return this.each(function() {
- n.dequeue(this, a);
- });
- },
- clearQueue: function(a) {
- return this.queue(a || "fx", []);
- },
- promise: function(a, b) {
- var c,
- d = 1,
- e = n.Deferred(),
- f = this,
- g = this.length,
- h = function() {
- --d || e.resolveWith(f, [f]);
- };
- "string" != typeof a && ((b = a), (a = void 0)),
- (a = a || "fx");
- while (g--)
- (c = N.get(f[g], a + "queueHooks")),
- c && c.empty && (d++, c.empty.add(h));
- return h(), e.promise(b);
- }
- });
- var S = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
- T = new RegExp("^(?:([+-])=|)(" + S + ")([a-z%]*)$", "i"),
- U = ["Top", "Right", "Bottom", "Left"],
- V = function(a, b) {
- return (
- (a = b || a),
- "none" === n.css(a, "display") ||
- !n.contains(a.ownerDocument, a)
- );
- };
- function W(a, b, c, d) {
- var e,
- f = 1,
- g = 20,
- h = d
- ? function() {
- return d.cur();
- }
- : function() {
- return n.css(a, b, "");
- },
- i = h(),
- j = (c && c[3]) || (n.cssNumber[b] ? "" : "px"),
- k = (n.cssNumber[b] || ("px" !== j && +i)) && T.exec(n.css(a, b));
- if (k && k[3] !== j) {
- (j = j || k[3]), (c = c || []), (k = +i || 1);
- do (f = f || ".5"), (k /= f), n.style(a, b, k + j);
- while (f !== (f = h() / i) && 1 !== f && --g);
- }
- return (
- c &&
- ((k = +k || +i || 0),
- (e = c[1] ? k + (c[1] + 1) * c[2] : +c[2]),
- d && ((d.unit = j), (d.start = k), (d.end = e))),
- e
- );
- }
- var X = /^(?:checkbox|radio)$/i,
- Y = /<([\w:-]+)/,
- Z = /^$|\/(?:java|ecma)script/i,
- $ = {
- option: [1, "", " "],
- thead: [1, ""],
- col: [2, ""],
- tr: [2, ""],
- td: [3, ""],
- _default: [0, "", ""]
- };
- ($.optgroup = $.option),
- ($.tbody = $.tfoot = $.colgroup = $.caption = $.thead),
- ($.th = $.td);
- function _(a, b) {
- var c =
- "undefined" != typeof a.getElementsByTagName
- ? a.getElementsByTagName(b || "*")
- : "undefined" != typeof a.querySelectorAll
- ? a.querySelectorAll(b || "*")
- : [];
- return void 0 === b || (b && n.nodeName(a, b)) ? n.merge([a], c) : c;
- }
- function aa(a, b) {
- for (var c = 0, d = a.length; d > c; c++)
- N.set(a[c], "globalEval", !b || N.get(b[c], "globalEval"));
- }
- var ba = /<|?\w+;/;
- function ca(a, b, c, d, e) {
- for (
- var f,
- g,
- h,
- i,
- j,
- k,
- l = b.createDocumentFragment(),
- m = [],
- o = 0,
- p = a.length;
- p > o;
- o++
- )
- if (((f = a[o]), f || 0 === f))
- if ("object" === n.type(f)) n.merge(m, f.nodeType ? [f] : f);
- else if (ba.test(f)) {
- (g = g || l.appendChild(b.createElement("div"))),
- (h = (Y.exec(f) || ["", ""])[1].toLowerCase()),
- (i = $[h] || $._default),
- (g.innerHTML = i[1] + n.htmlPrefilter(f) + i[2]),
- (k = i[0]);
- while (k--) g = g.lastChild;
- n.merge(m, g.childNodes),
- (g = l.firstChild),
- (g.textContent = "");
- } else m.push(b.createTextNode(f));
- (l.textContent = ""), (o = 0);
- while ((f = m[o++]))
- if (d && n.inArray(f, d) > -1) e && e.push(f);
- else if (
- ((j = n.contains(f.ownerDocument, f)),
- (g = _(l.appendChild(f), "script")),
- j && aa(g),
- c)
- ) {
- k = 0;
- while ((f = g[k++])) Z.test(f.type || "") && c.push(f);
- }
- return l;
- }
- !(function() {
- var a = d.createDocumentFragment(),
- b = a.appendChild(d.createElement("div")),
- c = d.createElement("input");
- c.setAttribute("type", "radio"),
- c.setAttribute("checked", "checked"),
- c.setAttribute("name", "t"),
- b.appendChild(c),
- (l.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked),
- (b.innerHTML = ""),
- (l.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue);
- })();
- var da = /^key/,
- ea = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- fa = /^([^.]*)(?:\.(.+)|)/;
- function ga() {
- return !0;
- }
- function ha() {
- return !1;
- }
- function ia() {
- try {
- return d.activeElement;
- } catch (a) {}
- }
- function ja(a, b, c, d, e, f) {
- var g, h;
- if ("object" == typeof b) {
- "string" != typeof c && ((d = d || c), (c = void 0));
- for (h in b) ja(a, h, c, d, b[h], f);
- return a;
- }
- if (
- (null == d && null == e
- ? ((e = c), (d = c = void 0))
- : null == e &&
- ("string" == typeof c
- ? ((e = d), (d = void 0))
- : ((e = d), (d = c), (c = void 0))),
- e === !1)
- )
- e = ha;
- else if (!e) return a;
- return (
- 1 === f &&
- ((g = e),
- (e = function(a) {
- return n().off(a), g.apply(this, arguments);
- }),
- (e.guid = g.guid || (g.guid = n.guid++))),
- a.each(function() {
- n.event.add(this, b, e, d, c);
- })
- );
- }
- (n.event = {
- global: {},
- add: function(a, b, c, d, e) {
- var f,
- g,
- h,
- i,
- j,
- k,
- l,
- m,
- o,
- p,
- q,
- r = N.get(a);
- if (r) {
- c.handler && ((f = c), (c = f.handler), (e = f.selector)),
- c.guid || (c.guid = n.guid++),
- (i = r.events) || (i = r.events = {}),
- (g = r.handle) ||
- (g = r.handle = function(b) {
- return "undefined" != typeof n &&
- n.event.triggered !== b.type
- ? n.event.dispatch.apply(a, arguments)
- : void 0;
- }),
- (b = (b || "").match(G) || [""]),
- (j = b.length);
- while (j--)
- (h = fa.exec(b[j]) || []),
- (o = q = h[1]),
- (p = (h[2] || "").split(".").sort()),
- o &&
- ((l = n.event.special[o] || {}),
- (o = (e ? l.delegateType : l.bindType) || o),
- (l = n.event.special[o] || {}),
- (k = n.extend(
- {
- type: o,
- origType: q,
- data: d,
- handler: c,
- guid: c.guid,
- selector: e,
- needsContext:
- e && n.expr.match.needsContext.test(e),
- namespace: p.join(".")
- },
- f
- )),
- (m = i[o]) ||
- ((m = i[o] = []),
- (m.delegateCount = 0),
- (l.setup && l.setup.call(a, d, p, g) !== !1) ||
- (a.addEventListener &&
- a.addEventListener(o, g))),
- l.add &&
- (l.add.call(a, k),
- k.handler.guid || (k.handler.guid = c.guid)),
- e ? m.splice(m.delegateCount++, 0, k) : m.push(k),
- (n.event.global[o] = !0));
- }
- },
- remove: function(a, b, c, d, e) {
- var f,
- g,
- h,
- i,
- j,
- k,
- l,
- m,
- o,
- p,
- q,
- r = N.hasData(a) && N.get(a);
- if (r && (i = r.events)) {
- (b = (b || "").match(G) || [""]), (j = b.length);
- while (j--)
- if (
- ((h = fa.exec(b[j]) || []),
- (o = q = h[1]),
- (p = (h[2] || "").split(".").sort()),
- o)
- ) {
- (l = n.event.special[o] || {}),
- (o = (d ? l.delegateType : l.bindType) || o),
- (m = i[o] || []),
- (h =
- h[2] &&
- new RegExp(
- "(^|\\.)" +
- p.join("\\.(?:.*\\.|)") +
- "(\\.|$)"
- )),
- (g = f = m.length);
- while (f--)
- (k = m[f]),
- (!e && q !== k.origType) ||
- (c && c.guid !== k.guid) ||
- (h && !h.test(k.namespace)) ||
- (d &&
- d !== k.selector &&
- ("**" !== d || !k.selector)) ||
- (m.splice(f, 1),
- k.selector && m.delegateCount--,
- l.remove && l.remove.call(a, k));
- g &&
- !m.length &&
- ((l.teardown &&
- l.teardown.call(a, p, r.handle) !== !1) ||
- n.removeEvent(a, o, r.handle),
- delete i[o]);
- } else for (o in i) n.event.remove(a, o + b[j], c, d, !0);
- n.isEmptyObject(i) && N.remove(a, "handle events");
- }
- },
- dispatch: function(a) {
- a = n.event.fix(a);
- var b,
- c,
- d,
- f,
- g,
- h = [],
- i = e.call(arguments),
- j = (N.get(this, "events") || {})[a.type] || [],
- k = n.event.special[a.type] || {};
- if (
- ((i[0] = a),
- (a.delegateTarget = this),
- !k.preDispatch || k.preDispatch.call(this, a) !== !1)
- ) {
- (h = n.event.handlers.call(this, a, j)), (b = 0);
- while ((f = h[b++]) && !a.isPropagationStopped()) {
- (a.currentTarget = f.elem), (c = 0);
- while (
- (g = f.handlers[c++]) &&
- !a.isImmediatePropagationStopped()
- )
- (!a.rnamespace || a.rnamespace.test(g.namespace)) &&
- ((a.handleObj = g),
- (a.data = g.data),
- (d = (
- (n.event.special[g.origType] || {}).handle ||
- g.handler
- ).apply(f.elem, i)),
- void 0 !== d &&
- (a.result = d) === !1 &&
- (a.preventDefault(), a.stopPropagation()));
- }
- return k.postDispatch && k.postDispatch.call(this, a), a.result;
- }
- },
- handlers: function(a, b) {
- var c,
- d,
- e,
- f,
- g = [],
- h = b.delegateCount,
- i = a.target;
- if (
- h &&
- i.nodeType &&
- ("click" !== a.type || isNaN(a.button) || a.button < 1)
- )
- for (; i !== this; i = i.parentNode || this)
- if (
- 1 === i.nodeType &&
- (i.disabled !== !0 || "click" !== a.type)
- ) {
- for (d = [], c = 0; h > c; c++)
- (f = b[c]),
- (e = f.selector + " "),
- void 0 === d[e] &&
- (d[e] = f.needsContext
- ? n(e, this).index(i) > -1
- : n.find(e, this, null, [i]).length),
- d[e] && d.push(f);
- d.length && g.push({ elem: i, handlers: d });
- }
- return (
- h < b.length && g.push({ elem: this, handlers: b.slice(h) }), g
- );
- },
- props: "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(
- " "
- ),
- fixHooks: {},
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function(a, b) {
- return (
- null == a.which &&
- (a.which = null != b.charCode ? b.charCode : b.keyCode),
- a
- );
- }
- },
- mouseHooks: {
- props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(
- " "
- ),
- filter: function(a, b) {
- var c,
- e,
- f,
- g = b.button;
- return (
- null == a.pageX &&
- null != b.clientX &&
- ((c = a.target.ownerDocument || d),
- (e = c.documentElement),
- (f = c.body),
- (a.pageX =
- b.clientX +
- ((e && e.scrollLeft) || (f && f.scrollLeft) || 0) -
- ((e && e.clientLeft) || (f && f.clientLeft) || 0)),
- (a.pageY =
- b.clientY +
- ((e && e.scrollTop) || (f && f.scrollTop) || 0) -
- ((e && e.clientTop) || (f && f.clientTop) || 0))),
- a.which ||
- void 0 === g ||
- (a.which = 1 & g ? 1 : 2 & g ? 3 : 4 & g ? 2 : 0),
- a
- );
- }
- },
- fix: function(a) {
- if (a[n.expando]) return a;
- var b,
- c,
- e,
- f = a.type,
- g = a,
- h = this.fixHooks[f];
- h ||
- (this.fixHooks[f] = h = ea.test(f)
- ? this.mouseHooks
- : da.test(f)
- ? this.keyHooks
- : {}),
- (e = h.props ? this.props.concat(h.props) : this.props),
- (a = new n.Event(g)),
- (b = e.length);
- while (b--) (c = e[b]), (a[c] = g[c]);
- return (
- a.target || (a.target = d),
- 3 === a.target.nodeType && (a.target = a.target.parentNode),
- h.filter ? h.filter(a, g) : a
- );
- },
- special: {
- load: { noBubble: !0 },
- focus: {
- trigger: function() {
- return this !== ia() && this.focus
- ? (this.focus(), !1)
- : void 0;
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- return this === ia() && this.blur
- ? (this.blur(), !1)
- : void 0;
- },
- delegateType: "focusout"
- },
- click: {
- trigger: function() {
- return "checkbox" === this.type &&
- this.click &&
- n.nodeName(this, "input")
- ? (this.click(), !1)
- : void 0;
- },
- _default: function(a) {
- return n.nodeName(a.target, "a");
- }
- },
- beforeunload: {
- postDispatch: function(a) {
- void 0 !== a.result &&
- a.originalEvent &&
- (a.originalEvent.returnValue = a.result);
- }
- }
- }
- }),
- (n.removeEvent = function(a, b, c) {
- a.removeEventListener && a.removeEventListener(b, c);
- }),
- (n.Event = function(a, b) {
- return this instanceof n.Event
- ? (a && a.type
- ? ((this.originalEvent = a),
- (this.type = a.type),
- (this.isDefaultPrevented =
- a.defaultPrevented ||
- (void 0 === a.defaultPrevented &&
- a.returnValue === !1)
- ? ga
- : ha))
- : (this.type = a),
- b && n.extend(this, b),
- (this.timeStamp = (a && a.timeStamp) || n.now()),
- void (this[n.expando] = !0))
- : new n.Event(a, b);
- }),
- (n.Event.prototype = {
- constructor: n.Event,
- isDefaultPrevented: ha,
- isPropagationStopped: ha,
- isImmediatePropagationStopped: ha,
- preventDefault: function() {
- var a = this.originalEvent;
- (this.isDefaultPrevented = ga), a && a.preventDefault();
- },
- stopPropagation: function() {
- var a = this.originalEvent;
- (this.isPropagationStopped = ga), a && a.stopPropagation();
- },
- stopImmediatePropagation: function() {
- var a = this.originalEvent;
- (this.isImmediatePropagationStopped = ga),
- a && a.stopImmediatePropagation(),
- this.stopPropagation();
- }
- }),
- n.each(
- {
- mouseenter: "mouseover",
- mouseleave: "mouseout",
- pointerenter: "pointerover",
- pointerleave: "pointerout"
- },
- function(a, b) {
- n.event.special[a] = {
- delegateType: b,
- bindType: b,
- handle: function(a) {
- var c,
- d = this,
- e = a.relatedTarget,
- f = a.handleObj;
- return (
- (!e || (e !== d && !n.contains(d, e))) &&
- ((a.type = f.origType),
- (c = f.handler.apply(this, arguments)),
- (a.type = b)),
- c
- );
- }
- };
- }
- ),
- n.fn.extend({
- on: function(a, b, c, d) {
- return ja(this, a, b, c, d);
- },
- one: function(a, b, c, d) {
- return ja(this, a, b, c, d, 1);
- },
- off: function(a, b, c) {
- var d, e;
- if (a && a.preventDefault && a.handleObj)
- return (
- (d = a.handleObj),
- n(a.delegateTarget).off(
- d.namespace
- ? d.origType + "." + d.namespace
- : d.origType,
- d.selector,
- d.handler
- ),
- this
- );
- if ("object" == typeof a) {
- for (e in a) this.off(e, b, a[e]);
- return this;
- }
- return (
- (b === !1 || "function" == typeof b) &&
- ((c = b), (b = void 0)),
- c === !1 && (c = ha),
- this.each(function() {
- n.event.remove(this, a, c, b);
- })
- );
- }
- });
- var ka = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
- la = /