-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.7b9f5a9d833c267bb2a3.js.origin.1
2 lines (2 loc) · 841 KB
/
app.7b9f5a9d833c267bb2a3.js.origin.1
1
2
!function(l){function e(e){for(var t,n,s=e[0],i=e[1],a=e[2],o=0,r=[];o<s.length;o++)n=s[o],Object.prototype.hasOwnProperty.call(p,n)&&p[n]&&r.push(p[n][0]),p[n]=0;for(t in i)Object.prototype.hasOwnProperty.call(i,t)&&(l[t]=i[t]);for(m&&m(e);r.length;)r.shift()();return d.push.apply(d,a||[]),c()}function c(){for(var e,t=0;t<d.length;t++){for(var n=d[t],s=!0,i=1;i<n.length;i++){var a=n[i];0!==p[a]&&(s=!1)}s&&(d.splice(t--,1),e=g(g.s=n[0]))}return e}var n={},u={0:0},p={0:0},d=[];function g(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return l[e].call(t.exports,t,t.exports,g),t.l=!0,t.exports}g.e=function(d){var e=[];u[d]?e.push(u[d]):0!==u[d]&&{2:1}[d]&&e.push(u[d]=new Promise(function(e,s){for(var t=({2:"vendors~rtl"}[d]||d)+".css",i=g.p+t,n=document.getElementsByTagName("link"),a=0;a<n.length;a++){var o=(l=n[a]).getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(o===t||o===i))return e()}var r=document.getElementsByTagName("style");for(a=0;a<r.length;a++){var l;if((o=(l=r[a]).getAttribute("data-href"))===t||o===i)return e()}var c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.onload=e,c.onerror=function(e){var t=e&&e.target&&e.target.src||i,n=new Error("Loading CSS chunk "+d+" failed.\n("+t+")");n.code="CSS_CHUNK_LOAD_FAILED",n.request=t,delete u[d],c.parentNode.removeChild(c),s(n)},c.href=i,document.getElementsByTagName("head")[0].appendChild(c)}).then(function(){u[d]=0}));var t,n=p[d];if(0!==n)if(n)e.push(n[2]);else{var s=new Promise(function(e,t){n=p[d]=[e,t]});e.push(n[2]=s);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,g.nc&&a.setAttribute("nonce",g.nc),a.src=g.p+""+({2:"vendors~rtl"}[t=d]||t)+"."+{2:"a7a4e34912f9c6073a8c",3:"f0b8ef7a09ca6762d4b0",4:"3edc2840b5b1e43194e4"}[t]+".js";var o=new Error;i=function(e){a.onerror=a.onload=null,clearTimeout(r);var t=p[d];if(0!==t){if(t){var n=e&&("load"===e.type?"missing":e.type),s=e&&e.target&&e.target.src;o.message="Loading chunk "+d+" failed.\n("+n+": "+s+")",o.name="ChunkLoadError",o.type=n,o.request=s,t[1](o)}p[d]=void 0}};var r=setTimeout(function(){i({type:"timeout",target:a})},12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(e)},g.m=l,g.c=n,g.d=function(e,t,n){g.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},g.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.t=function(t,e){if(1&e&&(t=g(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(g.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)g.d(n,s,function(e){return t[e]}.bind(null,s));return n},g.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return g.d(t,"a",t),t},g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},g.p="",g.oe=function(e){throw console.error(e),e};var t=window.webpackJsonp=window.webpackJsonp||[],s=t.push.bind(t);t.push=e,t=t.slice();for(var i=0;i<t.length;i++)e(t[i]);var m=s;d.push([229,1]),c()}(Array(139).concat([function(e,t){e.exports='<p ng-repeat="error in errors">\n {{error}}\n</p>\n'},,function(e,t,n){"use strict";e.exports=["$scope","$translate","$rootScope","$location","RoleEndpoint","PermissionEndpoint",function(t,e,n,s,i,a){if(!1===n.hasManageSettingsPermission())return s.path("/");e("tool.manage_roles").then(function(e){t.title=e,t.$emit("setPageTitle",e)}),t.$emit("event:mode:change","settings")}]},function(e,t,n){"use strict";e.exports=["$scope","$translate","$rootScope","$location","WebhookEndpoint",function(t,e,n,s,i){if(!1===n.hasManageSettingsPermission())return s.path("/");e("tool.manage_webhooks").then(function(e){t.title=e,t.$emit("setPageTitle",e)}),t.$emit("event:mode:change","settings")}]},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function s(e,t,n,s){var i=e.$new();i.token=s.params().token,t.openResetConfirm(i),n.url("/")}(e.exports=s).$inject=["$rootScope","PasswordReset","$location","$transition$"]},,,,,,,,,,,,,,function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$transition$",function(e,t,n){e.surveyId=n.params().id,e.actionType=n.params().action}]},function(e,t){e.exports="<survey-editor survey-id='surveyId' action-type='actionType'></survey-editor>\n"},function(e,t,n){"use strict";var T=n(1179);e.exports=["$scope","Features","$state","_","ModalService","Sortable","ConfigEndpoint","Notify","FormEndpoint","FormStageEndpoint","FormAttributeEndpoint","FormStatsEndpoint","$q","PostFilters","LoadingProgress","$transition$","CountryCodeEndpoint","$translate","FormContactEndpoint","SurveyNotify",function(a,e,o,r,n,t,s,l,i,c,d,u,p,g,m,h,f,v,b,y){a.isActiveStep=function(e){return a.activeStep===e},a.isStepComplete=w,a.completeStepOne=function(){w(a.targetedSurvey.stepOne)?(a.activeStep=2,a.stepOneWarning=!1):a.stepOneWarning=!0},a.completeStepTwo=function(){w(a.targetedSurvey.stepTwo)&&void 0!==a.selectedCountry&&null!==a.selectedCountry?(a.stepTwoWarning=!1,x(a.textBoxNumbers),a.finalNumbers.badNumbersString.length?a.textBoxNumbers=a.finalNumbers.badNumbersString.slice(0,-1):(a.textBoxNumbers=a.finalNumbers.goodNumbersString.slice(0,-1),a.recipientCount=a.finalNumbers.goodNumbers.length,a.activeStep=3)):a.stepTwoWarning=!0},a.completeStepThree=function(){void 0!==a.survey.attributes&&a.survey.attributes.length?(a.stepThreeWarning=!1,a.activeStep=4,a.total_sms_messages=a.survey.attributes.length*a.finalNumbers.goodNumbers.length):a.stepThreeWarning=!0},a.openQuestionModal=function(e){a.stepThreeWarning=!1,e?(a.editQuestion=e,a.editQuestion.question=angular.copy(a.editQuestion.label)):a.editQuestion={newQuestion:!0};var t=e?"survey.targeted_survey.edit_title":"survey.targeted_survey.new_question_title";n.openTemplate("<targeted-question></targeted-question>",t,null,a,!0,!0)},a.checkForDuplicate=function(){return 0!==r.filter(a.survey.attributes,function(e){return a.editQuestion.question===e.label}).length},a.addNewQuestion=function(){n.close(),a.survey.attributes||(a.survey.attributes=[]);a.editQuestion.input="textarea",a.editQuestion.type="text",a.editQuestion.label=angular.copy(a.editQuestion.question),a.editQuestion.newQuestion&&(a.editQuestion.priority=function(e){return e&&0<e.length?r.last(e).priority+1:1}(a.survey.attributes),delete a.editQuestion.newQuestion,a.survey.attributes.push(a.editQuestion))},a.deleteQuestion=function(){n.close(),a.editQuestion.newQuestion||(a.survey.attributes=r.filter(a.survey.attributes,function(e){return e.label!==a.editQuestion.label}))},a.cancel=function(){n.close()},a.publish=$,a.getPublishDescription=C,a.previousStep=E,a.activeStep=1,a.stepOneWarning=!1,a.stepTwoWarning=!1,a.stepThreeWarning=!1,a.publish=$,a.previousStep=E,a.activeStep=1,a.selectedCountry,a.textBoxNumbers="",a.validatedNumbers=[],a.badCount=0,a.recipientCount=0,a.resetNumbers=function(){a.finalNumbers={goodNumbers:[],goodNumbersString:"",badNumbersString:"",repeatCount:0,storageObj:{},badNumberCount:0}},a.finalNumbers={goodNumbers:[],goodNumbersString:"",badNumbersString:"",repeatCount:0,storageObj:{},badNumberCount:0},a.runValidations=x,a.isLoading=m.getLoadingState,a.goToDataView=k,a.getCountryCodes=function(){f.query().$promise.then(function(e){r.each(e,function(e){e.country_name=v.instant("countries."+e.country_name),a.countriesList.push(e)})})},a.countriesList=[],a.getFormStats=A,a.totalResponses=0,a.totalRecipients=0,a.totalSent=0,a.totalPending=0,a.default_attributes=[{cardinality:0,input:"text",label:"Title",priority:1,required:!0,type:"title",options:[],config:{},form_stage_id:null},{cardinality:0,input:"text",label:"Description",priority:2,required:!0,type:"description",options:[],config:{},form_stage_id:null}],e.loadFeatures().then(function(){a.targetedSurveysEnabled=e.isFeatureEnabled("targeted-surveys"),a.targetedSurveysEnabled||o.go("settings.surveys.create")}),a.getCountryCodes(),a.surveyId=h.params().id,a.surveyId?(a.activeStep=4,i.get({id:a.surveyId}).$promise.then(function(e){a.survey=e,d.query({formId:a.surveyId}).$promise.then(function(e){a.survey.attributes=e})}),A()):a.survey={color:null,everyone_can_create:!1,hide_author:!0,targeted_survey:1};var _=document.getElementById("listWithHandle");function w(e){return e.$valid}function x(e){a.finalNumbers.badNumbersString="",a.finalNumbers.badNumberCount=0,e.split(",").forEach(function(e){var t=e.replace(/\s/g,"");if(!(0,T.isValidNumber)(t,a.selectedCountry.country_code)&&t.length)a.finalNumbers.badNumbersString=a.finalNumbers.badNumbersString+t+",",a.finalNumbers.badNumberCount=a.finalNumbers.badNumberCount+1;else if((0,T.isValidNumber)(t,a.selectedCountry.country_code)&&t.length){var n=(0,T.parse)(t,a.selectedCountry.country_code);t=(0,T.formatNumber)(n,"E.164"),a.finalNumbers.storageObj[t]?a.finalNumbers.repeatCount=a.finalNumbers.repeatCount+1:(a.finalNumbers.storageObj[t]=t,a.finalNumbers.goodNumbers.push(t),a.finalNumbers.goodNumbersString=a.finalNumbers.goodNumbersString+t+",")}})}function k(e){g.setFilter("form",[e]),o.go("posts.data")}function S(i){var e=a.default_attributes.concat(a.survey.attributes),t={attributes:e,formId:i,is_public:!0,label:"Post",priority:0,required:!1,show_when_published:!0,task_is_internal_only:!1,type:"post",id:a.survey.stageId};c.saveCache(t).$promise.then(function(t){a.survey.stageId=t.id;var n=[];r.each(e,function(e){e.form_stage_id=t.id,e.formId=i,n.push(d.saveCache(e).$promise)}),p.all(n).then(function(e){var s;a.survey.attributes=e,s=i,b.save({formId:s,contacts:a.textBoxNumbers,country_code:a.selectedCountry.country_code}).$promise.then(function(e){var t=a.finalNumbers.goodNumbers.length*(a.survey.attributes.length-2),n=1==t?"survey.targeted_survey.publish_notification_one":"survey.targeted_survey.publish_notification_many";l.notifyAction(n,{messages:t},!1,"thumb-up","circle-icon confirmation",{callback:k,text:"survey.targeted_survey.notification_button",callbackArg:s,actionClass:"button button-alpha"}),o.go("settings.surveys",{},{reload:!0})},function(e){var t=["survey.targeted_survey.error_contacts "];r.each(e.data.errors,function(e){e.source&&t.push(e.source.pointer+" "),l.errors(t)})})},function(e){l.error("survey.targeted_survey.error_message")})},function(e){l.error("survey.targeted_survey.error_message")})}function $(){l.confirmModal("Are you sure you want to send this SMS survey?",null,C(),"{questions: "+a.survey.attributes.length+", numbers: "+a.finalNumbers.goodNumbers.length+", total_sms_messages: "+a.total_sms_messages+"}","publish").then(function(){i.saveCache(a.survey).$promise.then(function(e){a.survey.id=e.id,S(e.id)},function(e){l.error("survey.targeted_survey.error_message")})})}function C(){return a.isActiveStep(4)&&!a.surveyId?1===a.survey.attributes.length&&1===a.finalNumbers.goodNumbers.length?"survey.targeted_survey.publish_description_one_number_one_question":1===a.survey.attributes.length?"survey.targeted_survey.publish_description_one_question":1===a.finalNumbers.goodNumbers.length?"survey.targeted_survey.publish_description_one_number":"survey.targeted_survey.publish_description_many":"survey.targeted_survey.published_people"}function E(){a.activeStep=a.activeStep-1}function A(){var e=b.query({formId:a.surveyId}).$promise,t=u.query({formId:a.surveyId}).$promise;p.all([e,t]).then(function(e){a.recipientCount=e[0].length,a.totalResponses=e[1].total_responses,a.totalRecipients=e[1].total_recipients,a.totalSent=e[1].total_messages_sent,a.totalPending=e[1].total_messages_pending})}_&&t.create(_,{handle:".list-handle",animation:150,onEnd:function(e){var t=e.to.children;r.each(t,function(t,n){r.each(a.survey.attributes,function(e){e.label===t.getAttribute("data")&&(e.priority=n+1)})})}})}]},function(e,t,n){e.exports='<layout-class layout="b"></layout-class>\n<div class="mode-context init" dropdown auto-close="disabled">\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n <li><a href="/settings/surveys" translate>app.surveys</a></li>\n </ol>\n <h1 class="mode-context-title">Surveys</h1>\n <a ui-sref="settings.surveys.create" ng-hide="surveyId">< <span translate="settings.send_crowdsourced"></span></a>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden">Show more/less</span>\n </span>\n\n <div class="mode-context-body">\n </div>\n</div>\n\n<main role="main">\n <div class="toolbar">\n </div>\n <div class="progress-bar" ng-show="isLoading()">\n <span>\n ..\n </span>\n </div>\n\n <div class="main-col">\n <form name="targetedSurvey">\n <div ng-show="targetedSurveysEnabled" class="form-sheet">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate="survey.targeted_survey.title" ng-hide="surveyId">Create a new targeted survey</h2>\n <p translate="survey.targeted_survey.description" ng-hide="surveyId">Send questions via SMS to a list of those phone numbers.</p>\n <h2 class="form-sheet-title" translate="survey.targeted_survey.targeted_survey" ng-hide="!surveyId">Targeted Survey</h2>\n <p translate="survey.targeted_survey.targeted_survey_desc" ng-hide="!surveyId">We sent this survey via SMS</p>\n </div>\n\n <div class="stepper">\n\n <ng-form name="stepOne">\n <div class="stepper-item" ng-class="{\'active\': isActiveStep(1), \'disabled\': !isActiveStep(1)}">\n <h2 class="stepper-heading" data-accordion-trigger>\n <span class="stepper-badge">1</span>\n <span translate="survey.targeted_survey.name_title">Name your survey</span>\n </h2>\n\n <div class="form-field" ng-show="!isActiveStep(1)">\n <h2 class=form-label translate="survey.targeted_survey.name">Survey Name</h2>\n <p>{{survey.name}}</p>\n </div>\n\n <div class="form-field required"\n ng-class="{\n \'error\': stepOne.name.$invalid && targetedSurvey.stepOne.name.$dirty,\n \'success\': !targetedSurvey.stepOne.name.$invalid && targetedSurvey.stepOne.name.$dirty\n }"\n ng-show="isActiveStep(1)"\n >\n <label for="name" translate="survey.targeted_survey.name">Survey name</label>\n <p ng-show="stepOneWarning && !targetedSurvey.stepOne.name.$dirty" class="alert error" translate="survey.targeted_survey.name_warning">You must give your survey a name.</p>\n <input type="text" name="name" ng-minlength="2" ng-maxlength="255" ng-model="survey.name" ng-required="true" placeholder="Name..."></input>\n <div\n class="alert error"\n ng-show="targetedSurvey.stepOne.name.$dirty"\n ng-repeat="(error, value) in targetedSurvey.stepOne.name.$error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'notify.form.validation.name.\' + error}}"></p>\n </div>\n </div>\n\n <div class="form-field required" ng-show="isActiveStep(1)">\n <label for="description" translate="survey.targeted_survey.description_title">Survey description</label>\n <p ng-show="stepOneWarning && !targetedSurvey.stepOne.description.$dirty" class="alert error" translate="survey.targeted_survey.description_warning">You must give your survey a description.</p>\n <textarea name="description" ng-model="survey.description" ng-required="true" placeholder="Describe your survey..."></textarea>\n <div\n class="alert error"\n ng-show="targetedSurvey.stepOne.description.$dirty"\n ng-repeat="(error, value) in targetedSurvey.stepOne.description.$error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'notify.form.validation.description.\' + error}}"></p>\n </div>\n </div>\n\n <div ng-hide="isActiveStep(1)">\n <h2 class=form-label translate="survey.targeted_survey.description_title">Survey Description</h2>\n <p>{{survey.description}}</p>\n </div>\n\n <div ng-show="isActiveStep(1)">\n <div class="form-field">\n <div class="button-group">\n <button class="button-alpha" ng-click="completeStepOne()" formnovalidate translate="settings.continue">Continue</button>\n </div>\n </div>\n </div>\n </div>\n </ng-form>\n\n <ng-form name="stepTwo">\n <div class="stepper-item" ng-class="{\'active\': isActiveStep(2), \'disabled\': !isActiveStep(2)}">\n <h2 class="stepper-heading">\n <span class="stepper-badge">2</span>\n <span translate="survey.targeted_survey.audience_title">Choose your audience</span>\n </h2>\n <span ng-show="!surveyId">\n <p ng-show="!isActiveStep(2) && recipientCount > 1" translate="survey.targeted_survey.send_to_people" translate-values="{recipientCount: recipientCount}">Send this survey to {{recipientCount}} people via SMS.</p>\n <p ng-show="!isActiveStep(2) && recipientCount === 1" translate="survey.targeted_survey.send_to_person" translate-values="{recipientCount: recipientCount}">Send this survey to {{recipientCount}} person via SMS.</p>\n </span>\n <span ng-show="surveyId && recipientCount > 0">\n <p ng-show="!isActiveStep(2) && recipientCount > 1" translate="survey.targeted_survey.send_to_people" translate-values="{recipientCount: recipientCount}">Send this survey to {{recipientCount}} people via SMS.</p>\n <p ng-show="!isActiveStep(2) && recipientCount === 1" translate="survey.targeted_survey.send_to_person" translate-values="{recipientCount: recipientCount}">Send this survey to {{recipientCount}} person via SMS.</p>\n </span>\n <div ng-show="isActiveStep(2)">\n <div class="form-field" ng-show="countriesList.length > 0">\n <label for="country-code" class="required" translate="survey.targeted_survey.country_code">\n Country code\n </label>\n <div class="alert error" ng-show="stepTwoWarning && (selectedCountry === undefined || selectedCountry === null)" >\n <p translate="survey.targeted_survey.country_code_error">You must select a country.</p>\n </div>\n <div class="custom-select">\n <select id="country-code" ng-options="country as (country.country_name + \' \' + country.dial_code) for country in countriesList" ng-model="selectedCountry"\n ><option selected value=\'\' ng-required="true" translate="survey.targeted_survey.select_country">Select Country</option></select>\n </div>\n </div>\n\n <div class="form-field" ng-show="countriesList.length < 1">\n <label for="loading-country-code" class="required" translate="survey.targeted_survey.country_code">\n Country code\n </label>\n <button id="loading-country-code" type="button" class="button button-beta">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label" translate>Loading countries</span>\n </button>\n </div>\n\n <div class="form-field">\n <label class="required" required translate="survey.targeted_survey.phone_numbers">Phone numbers</label>\n <p translate="survey.targeted_survey.phone_number_instructions">Please type in the phone numbers you\'d like to contact. You must place a comma between each phone number.</p>\n\n <div class="alert error" ng-show="stepTwoWarning && targetedSurvey.stepTwo.textBoxNumbers.$invalid && !finalNumbers.goodNumbers.length || finalNumbers.repeatCount > 0 || finalNumbers.badNumberCount > 0">\n <p ng-show="stepTwoWarning && targetedSurvey.stepTwo.textBoxNumbers.$invalid && !finalNumbers.goodNumbers.length" translate="survey.targeted_survey.phone_number_warning">You must enter at least 1 phone number.</p>\n <p ng-show="finalNumbers.repeatCount > 1" translate="survey.targeted_survey.multi_repeat_alert" translate-values="{repeatCount: finalNumbers.repeatCount}">We removed a total of {{finalNumbers.repeatCount}} repeat numbers from your list.</p>\n <p ng-show="finalNumbers.repeatCount === 1" translate="survey.targeted_survey.one_repeat_alert" translate-values="{repeatCount: finalNumbers.repeatCount}">We removed a total of {{finalNumbers.repeatCount}} repeat number from your list.</p>\n <p ng-show="finalNumbers.badNumberCount > 1" translate="survey.targeted_survey.multi_number_error" translate-values="{total: finalNumbers.goodNumbers.length + finalNumbers.badNumberCount + finalNumbers.repeatCount, bad: finalNumbers.badNumberCount}">Of the {{finalNumbers.goodNumbers.length + finalNumbers.badNumberCount + finalNumbers.repeatCount}} phone numbers you entered, we noticed problems with {{finalNumbers.badNumberCount}} of them. Please correct the phone numbers below and continue. Numbers must match the selected country\'s formatting rules.</p>\n <p ng-show="finalNumbers.badNumberCount === 1" translate="survey.targeted_survey.one_number_error" translate-values="{total: finalNumbers.goodNumbers.length + finalNumbers.badNumberCount + finalNumbers.repeatCount, bad: finalNumbers.badNumberCount}">Of the {{finalNumbers.goodNumbers.length + finalNumbers.badNumberCount + finalNumbers.repeatCount}} phone numbers you entered, we noticed problems with {{finalNumbers.badNumberCount}} of them. Please correct the phone number below and continue. Numbers must match the selected country\'s formatting rules.</p>\n </div>\n <textarea name="textBoxNumbers" ng-model="textBoxNumbers" ng-required="!finalNumbers.goodNumbers.length" placeholder="e.g. 1234567890, 9876543210..."></textarea>\n <div ng-show="finalNumbers.goodNumbers.length && finalNumbers.badNumberCount > 0">\n <p ng-if="finalNumbers.goodNumbers.length > 1" translate="survey.targeted_survey.multi_numbers_good" translate-values="{good_numbers: finalNumbers.goodNumbers.length}">These {{finalNumbers.goodNumbers.length}} numbers look fine.</p>\n <p ng-if="finalNumbers.goodNumbers.length === 1" translate="survey.targeted_survey.one_number_good" translate-values="{good_numbers: finalNumbers.goodNumbers.length}">This {{finalNumbers.goodNumbers.length}} number looks fine.</p>\n <textarea readonly>{{finalNumbers.goodNumbersString.slice(-1) === \',\' ? finalNumbers.goodNumbersString.slice(0, -1) : finalNumbers.goodNumbersString}}</textarea>\n </div>\n </div>\n\n <div class="form-field">\n <div class="button-group">\n <button class="button-alpha" ng-click="completeStepTwo()" formnovalidate translate="settings.continue">Continue</button>\n <button class="button" ng-click="previousStep()" translate="nav.back">Back</button>\n </div>\n </div>\n </div>\n </div>\n </ng-form>\n\n <ng-form name="stepThree">\n <div class="stepper-item" ng-class="{\'active\': isActiveStep(3), \'disabled\': !isActiveStep(3)}">\n <h2 class="stepper-heading">\n <span class="stepper-badge">3</span>\n <span translate="survey.targeted_survey.add_questions_title">Add your questions</span>\n </h2>\n\n <div class="alert" ng-show="isActiveStep(3)">\n <p translate="survey.targeted_survey.add_questions_description">We will send each question as a separate SMS. After someone responds, we will send the next question in the survey.</p>\n </div>\n\n <div class="alert error" ng-show="stepThreeWarning && (survey.attributes === undefined || !survey.attributes.length)">\n <p translate="survey.targeted_survey.question_error">You must add at least one question.</p>\n </div>\n\n <div class="form-field" ng-show="isActiveStep(3)">\n <ul id="listWithHandle" class="sortble-list">\n <li class="sortable-list-item" ng-repeat="question in survey.attributes" data={{question.label}} ng-hide="question.type === \'title\' || question.type === \'description\'">\n <span class="list-handle">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#grid-four-up"></use>\n </svg>\n </span>\n <a class="list-handle" ng-click="openQuestionModal(question)">{{question.label}}</a>\n </li>\n </ul>\n\n <a ng-show="survey.attributes.length" ng-click="openQuestionModal(null)" translate="survey.targeted_survey.add_another">Add another question...</a>\n <a ng-hide="survey.attributes.length" ng-click="openQuestionModal(null)" translate="survey.targeted_survey.add_a_question">Add a question...</a>\n </div>\n <div ng-hide="isActiveStep(3)">\n <p ng-repeat="question in survey.attributes | orderBy: \'priority\'" ng-hide="question.type === \'title\' || question.type === \'description\'">{{question.label}}</p>\n </div>\n\n\n <div ng-show="isActiveStep(3)">\n <div class="form-field">\n <div class="button-group">\n <button class="button-alpha" ng-click="completeStepThree()" translate="settings.continue">Continue</button>\n <button class="button" ng-click="previousStep(); resetNumbers()">Back</button>\n </div>\n </div>\n </div>\n </div>\n </ng-form>\n\n <ng-form name="stepFour">\n <div class="stepper-item" ng-class="{\'active\': isActiveStep(4), \'disabled\': !isActiveStep(4)}">\n <h2 class="stepper-heading">\n <span class="stepper-badge">4</span>\n <span translate="survey.targeted_survey.publish"></span>\n </h2>\n \x3c!-- WARNING! Add actual responses once we get them from API --\x3e\n <p ng-show="surveyId && isActiveStep(4) && totalRecipients > 0">\n <span ng-show="totalPending !== 1" translate="survey.targeted_survey.pending_messages" translate-values="{totalPending: totalPending}"></span>\n <span ng-show="totalPending === 1" translate="survey.targeted_survey.pending_message" translate-values="{totalPending: totalPending}"></span>\n <span ng-show="totalSent !== 1" translate="survey.targeted_survey.sent_messages" translate-values="{totalSent: totalSent}"></span>\n <span ng-show="totalSent === 1" translate="survey.targeted_survey.sent_message" translate-values="{totalSent: totalSent}"></span>\n <span ng-show="totalResponses !== 1" translate="survey.targeted_survey.received_responses" translate-values="{responses: totalResponses}"></span>\n <span ng-show="totalResponses === 1" translate="survey.targeted_survey.received_response" translate-values="{responses: totalResponses}"></span>\n <span ng-show="totalRecipients === 1" translate="survey.targeted_survey.recipient_count" translate-values="{recipients: totalRecipients}"></span>\n <span ng-show="totalRecipients !== 1" translate="survey.targeted_survey.recipients_count" translate-values="{recipients: totalRecipients}"></span>\n </p>\n <div class="alert" ng-show="isActiveStep(4) && !surveyId">\n <p translate={{getPublishDescription()}} translate-values="{questions: survey.attributes.length, numbers:finalNumbers.goodNumbers.length, total_sms_messages: total_sms_messages}"></p>\n <p ng-show="!surveyId" translate="survey.targeted_survey.send_to_old_number_warning"></p>\n </div>\n\n <div class="form-field switch checked" ng-show="isActiveStep(4) && !surveyId">\n <label for="switch4" translate="survey.require_review"></label>\n <p ng-show="targetedSurvey.require_review" translate="survey.require_review_desc"></p>\n <div class="toggle-switch">\n <input class="tgl" id="switch4" type="checkbox" ng-model="survey.require_approval">\n <label class="tgl-btn" for="switch4"></label>\n </div>\n </div>\n\n <div class="form-field switch checked" ng-show="isActiveStep(4) && !surveyId">\n <label for="switch5" translate="survey.targeted_survey.hide_responders"></label>\n <p ng-show="targetedSurvey.hide_responders" translate="survey.targeted_survey.hide_responders_desc"></p>\n <div class="toggle-switch">\n <input class="tgl" id="switch5" type="checkbox" ng-model="survey.hide_author">\n <label class="tgl-btn" for="switch5"></label>\n </div>\n </div>\n\n <div class="button-group" ng-show="isActiveStep(4) && !surveyId">\n <button class="button-alpha" ng-disabled="!isStepComplete(targetedSurvey.stepFour)" ng-click="publish()" translate="survey.targeted_survey.publish"></button>\n <button class="button" ng-click="previousStep()" translate="nav.back"></button>\n </div>\n </div>\n <div class="form-field button-group" ng-show="isActiveStep(4) && surveyId">\n <button class="button-alpha" ng-click="goToDataView(surveyId)">View responses</button>\n </div>\n </ng-form>\n </div>\n </div>\n </form>\n </div>\n</main>\n'},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$translate","$location","RoleEndpoint","TagEndpoint","FormEndpoint","Notify","_","Util","$transition$","$q","$state",function(n,t,e,s,i,a,o,r,l,c,d,u,p){if(!1===t.hasManageSettingsPermission())return s.path("/");function g(e){n.processing=!1,r.apiErrors(e)}"/settings/categories/create"===s.path()?(n.category={type:"category",icon:"tag",color:"",parent_id:null,parent_id_original:null},n.isParent=!1,e("category.add_tag").then(function(e){n.title=e,n.$emit("setPageTitle",e)})):(a.getFresh({id:d.params().id}).$promise.then(function(e){n.category=e,n.category.parent&&(n.category.parent_id=n.category.parent.id,n.category.parent_id_original=n.category.parent.id,delete n.category.parent),n.category.children&&n.category.children.length&&(n.isParent=!0)}),e("category.edit_tag").then(function(e){n.title=e,t.$emit("setPageTitle",e)})),n.$emit("event:mode:change","settings"),n.addParent=function(e){return a.getFresh({id:e})},n.deleteCategory=function(e){r.confirmDelete("notify.category.destroy_confirm","notify.category.destroy_confirm_desc").then(function(){return a.delete({id:e.id}).$promise.then(function(){r.notify("notify.category.destroy_success"),s.url("/settings/categories")})}).catch(g)},n.getParentName=function(){var t="Nothing";n.category&&n.parents&&n.parents.forEach(function(e){e.id===n.category.parent_id&&(t=e.tag)});return t},n.saveCategory=function(e){if(n.processing=!0,e.slug=e.tag,e.parent_id&&e.parent_id!==e.parent_id_original){var t=l.findWhere(n.parents,{id:e.parent_id});e.role=t.role}u.when(a.saveCache(e).$promise).then(function(e){if(e.children&&e.children.length)return t=e,n=[],l.each(t.children,function(e){n.push(a.saveCache({id:e.id,role:t.role}).$promise)}),u.all(n);var t,n}).then(function(){r.notify("notify.category.save_success",{name:n.category.tag}),p.go("settings.categories",{},{reload:!0})}).catch(g)},n.cancel=function(){s.path("/settings/categories")},n.processing=!1,n.save=e.instant("app.save"),n.saving=e.instant("app.saving"),i.query().$promise.then(function(e){n.roles=e}),a.queryFresh({level:"parent"}).$promise.then(function(e){n.parents=l.filter(e,function(e){return e.id!==parseInt(d.params().id)})})}]},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n <li><a href="/settings/categories" translate>app.categories</a></li>\n </ol>\n <h1 class="mode-context-title" ng-show="category.id" translate>app.edit_category</h1>\n <h1 class="mode-context-title" ng-show="!category.id" translate>app.add_category</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n <div class="mode-context-body">\n </div>\n </div>\n <main role="main">\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="button-group">\n <button type="button" class="button-flat" ng-click="cancel()" translate>app.cancel</button>\n <button class="button-alpha" type="button" ng-click="saveCategory(category)" type="submit" ng-disabled="form.$invalid" ng-if="!processing">\n {{save}}</button>\n <button type="submit" class="button-alpha" disabled ng-if="processing">{{saving}}\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </button>\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n \x3c!-- start edit --\x3e\n\n <div class="full-col">\n <form name="form">\n <div class="form-sheet">\n \x3c!-- Title --\x3e\n <div class="form-field">\n <label translate>category.editor.name</label>\n <input type="text" placeholder="{{\'category.editor.name\' | translate}}" ng-minlength="2" ng-maxlength="255" ng-model="category.tag" required>\n </div>\n \x3c!-- Description --\x3e\n <div class="form-field">\n <label translate>category.editor.description</label>\n <textarea name="description" data-min-rows=\'1\' rows=\'1\' ng-maxlength="150" ng-model="category.description"></textarea>\n </div>\n \x3c!-- Parent/child-relations --\x3e\n <fieldset\n class="custom-fieldset init"\n dropdown\n ng-show="!isParent"\n >\n <legend\n class="dropdown-trigger init active"\n data-toggle="dropdown-menu"\n dropdown-toggle\n >\n <span class="legend-label" translate="app.this_category_is_child_to" translate-values="{ parent: getParentName() }">This category is a child to</span>\n <svg class="iconic chevron">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio">\n <label for="parent_label-nothing">\n <input\n type="radio"\n name="parent_label"\n id="parent_label-nothing"\n ng-value="null"\n ng-checked="category.parent_id === null"\n ng-model="category.parent_id"\n />\n <span translate="app.nothing">Nothing</span>\n </label>\n </div>\n\n <div class="form-field radio" ng-repeat="parent in parents">\n <label for="parent_label-{{parent.id}}">\n <input\n type="radio"\n name="parent_label"\n id="parent_label-{{parent.id}}"\n ng-checked="parent.id === category.parent_id"\n ng-value="parent.id"\n ng-model="category.parent_id"\n />\n <bdi>{{parent.tag}}</bdi>\n </label>\n </div>\n </div>\n </fieldset>\n \x3c!-- Who can see and add --\x3e\n <role-selector model="category" title="\'app.who_can_see_this_category\'" ng-show="!category.parent_id"></role-selector>\n <div class="form-field" ng-show="category.parent_id">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#people"></use>\n </svg>\n <span translate>category.child_permissions</span>\n </div>\n </div>\n </form>\n <div class="form-sheet" ng-show="category.id">\n <div class="form-sheet-summary">\n <h3 class="form-sheet-title" translate>category.delete_this_category</h3>\n </div>\n\n <div class="form-field">\n <p translate>category.delete_category_desc</p>\n\n <button class="button-destructive" ng-click="deleteCategory(category)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label" translate>category.delete_category</span>\n </button>\n </div>\n\n </div>\n </div>\n </main>\n</div>\n'},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n <li><a href="/settings/users" translate>app.users</a></li>\n </ol>\n <h1 class="mode-context-title" ng-show="user.id" translate>app.edit_user</h1>\n <h1 class="mode-context-title" ng-show="!user.id" translate>app.add_user</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n <div custom-users-editor class="main-col">\n\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="button-group">\n <button type="button" class="button-flat" ng-click="cancel()" translate>app.cancel</button>\n <button class="button-alpha" type="button" ng-click="saveUser(user)" type="submit" ng-disabled="form.$invalid" ng-if="!saving_user">{{save}}</button>\n <button type="submit" class="button-alpha" disabled ng-if="saving_user">{{saving}}\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </button>\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <form name="form">\n <div class="form-sheet">\n <div class="form-field" ng-class="{ \'error\': form.full_name.$invalid && form.full_name.$dirty }">\n <label translate>user.full_name</label>\n <input type="text" placeholder="{{\'user_create.full_name\' | translate}}" ng-maxlength="150" ng-model="user.realname" name="full_name" required>\n <div ng-repeat="(error, value) in form.full_name.$error"\n ng-show="form.full_name.$dirty"\n class="alert error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'user.valid.full_name.\' + error}}" translate-default="{{error}}"></p>\n </div>\n </div>\n\n <div class="form-field" ng-class="{ \'error\': form.email.$invalid && form.email.$dirty }">\n <label class="hidden" translate>user.email</label>\n <input type="email" placeholder="{{\'user_create.email\' | translate}}" ng-maxlength="150" ng-model="user.email" name="email" required>\n <div ng-repeat="(error, value) in form.email.$error"\n ng-show="form.email.$dirty"\n class="alert error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'user.valid.email.\' + error}}" translate-default="{{error}}"></p>\n </div>\n </div>\n\n <div class="form-field" ng-class="{ \'error\': form.password.$invalid && form.password.$dirty }">\n <label class="hidden" translate>user.password</label>\n\n <a class="button button-flat" ng-show="!passwordShown" ng-click="showPassword()" translate>user.update_password</a>\n\n <input type="password" ng-show="passwordShown" placeholder="{{\'user.password\' | translate}}" ng-minlength="7" ng-maxlength="72" ng-model="user.password" name="password" ng-required="!user.id">\n <div ng-repeat="(error, value) in form.password.$error"\n ng-show="form.password.$dirty"\n class="alert error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'user.valid.password.\' + error}}" translate-default="{{error}}"></p>\n </div>\n </div>\n\n <fieldset class="custom-fieldset init" dropdown>\n <legend class="dropdown-trigger init" data-toggle="dropdown-menu" dropdown-toggle>\n <span class="legend-label" translate>\n user.role\n </span>\n <span class="legend-label" ng-show="user.role">\n {{ roles[user.role].display_name}}\n </span>\n <svg class="iconic chevron">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio" ng-repeat="role in roles">\n <input type="radio" id="role{{role.id}}" name="role"\n ng-model="user.role"\n ng-value="role.name"\n required\n >\n <label for="role{{role.id}}">\n {{role.display_name}}\n </label>\n </div>\n </div>\n </fieldset>\n\n </div>\n\n <div class="form-sheet" ng-show="user.id && user.contacts.length">\n <div class="form-sheet-summary">\n <h3 class="form-sheet-title" translate>Contacts</h3>\n </div>\n <div class="form-field" ng-repeat="contact in user.contacts">\n <div class="form-field-addon" style="text-transform: capitalize">\n <span class="addon before">{{contact.type}}</span>\n <input type="text" value="{{contact.contact}}" disabled="">\n </div>\n </div>\n </div>\n\n <div class="form-sheet" ng-show="user.id">\n <div class="form-sheet-summary">\n <h3 class="form-sheet-title" translate>user.delete_user</h3>\n </div>\n\n <div class="form-field">\n <p translate>user.delete_user_desc</p>\n\n <button class="button-destructive" ng-click="deleteUser(user)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label" translate>user.delete_user</span>\n </button>\n </div>\n </div>\n </form>\n\n </div>\n\n </main>\n</div>\n'},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n <li><a href="/settings/roles" translate>app.roles</a></li>\n </ol>\n <h1 class="mode-context-title" ng-show="role.id" translate>app.edit_role</h1>\n <h1 class="mode-context-title" ng-show="!role.id" translate>app.add_role</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n <div custom-roles-editor class="main-col">\n\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="button-group">\n <button type="button" class="button-flat" ng-click="cancel()" translate>app.cancel</button>\n <button type="submit" class="button-alpha" ng-if="!saving_role" ng-click="saveRole(role)">{{save}}</button>\n <button type="submit" class="button-alpha" disabled ng-if="saving_role">{{saving}}\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </button>\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <form>\n <div class="form-sheet">\n <div class="form-field">\n <label translate>role.name</label>\n <input type="text" placeholder="{{\'role.name\' | translate}}" ng-minlength="3" ng-maxlength="150" ng-model="role.display_name" required>\n </div>\n\n <div class="form-field">\n <label translate>role.description</label>\n <textarea name="description" data-min-rows=\'1\' rows=\'1\' ng-maxlength="150" ng-model="role.description"></textarea>\n </div>\n\n <fieldset>\n <legend translate>role.permissions</legend>\n <p translate>settings.roles.roles_description</p>\n\n <div class="alert" ng-hide="permissions.length">\n <p ng-hide="permissions.length"><em translate>empty.permission</em></p>\n </div>\n\n <div class="form-field checkbox" ng-repeat="permission in permissions" ng-if="role.name == \'admin\'">\n <label for="{{permission.id}}">\n <input id="{{permission.id}}" type="checkbox" disabled checked="checked">\n {{permission.name}}\n </label>\n </div>\n\n <div class="form-field checkbox" ng-repeat="permission in permissions" ng-if="role.name != \'admin\'">\n <label for="{{permission.id}}">\n <input id="{{permission.id}}" type="checkbox" value="permission.name" checklist-model="role.permissions" checklist-value="permission.name">\n {{permission.name}}\n </label>\n </div>\n </fieldset>\n </div>\n\n <div ng-if="!role.protected" class="form-sheet" ng-show="role.id">\n <div class="form-sheet-summary">\n <h3 class="form-sheet-title" translate>role.delete_role</h3>\n </div>\n\n <div class="form-field">\n <p translate>role.delete_role_desc</p>\n\n <button class="button-destructive" ng-click="deleteRole(role)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label" translate>role.delete_role</span>\n </button>\n </div>\n\n </div>\n </form>\n\n </div>\n\n </main>\n</div>\n'},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n <li><a href="/settings/webhooks" translate>app.webhooks</a></li>\n </ol>\n <h1 class="mode-context-title" ng-show="webhook.id" translate>app.edit_webhook</h1>\n <h1 class="mode-context-title" ng-show="!webhook.id" translate>app.add_webhook</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n <div custom-webhooks-editor class="main-col">\n\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="button-group">\n <button type="button" class="button-flat" ng-click="cancel()" translate>app.cancel</button>\n\n <button class="button-alpha" type="button" ng-click="saveWebhook(webhook)" type="submit" ng-disabled="form.$invalid" ng-if="!processing">{{save}}</button>\n <button type="submit" class="button-alpha" disabled ng-if="processing">{{saving}}\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </button>\n\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <form name="form">\n <div class="form-sheet">\n <div class="form-field">\n <label translate>webhook.name</label>\n <input type="text" placeholder="{{\'webhook.name\' | translate}}" ng-minlength="3" ng-maxlength="150" ng-model="webhook.name" required>\n </div>\n\n <div class="form-field">\n <label translate>webhook.shared_secret</label>\n <textarea name="description" data-min-rows=\'1\' rows=\'1\' ng-model="webhook.shared_secret" required></textarea>\n </div>\n\n <div class="form-field">\n <label translate>webhook.url</label>\n <input type="text" placeholder="{{\'webhook.url\' | translate}}" ng-model="webhook.url" required>\n </div>\n\n <div class="form-field">\n <label translate>webhook.event_type</label>\n <div class="custom-select">\n <select ng-model="webhook.event_type" required>\n <option ng-repeat="type in event_types" value="{{type}}">{{type}}</option>\n </select>\n </div>\n </div>\n\n <div class="form-field">\n <label translate>webhook.entity_type</label>\n <div class="custom-select">\n <select ng-model="webhook.entity_type" required>\n <option ng-repeat="type in entity_types" value="{{type}}">{{type}}</option>\n </select>\n </div>\n </div>\n <div class="form-field switch">\n <label translate="settings.webhooks.enable_source_destination">Specify survey</label>\n <div class="toggle-switch">\n <input class="tgl" id="{{provider.id}}_form_enable" type="checkbox" ng-checked="formEnabled" ng-click="toggleFormAssociation()">\n <label class="tgl-btn" for="{{provider.id}}_form_enable"></label>\n </div>\n <div data-fieldgroup-target="import_to_survey-survey" class="init active">\n <p data-fieldgroup-target="hide-author-message" class="init" ng-class="{\'active\' : formEnabled}" translate-values="{ provider: provider.name }" translate="" >\n <em translate="settings.webhooks.enable_source_destination_desc">\n This webhook will only be applied to Surveys of the selected type.\n </em>\n </p>\n\n <fieldset ng-show="formEnabled" class="custom-fieldset init" dropdown auto-close="outsideClick">\n <legend class="dropdown-trigger init" dropdown-toggle>\n <span class="legend-label">\n <span tranlate="webhooks.use_webhook_for">\n Use webhook for\n </span>\n <span class="custom-fieldset-value" ng-show="!selectedForm" translate="data_import.which_survey">\n which survey?\n </span>\n <span class="custom-fieldset-value" ng-show="selectedForm">\n {{selectedForm.name}}\n </span>\n </span>\n <svg class="iconic chevron">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio"\n ng-repeat="form in forms"\n ng-class="{\'checked\' : webhook.form.id === form.id}"\n ng-click="setSelectedForm(form)">\n <input\n id="import-to-{{form.id}}"\n name="import-to"\n ng-checked="{{webhook.form_id === form.id}}"\n type="radio">\n <label for="import-to-{{form.id}}">\n {{form.name}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset data-fieldgroup-target="import_to_survey-fields" class="init active" ng-show="selectedForm && formEnabled">\n <legend translate="survey.choose_survey_field">Choose the source and destination fields</legend>\n <p translate="survey.choose_survey_field_desc">The webhook will specify, when sending Posts to the remote API, which field should be considered the source and which the destination. The webhook support pages describe this functionality in greater detail. </p>\n <table>\n <thead>\n <tr>\n <th>Type</th>\n <th translate="survey.survey_field">Survey field</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <span>\n Source\n </span>\n </td><td>\n <div class="custom-select">\n <select ng-model="webhook.source_field_key">\n <option\n ng-repeat="attribute in selectedForm.attributes"\n value="{{attribute.post_key}}"\n label="{{attribute.label}}"\n ng-class="{\'required\' : attribute.required}">\n </select>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n <span translate="settings.webhooks.destination">\n Destination\n </span>\n </td><td>\n <div class="custom-select">\n <select ng-model="webhook.destination_field_key">\n <option\n ng-repeat="attribute in selectedForm.attributes"\n value="{{attribute.post_key}}"\n label="{{attribute.label}}"\n ng-class="{\'required\' : attribute.required}">\n </select>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </fieldset>\n </div>\n </div>\n </div>\n\n <div ng-if="!webhook.protected" class="form-sheet" ng-show="webhook.id">\n <div class="form-sheet-summary">\n <h3 class="form-sheet-title" translate>webhook.delete_webhook</h3>\n </div>\n\n <div class="form-field">\n <p translate>webhook.delete_webhook_desc</p>\n\n <button class="button-destructive" ng-click="deleteWebhook(webhook)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label" translate>webhook.delete_webhook</span>\n </button>\n </div>\n\n </div>\n </form>\n\n </div>\n\n </main>\n</div>\n'},,,,,,,,,,,function(e,t,n){n(230),e.exports=n(432)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n(433),n(1177),angular.lazy().resolve(["$q","$http",function(e,t){if(!window.ushahidi.verifier)return t.get(window.ushahidi.apiUrl+"/config").then(function(e){window.ushahidi.bootstrapConfig=e.data.results})}]).loading(function(){angular.element(document.getElementById("bootstrap-loading")).removeClass("hidden")}).error(function(e){try{e.data.errors[0].message&&angular.element(document.getElementById("bootstrap-error-message")).html(e.data.errors[0].message)}finally{angular.element(document.getElementById("bootstrap-error")).removeClass("hidden")}}).done(function(){angular.element(document.getElementById("bootstrap-loading")).addClass("hidden")}).bootstrap(document,["app"],{strictDi:!0})},function(e,t,n){"use strict";var s,i=n(434),a=(s=i)&&s.__esModule?s:{default:s};n(32),n(1178),n(450),n(452),n(453),n(454),n(456),n(457),n(459),n(460),n(462),n(464),n(465),n(466),window.d3=n(128),n(468),n(481),n(483),n(484),n(485),n(486),n(684),n(858),n(918),n(919),n(920),window.ushahidi=window.ushahidi||{};var o=window.ushahidi.backendUrl=(window.ushahidi.backendUrl||"undefined").replace(/\/$/,""),r=window.ushahidi.intercomAppId=window.ushahidi.intercomAppId||"",l=window.ushahidi.ushDisableChecks||!1,c=window.ushahidi.verifier=window.ushahidi.verifier||!1,d=window.ushahidi.appStoreId=window.ushahidi.appStoreId||"",u=window.ushahidi.apiUrl=o+"/api/v3";angular.module("app",["checklist-model","monospaced.elastic","ui.router","ngResource","LocalStorageModule","pascalprecht.translate","ui.bootstrap.pagination","angular-datepicker","angular.filter","ng-showdown","ngGeolocation","nvd3","angular-cache","linkify",a.default,"ushahidi.common","ushahidi.main","ushahidi.settings","ui.bootstrap.dropdown","ngtweet"]).constant("CONST",{BACKEND_URL:o,API_URL:u,INTERCOM_APP_ID:r,APP_STORE_ID:d,VERIFIER:c,DEFAULT_LOCALE:"en_US",OAUTH_CLIENT_ID:"ushahidiui",OAUTH_CLIENT_SECRET:"35e7f0bca957836d05ca0492211b0ac707671261",CLAIMED_ANONYMOUS_SCOPES:["posts","country_codes","media","forms","api","tags","savedsearches","sets","users","stats","layers","config","messages","notifications","webhooks","contacts","roles","permissions","csv"],CLAIMED_USER_SCOPES:["*"],MAPBOX_API_KEY:window.ushahidi.mapboxApiKey||"pk.eyJ1IjoidXNoYWhpZGkiLCJhIjoiY2lxaXUzeHBvMDdndmZ0bmVmOWoyMzN6NiJ9.CX56ZmZJv0aUsxvH5huJBw",USH_DISABLE_CHECKS:l,TOS_RELEASE_DATE:!!new Date(window.ushahidi.tosReleaseDate).toJSON()&&new Date(window.ushahidi.tosReleaseDate),EXPORT_POLLING_INTERVAL:window.ushahidi.export_polling_interval||3e4}).config(["$compileProvider",function(e){e.debugInfoEnabled(!1)}]).config(["$locationProvider",function(e){e.html5Mode(!0).hashPrefix("!")}]).config(["$urlRouterProvider","$urlMatcherFactoryProvider",function(e,t){e.when("","/views/map"),e.when("/","/views/map"),e.otherwise("/404"),t.strictMode(!1)}]).config(["$showdownProvider",function(e){e.setOption("simplifiedAutoLink",!0),e.setOption("excludeTrailingPunctuationFromURLs",!0),e.setOption("openLinksInNewWindow",!0),e.setOption("tasklists",!0),e.setOption("sanitize",!0)}]).factory("_",function(){return n(921)}).factory("d3",function(){return window.d3}).factory("URI",function(){return n(922)}).factory("Leaflet",function(){var e=n(98);return n(926),n(927),e}).factory("moment",function(){return n(227)}).factory("BootstrapConfig",["_",function(e){return window.ushahidi.bootstrapConfig?e.indexBy(window.ushahidi.bootstrapConfig,"id"):{map:{},site:{},features:{}}}]).factory("Sortable",function(){return n(928)}).factory("Editor",function(){return n(929)}).run(["$rootScope","LoadingProgress","$transitions","$uiRouter",function(e,t,n,s){t.watchTransitions(),window.ushahidi.gaEnabled&&n.onSuccess({},function(e){window.ga("send","pageview",s.urlRouter.location)})}]).run(["DemoDeploymentService",function(e){angular.element(document.getElementById("bootstrap-app")).removeClass("hidden"),angular.element(document.getElementById("bootstrap-loading")).addClass("hidden"),e.demoCheck()}]).run(["VerifierService",function(e){e.debugModeCheck()}])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a(n(32)),i=a(n(436));function a(e){return e&&e.__esModule?e:{default:e}}var o=window.ushahidi.ravenUrl||!1,r=void 0;if(o){var l=n(442);l.config(o,{release:"36569c941885cea6c6f0f5efdbc9c086940f7525",environment:window.ushahidi.environment||"dev",tags:{git_commit:"36569c941885cea6c6f0f5efdbc9c086940f7525"},sanitizeKeys:[/Authorization/i,/password/i,/accessToken/i,/api_key/i,/client_secret/i],dataCallback:function(n){n.message&&(n.message=n.message.replace(/"(Authorization|client_secret|password|accessToken)":"(.*?)"/,'"$1":"****"')),n.fingerprint&&n.fingerprint.forEach(function(e,t){n.fingerprint[t]=e.replace(/"(Authorization|client_secret|password|accessToken)":"(.*?)"/,'"$1":"****"')}),n.breadcrumbs&&n.breadcrumbs.values&&n.breadcrumbs.values.forEach(function(e,t){e.message&&(n.breadcrumbs.values[t].message=e.message.replace(/"(Authorization|client_secret|password|accessToken)":"(.*?)"/,'"$1":"****"'))})}}).addPlugin(n(448),s.default).install(),r=s.default.module("app.raven",["ngRaven"]).factory("Raven",function(){return l}).service({ravenService:i.default}).run(["ravenService",function(e){o&&e.init()}]).name}else r=s.default.module("app.raven",[]).name;t.default=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a(n(437)),i=a(n(438));function a(e){return e&&e.__esModule?e:{default:e}}var o=(r.$inject=["$rootScope","Session","Raven"],(0,i.default)(r,[{key:"init",value:function(){this.$rootScope.$on("event:authentication:login:succeeded",this.handleLogin.bind(this)),this.$rootScope.$on("event:authentication:logout:succeeded",this.handleLogout.bind(this)),this.Session.getSessionDataEntry("userId")&&this.handleLogin()}},{key:"handleLogin",value:function(){this.Session.getSessionDataEntry("userId")?this.Raven.setUserContext({id:this.Session.getSessionDataEntry("userId")}):this.Raven.setUserContext({})}},{key:"handleLogout",value:function(){this.Raven.setUserContext({})}}]),r);function r(e,t,n){(0,s.default)(this,r),this.$rootScope=e,this.Session=t,this.Raven=n}t.default=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480)},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";angular.module("ushahidi.common",["ushahidi.common.adaptive-input","ushahidi.common.dropdown","ushahidi.common.modal","ushahidi.common.custom-on-change","ushahidi.user-profile"]).service("Authentication",n(487)).service("Registration",n(488)).service("Session",n(489)).service("PasswordReset",n(496)).service("TermsOfService",n(497)).service("DemoDeploymentService",n(498)).directive("login",n(499)).directive("register",n(501)).directive("passwordReset",n(503)).directive("passwordResetConfirm",n(505)).directive("termsOfService",n(507)).directive("demoDeployment",n(509)).config(n(511)).run(n(512)).service("Notify",n(513)).service("SliderService",n(534)).service("DemoSliderService",n(535)).directive("ushSlider",n(536)).directive("ushDemoSlider",n(538)).service("ApiKeyEndpoint",n(540)).service("ConfigEndpoint",n(541)).service("UserEndpoint",n(542)).service("UserSettingsEndpoint",n(543)).service("FormEndpoint",n(544)).service("FormAttributeEndpoint",n(545)).service("FormRoleEndpoint",n(546)).service("FormStageEndpoint",n(547)).service("FormStatsEndpoint",n(548)).service("FormContactEndpoint",n(549)).service("TagEndpoint",n(550)).service("RoleEndpoint",n(551)).service("WebhookEndpoint",n(552)).service("PermissionEndpoint",n(553)).service("DataProviderEndpoint",n(554)).service("MediaEndpoint",n(555)).service("MessageEndpoint",n(556)).service("PostEndpoint",n(557)).service("PostLockEndpoint",n(558)).service("CollectionEndpoint",n(559)).service("SavedSearchEndpoint",n(560)).service("DataImportEndpoint",n(561)).service("ContactEndpoint",n(562)).service("NotificationEndpoint",n(563)).service("TermsOfServiceEndpoint",n(564)).service("ExportJobEndpoint",n(565)).service("CountryCodeEndpoint",n(566)).service("HxlTagEndpoint",n(567)).service("HxlLicenseEndpoint",n(568)).service("HxlMetadataEndpoint",n(569)).service("HxlOrganisationsEndpoint",n(570)).service("ViewHelper",n(571)).service("Features",n(572)).service("Util",n(573)).service("Maps",n(574)).service("Geocoding",n(575)).service("Languages",n(576)).service("IconManager",n(577)).service("FontAwesomeIcons",n(578)).service("MainsheetService",n(579)).service("ModalService",n(580)).service("TranslationService",n(581)).controller("navigation",n(582)).controller("PageMetadata",n(583)).controller("intercom",n(584)).service("LoadingProgress",n(585)).service("DataExport",n(586)).service("HxlExport",n(587)).service("DataImport",n(588)).service("VerifierService",n(589)).directive("publishSelector",n(590)).directive("listingToolbar",n(592)).directive("iconPicker",n(594)).directive("colorPicker",n(596)).directive("firstTimeConfig",n(598)).directive("ushMainsheetContainer",n(600)).directive("ushModalContainer",n(602)).directive("modalBody",n(604)).directive("layoutClass",n(605)).directive("embedOnly",n(606)).directive("ushLogo",n(607)).directive("filterSearchbar",n(609)).directive("filterRole",n(611)).directive("overflowToggle",n(613)).directive("focus",n(614)).directive("modeBar",n(615)).directive("fileUpload",n(618)).directive("roleSelector",n(620)).directive("addCategory",n(622)).directive("categorySelector",n(624)).directive("languageSwitch",n(626)).directive("loadingDots",n(628)).constant("EVENT",{ACTIONS:{EDIT:"edit",DELETE:"delete"}}).factory("loading",n(630)).config(n(631)).config(n(632)).run(n(634)).config(n(636)).config(n(637)).run(n(647)).run(n(648)).run(["$templateCache",function(e){e.put("common/directives/mode-bar/ushahidi-logo.html",n(649))}]).factory("Verifier",function(){return n(650)}),n(670),n(671),n(672),n(674),n(675)},function(e,t,n){"use strict";e.exports=["$rootScope","$http","$q","Util","CONST","Session","RoleEndpoint","UserEndpoint","PostLockEndpoint","_","ModalService",function(a,o,r,l,c,d,u,e,t,p,n){var g=!1;function s(e){m(),e||a.$broadcast("event:authentication:logout:succeeded")}function m(){d.clearSessionData(),e.invalidateCache(),g=!1}return d.getSessionDataEntry("accessToken")&&"password"===d.getSessionDataEntry("grantType")&&d.getSessionDataEntry("userId")&&(d.getSessionDataEntry("accessTokenExpires")<=Math.floor(Date.now()/1e3)?m():g=!0),{login:function(e,t){function n(){i.reject(),m(),a.$broadcast("event:authentication:login:failed")}var s={username:e,password:t,grant_type:"password",client_id:c.OAUTH_CLIENT_ID,client_secret:c.OAUTH_CLIENT_SECRET,scope:c.CLAIMED_USER_SCOPES.join(" ")},i=r.defer();return o.post(l.url("/oauth/token"),s).then(function(e){var t=e.data.access_token;d.setSessionDataEntry("accessToken",t),e.data.expires_in?d.setSessionDataEntry("accessTokenExpires",Math.floor(Date.now()/1e3)+e.data.expires_in):e.data.expires&&d.setSessionDataEntry("accessTokenExpires",e.data.expires),d.setSessionDataEntry("grantType","password"),o.get(l.apiUrl("/users/me")).then(function(t){u.query({name:t.data.role}).$promise.then(function(e){return t.data.permissions=p.isEmpty(e)?[]:e[0].permissions,t}).catch(function(e){return t.data.permissions=[],t}).finally(function(){var e;e=t.data,d.setSessionDataEntries({userId:e.id,realname:e.realname,email:e.email,role:e.role,permissions:e.permissions,gravatar:e.gravatar,language:e.language}),g=!0,a.$broadcast("event:authentication:login:succeeded"),i.resolve()})},n)},n),i.promise},logout:function(e){a.hasPermission("Manage Posts")?t.unlock().$promise.finally(function(){s(e)}):s(e)},getLoginStatus:function(){return g},openLogin:function(){n.openTemplate("<login></login>","nav.login",!1,!1,!1,!1)}}}]},function(e,t,n){"use strict";e.exports=["$rootScope","$http","$q","Util","$location","ModalService",function(a,o,r,l,e,t){return{register:function(e,t,n){var s={realname:e,email:t,password:n},i=r.defer();return o.post(l.apiUrl("/register"),s).then(function(e){a.$broadcast("event:registration:register:succeeded"),i.resolve(e)},function(e){i.reject(e),a.$broadcast("event:registration:register:failed")}),i.promise},openRegister:function(){t.openTemplate("<register></register>","nav.register",!1,!1,!0,!1)}}}]},function(e,t,n){"use strict";var s,i=n(185),a=(s=i)&&s.__esModule?s:{default:s};e.exports=["localStorageService",function(n){this.clearedSessionData={userId:void 0,realname:void 0,email:void 0,accessToken:void 0,accessTokenExpires:void 0,grantType:void 0,role:void 0,permissions:void 0,gravatar:void 0,language:void 0},this.sessionData=angular.copy(this.clearedSessionData);var t,s=this;return t={},(0,a.default)(s.sessionData).forEach(function(e){t[e]=n.get(e)}),s.sessionData=t,{setSessionDataEntry:function(e,t){s.sessionData[e]=t,n.set(e,t)},setSessionDataEntries:function(t){(0,a.default)(t).forEach(function(e){n.set(e,t[e])});var e=angular.extend({},s.sessionData,t);s.sessionData=e},getSessionDataEntry:function(e){return s.sessionData[e]},getSessionData:function(){return s.sessionData},clearSessionData:function(){(0,a.default)(s.sessionData).forEach(function(e){n.remove(e)}),s.sessionData=angular.copy(s.clearedSessionData)}}}]},,,,,,,function(e,t,n){"use strict";e.exports=["$http","Util","ModalService",function(s,i,t){return{reset:function(e){var t={email:e};return s.post(i.apiUrl("/passwordreset"),t)},resetConfirm:function(e,t){var n={token:e,password:t};return s.post(i.apiUrl("/passwordreset/confirm"),n)},openReset:function(){t.openTemplate("<password-reset></password-reset>","nav.forgotyourpassword",!1,!1,!0,!1)},openResetConfirm:function(e){t.openTemplate("<password-reset-confirm></password-reset-confirm>","nav.resetpassword",!1,e,!0,!1)}}}]},function(e,t,n){"use strict";e.exports=["$http","Util","ModalService","Session","TermsOfServiceEndpoint","CONST","$rootScope","$q","Notify","moment",function(e,t,n,s,i,a,o,r,l,c){return{getTosEntry:function(){return a.TOS_RELEASE_DATE?i.get().$promise.then(function(e){return function(e){var t=r.defer();e.results.length&&c(e.results[0].agreement_date).isAfter(a.TOS_RELEASE_DATE)?t.resolve():l.confirmTos().then(function(){t.resolve()},function(){t.reject()});return t.promise}(e)}):r.resolve(!0)}}}]},function(e,t,n){"use strict";e.exports=["ConfigEndpoint","Notify",function(e,t){return{demoCheck:function(){e.get({id:"site"}).$promise.then(function(e){"demo_1"===e.tier&&t.demo()})}}}]},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{},controller:i,template:n(500)}}function i(n,s,e,t,i,a){function o(){n.failed=!0,n.processing=!1,n.email="",n.password=""}function r(){n.failed=!1,n.processing=!1,n.$parent.closeModal()}n.email="",n.password="",n.failed=!1,n.processing=!1,n.loginSubmit=function(e,t){n.processing=!0,s.login(e,t).then(r,o)},n.cancel=function(){o(),n.$parent.closeModal()},n.forgotPassword=function(){e.openReset()},n.showCancel=!1,function(){s.getLoginStatus()&&n.$parent.closeModal();i.get({id:"site"},function(e){n.showCancel=!e.private})}()}(e.exports=s).$inject=[],i.$inject=["$scope","Authentication","PasswordReset","$location","ConfigEndpoint","ModalService"]},function(e,t){e.exports='<form ng-submit="loginSubmit(email, password)" name="loginForm">\n <div class="modal-body">\n <div class="alert error login-failed" role="alert" ng-show="failed">\n <p translate>notify.login.failed</p>\n </div>\n\n <div class="form-field">\n <label for="email" translate>user.email</label>\n <input type="text" id="email" ng-model="email" ng-disabled="processing" placeholder="[email protected]" required>\n </div>\n\n <div class="form-field">\n <label for="password" translate>user.password</label>\n <input id="password" type="password" ng-model="password" ng-disabled="processing" required>\n <p><a ng-click="forgotPassword()" translate>nav.forgotyourpassword</a></p>\n </div>\n </div>\n <div class="modal-actions">\n <div class="form-field">\n <button type="button" class="button-link" ng-click="cancel()" ng-show="showCancel" translate="app.cancel">Cancel</button>\n <button type="submit" class="button-alpha" ng-disabled="loginForm.$invalid || processing" translate="nav.login">Login</button>\n </div>\n </div>\n</form>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{},controller:i,template:n(502)}}function i(n,e,t,s,i){function a(){n.failed=!1,n.processing=!1,i.success("notify.register.success"),t.openLogin()}function o(e){n.failed=!0,n.processing=!1,angular.forEach(e.data.errors,function(e){if(e.source&&e.source.pointer){var t=e.source.pointer.replace("/","");n.form[t]&&(n.form[t].$setValidity(e.title,!1),n.form[t].$validators[e.title]=function(){return!0})}}),i.apiErrors(e)}n.failed=!1,n.processing=!1,n.realname="",n.email="",n.password="",n.registerSubmit=function(){n.processing=!0,s.register(n.realname,n.email,n.password).then(a,o)},n.cancel=function(){n.$parent.closeModal()},t.getLoginStatus()&&n.$parent.closeModal()}(e.exports=s).$inject=[],i.$inject=["$scope","$translate","Authentication","Registration","Notify"]},function(e,t,n){e.exports='<form name="form" ng-submit="registerSubmit()">\n <div class="modal-body">\n <div class="alert error register-failed" role="alert" ng-show="failed">\n <p translate>notify.register.failed</p>\n </div>\n <div class="form-field" ng-class="{ \'error\': form.full_name.$invalid && form.full_name.$dirty, \'success\': form.full_name.$valid }">\n <label class="input-label"\n for="full_name" translate>user.full_name</label>\n <input id="full_name" name="full_name" type="text"\n ng-disabled="state.processing"\n placeholder="{{ \'user_create.full_name\'|translate }}"\n ng-maxlength="150"\n ng-model="realname"\n required>\n <div ng-repeat="(error, value) in form.full_name.$error"\n ng-show="form.full_name.$dirty"\n class="alert error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'user.valid.full_name.\' + error}}" translate-default="{{error}}"></p>\n </div>\n </div>\n <div class="form-field" ng-class="{ \'success\': !form.email.$invalid && form.email.$dirty, \'error\' : form.email.$invalid && form.email.$dirty}">\n <label for="email" class="input-label" translate>user.email</label>\n <input type="email" id="email" name="email"\n ng-model="email"\n ng-disabled="processing"\n ng-maxlength="150"\n required>\n <div ng-repeat="(error, value) in form.email.$error"\n ng-show="form.email.$dirty"\n class="alert error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'user.valid.email.\' + error}}" translate-default="{{error}}"></p>\n </div>\n </div>\n <div class="form-field" ng-class="{ \'success\': !form.password.$invalid && form.password.$dirty, \'error\' : form.password.$invalid && form.password.$dirty}">\n <label class="input-label" for="password" translate>user.password</label>\n <input id="password" type="password" name="password"\n ng-minlength="7"\n ng-maxlength="72"\n ng-model="password"\n ng-disabled="processing"\n required>\n <div ng-repeat="(error, value) in form.password.$error"\n ng-show="form.password.$dirty"\n class="alert error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'user.valid.password.\' + error}}" translate-default="{{error}}"></p>\n </div>\n\n </div>\n </div>\n\n <div class="modal-actions">\n <div class="form-field">\n <button type="button" class="button-link" ng-click="cancel()" translate="app.cancel">Cancel</button>\n <button type="submit" class="button-alpha" ng-disabled="form.$invalid || processing" translate="nav.register">Sign up</button>\n </div>\n </div>\n</form>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:!0,controller:i,template:n(504)}}function i(e,t,n){function s(){e.processing=!1,t.openResetConfirm()}e.processing=!1,e.email="",e.submit=function(){e.processing=!0,t.reset(e.email).finally(s)},e.cancel=function(){e.$parent.closeModal()},n.getLoginStatus()&&e.$parent.closeModal(),e.processing=!1}(e.exports=s).$inject=[],i.$inject=["$scope","PasswordReset","Authentication"]},function(e,t){e.exports='<div class="modal-body">\n <form class="panel-body" name="form" ng-submit="submit()">\n <p translate>user.passwordreset_instructions</p>\n <div class="form-field">\n <label for="email"\n class="input-label"\n translate>\n user.email\n </label>\n <input type="text" id="email" name="email"\n ng-model="email"\n ng-disabled="processing"\n required>\n </div>\n <div class="form-field">\n <button type="button" class="button-link" ng-click="cancel()" translate="app.cancel">Cancel</button>\n <button type="submit" class="button-primary"\n ng-disabled="form.$invalid || processing">\n <div class="loading" ng-show="processing"><div class="line"></div><div class="line"></div><div class="line"></div></div>\n <span translate>nav.resetmypassword</span>\n </button>\n </div>\n </form>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:!0,controller:i,template:n(506)}}function i(t,e,n,s,i){function a(){t.processing=!1,i.notify("notify.passwordreset.success"),s.openLogin()}function o(e){t.failed=!0,t.processing=!1,i.apiErrors(e)}t.failed=!1,t.processing=!1,t.token=t.token||"",t.hasToken=!1,t.password="",t.submit=function(){t.processing=!0,n.resetConfirm(t.token,t.password).then(a,o)},t.cancel=function(){t.$parent.closeModal()},function(){s.getLoginStatus()&&t.$parent.closeModal();t.hasToken=!!t.token}()}(e.exports=s).$inject=[],i.$inject=["$scope","$translate","PasswordReset","Authentication","Notify"]},function(e,t,n){e.exports='<div class="modal-body">\n <form class="panel-body" name="form" ng-submit="submit()">\n <div class="alert error register-failed" ng-show="failed">\n <p translate>notify.passwordreset.failed</p>\n </div>\n <div class="form-field" ng-show="!hasToken">\n <p translate>user.passwordreset_confirm_instructions</p>\n <label for="token"\n class="input-label"\n translate>\n user.token\n </label>\n <input type="text" id="token" name="token"\n ng-model="token"\n ng-disabled="processing"\n required>\n </div>\n <div class="form-field" ng-class="{ \'success\': !form.password.$invalid && form.password.$dirty, \'error\' : form.password.$invalid && form.password.$dirty}" >\n <label class="input-label" for="password" translate>user.new_password</label>\n <input id="password" type="password" name="password"\n ng-minlength="7"\n ng-maxlength="72"\n ng-model="password"\n ng-disabled="processing"\n required>\n <div ng-repeat="(error, value) in form.password.$error"\n ng-show="form.password.$dirty"\n class="alert error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'user.valid.password.\' + error}}" translate-default="{{error}}"></p>\n </div>\n </div>\n <div class="form-field">\n <button type="button" class="button-link" ng-click="cancel()" translate="app.cancel">Cancel</button>\n <button type="submit" class="button-primary"\n ng-disabled="form.$invalid || processing">\n <div class="loading" ng-show="processing"><div class="line"></div><div class="line"></div><div class="line"></div></div>\n <span translate>nav.resetpassword</span>\n </button>\n </div>\n </form>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{},controller:i,template:n(508)}}function i(t,e,n,s,i,a,o){t.terms={accept:!1},t.tosSubmit=function(){t.terms.accept&&i.save({tos_version_date:o.TOS_RELEASE_DATE}).$promise.then(function(e){e.agreement_date&&t.$parent.confirm()})}}(e.exports=s).$inject=[],i.$inject=["$scope","Authentication","TermsOfService","ModalService","TermsOfServiceEndpoint","Session","CONST"]},function(e,t){e.exports='<div class="modal-body">\n <form class="panel-body" name="form" ng-submit="tosSubmit()">\n <h2 translate="terms_of_service.title">Ushahidi Terms of Service</h2>\n <p translate="terms_of_service.terms_of_service">We have updated our <a href="https://www.ushahidi.com/terms-of-service" target="_blank">Terms and Conditions</a> and <a href="https://www.ushahidi.com/privacy-policy" target="_blank">Privacy Policy</a>. Please review these documents carefully and accept the terms in order to continue to use Ushahidi\'s services.</p>\n <div class="form-field radio">\n <label>\n <input type="checkbox" ng-model="terms.accept" ng-value="true" required>\n <div translate="terms_of_service.agree">I agree to Ushahidi\'s Terms of Service.</div>\n </label>\n </div>\n <div class="modal-actions">\n <div class="form-field">\n <button type="submit" class="button-alpha" ng-disabled="form.$invalid" translate="terms_of_service.accept_and_continue">Accept and Continue</button>\n </div>\n </div>\n </form>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{},controller:i,template:n(510)}}function i(i,a,e,t,o,r){i.limitReached=!1,i.expired=!1,i.days_remaining=30,i.loggedin=a.loggedin,i.upgrade=function(){e.path("settings/plans")},i.close=function(){a.toggleModalVisible(!1,!0),a.$emit("demoslider:close")},t.get({id:"site"}).$promise.then(function(e){i.site_name=e.name?e.name:"Ushahidi";var t=r(e.expiration_date),n=e.extension_date?r(e.extension_date):null,s=r();i.expired=t<s,i.expired&&(i.expired=n<s),a.$broadcast("demo:limitAvailability",i.expired,i.limitReached),i.expired||(i.days_remaining=n?n.diff(s,"days"):t.diff(s,"days"),o.stats().$promise.then(function(e){e.totals[0]&&(i.limitReached=25<=e.totals[0].values[0].total,a.$broadcast("demo:limitAvailability",i.expired,i.limitReached))}))})}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope","$location","ConfigEndpoint","PostEndpoint","moment"]},function(e,t){e.exports='<div ng-if="loggedin">\n <p ng-if="!expired && !limitReached" translate-values="{days: days_remaining}" translate="demo_warnings.user.not_expired">\n You have X days left in your free trial. Upgrade now for unlimited posts and full access to Ushahidi.\n </p>\n <p ng-if="limitReached" translate="demo_warnings.user.limit_reached">\n Nice work! You have more than 25 posts. Upgrade now to see the rest of your posts or reach out to our team about a full-service enterprise partnership for your project.\n </p>\n <p ng-if="expired" translate="demo_warnings.user.expired">\n Your 30 day trial is over. Upgrade now to make the most of Ushahidi.\n </p>\n <div class="button-group">\n <button class="button" ui-sref="settings.plan" translate="message.button.upgrade">\n Upgrade now\n </button>\n <button ng-click="close()" class="right" translate="demo_warnings.close">Close</button>\n </div>\n</div>\n\n<div ng-if="!loggedin" >\n <p ng-if="!expired && days_remaining > 0" translate-values="{days: days_remaining, site_name: site_name}" translate="demo_warnings.visitor.not_expired">\n Deployment X is using a free trial of Ushahidi. You will only see the first 25 posts for the next X days.\n </p>\n <p ng-if="expired || days_remaining <= 0" translate-values="{site_name: site_name}" translate="demo_warnings.visitor.expired">\n Deployment X is using a free trial of Ushahidi. You will only see the first 25 posts.\n </p>\n <button ng-click="close()" translate="demo_warnings.close">Close</button>\n</div>\n \n'},function(e,t,n){"use strict";function s(e,t){e.factory("authInterceptor",i),t.interceptors.push("authInterceptor")}function i(i,o,r,l,c,a){var d=null;return{request:function(e){var t=r.defer();if(e.ignorable=function(e){var t=!1;a.has(e,"params")&&e.params.ignore403&&(delete e.params.ignore403,t=!0);var n=0,s=["/oauth/token(/|$)","/users(/|$)([0-9]+|$)","/roles(/|$)"];for(;!1===t&&n<s.length;)t=!!e.url.match(s[n]),n++;return t}(e),e.headers["Accept-Language"]=c.getSessionDataEntry("language")?c.getSessionDataEntry("language"):"en-US",-1===e.url.indexOf(l.API_URL))return t.resolve(e),t.promise;var n=c.getSessionDataEntry("accessToken"),s=c.getSessionDataEntry("accessTokenExpires"),i=Math.floor(Date.now()/1e3);null!=n&&i<s&&(e.headers.Authorization="Bearer "+n);return t.resolve(e),t.promise},responseError:function(n){var s=r.defer();401===n.status||400===n.status?o.invoke(["Authentication","$http",function(e,t){if(e.getLoginStatus())i.$broadcast("event:unauthorized"),s.reject(n);else{if(n.config.ignorable)return s.reject(n),s.promise;(function(t){var n=r.defer();d?d.then(function(e){t.headers.Authorization=e.headers.Authorization,n.resolve(t)},n.reject):((d=function(n){var s=r.defer(),i={grant_type:"client_credentials",client_id:l.OAUTH_CLIENT_ID,client_secret:l.OAUTH_CLIENT_SECRET,scope:l.CLAIMED_ANONYMOUS_SCOPES.join(" ")};function a(e){var t=e.data.access_token;c.setSessionDataEntry("accessToken",t),e.data.expires_in?c.setSessionDataEntry("accessTokenExpires",Math.floor(Date.now()/1e3)+e.data.expires_in):e.data.expires&&c.setSessionDataEntry("accessTokenExpires",e.data.expires),c.setSessionDataEntry("grantType","client_credentials"),n.headers.Authorization="Bearer "+t,s.resolve(n)}return o.invoke(["$http","Util",function(e,t){e.post(t.url("/oauth/token"),i).then(a,s.reject)}]),s.promise}(t)).then(n.resolve,n.reject),d.finally(function(){d=null}));return n.promise})(n.config).then(function(e){s.resolve(t(e))},s.reject)}}]):(403===n.status&&(n.config.ignorable||i.$broadcast("event:forbidden")),s.reject(n));return s.promise}}}(e.exports=s).$inject=["$provide","$httpProvider"],i.$inject=["$rootScope","$injector","$q","CONST","Session","_"]},function(e,t,n){"use strict";function s(n,s,t,i,a,o,r,l,c,d,u,p,g){var m=null;function e(e,t){r.getTosEntry().then(function(){n.currentUser=i.getSessionData(),n.loggedin=!0,p.demoCheck(),g.debugModeCheck(),"admin"===n.currentUser.email&&n.isAdmin()&&l.adminUserSetupModal(),(n.hasPermission("Bulk Data Import and Export")||n.hasPermission("Bulk Data Import"))&&d.loadExportJob(),(n.hasPermission("Bulk Data Import and Export")||n.hasPermission("Bulk Data Import"))&&u.loadImportJob(),c.resetDefaults(),e&&s.url(e),t||o.reload()})}function h(){n.currentUser=null,n.loggedin=!1,p.demoCheck(),c.resetDefaults().then(function(){o.go(o.$current.name?o.$current:"map",null,{reload:!0})})}n.currentUser=null,n.loggedin=!1,n.hasManagePermission=function(){return!!n.isAdmin()||0<((n.currentUser||{}).permissions||{}).length},n.hasManageSettingsPermission=function(){return!!n.isAdmin()||0<a.intersection((n.currentUser||{}).permissions,["Manage Users","Manage Settings","Bulk Data Import and Export","Bulk Data Import"]).length},n.hasPermission=function(e){return!!n.isAdmin()||a.contains((n.currentUser||{}).permissions,e)},n.isAdmin=function(){return"admin"===(n.currentUser||{}).role},n.$on("event:authentication:login:succeeded",function(){e(m)}),n.$on("event:authentication:logout:succeeded",function(){h()}),n.$on("event:unauthorized",function(){var e=s.url();"/login"!==e&&(m=e),t.logout(!0),h(),t.openLogin()}),n.$on("event:forbidden",function(){if(t.getLoginStatus())s.url("/forbidden");else{var e=s.url();"/login"!==e&&(m=e,s.url("/forbidden")),t.openLogin()}}),t.getLoginStatus()&&e(!1,!0)}(e.exports=s).$inject=["$rootScope","$location","Authentication","Session","_","$state","TermsOfService","Notify","PostFilters","DataExport","DataImport","DemoDeploymentService","VerifierService"]},function(e,t,a){"use strict";var n,s,i=a(187),o=(n=i)&&n.__esModule?n:{default:n};e.exports=l;var r=a(0);function l(n,c,i,d,u,p,t){return{notify:function(e,t){function n(e){u.openTemplate("<p>"+e+"</p>")}d(e,t).then(n,n)},notifyAction:function(e,t,n,s,i,a){var o,r,l;r="",(l=g()).cancel=function(){u.close()},a&&(l.actionCallback=a.callback,r='<button class="'+a.actionClass+'" ng-click=$parent.actionCallback("'+a.callbackArg+'") translate='+a.text+"></button>");function c(e){e+=o,u.openTemplate(e,s,i,l,!1,!1,!1,n)}o='<div class="buttons-export">'+r+'<button class="button" ng-click="$parent.cancel()" translate="notify.export.confirmation"></button></div>',d(e,t).then(c,c)},notifyProgress:function(e,t){function n(e){u.openTemplate(e,null,null,null,!1,!0,!0,!0)}d(e,t).then(n,n)},error:function(e,t){function n(e){u.openTemplate("<p>"+e+"</p>","warning","error",null,!1)}d(e,t).then(n,n)},errors:function(e,t){var n=g();d(e,t).then(function(e){n.errors=e,u.openTemplate(a(139),"warning","error",n,!1)})},errorsPretranslated:function(e){var t=g();t.errors=e,u.openTemplate(a(139),"warning","error",t,!1)},apiErrors:function(e){var t=g();if(t.errors=n.pluck(e.data&&e.data.errors,"message"),!t.errors)return;u.openTemplate(a(139),"warning","error",t,!1)},success:function(e,t){function n(e){u.openTemplate("<p>"+e+"</p>","thumb-up","confirmation")}d(e,t).then(n,n)},confirm:function(e,t){var n=c.defer(),s=g();function i(e){s.confirmText=e,u.openTemplate('<p>{{ confirmText }}</p> <button class="button-flat" ng-click="$parent.cancel()" translate="message.button.cancel">Cancel</button> <button class="button-beta button-flat" ng-click="$parent.confirm()" translate="message.button.default">OK</button>',!1,!1,s,!1,!1)}return s.cancel=function(){n.reject(),u.close()},s.confirm=function(){n.resolve(),u.close()},d(e,t).then(i,i),n.promise},confirmModal:function(e,t,s,i,a,o){var n=c.defer(),r=g();function l(e){r.confirmText=e;var t="";s&&!i?t="<p translate>"+s+"</p>":s&&i&&(t="<p translate="+s+' translate-values="'+i+'"></p>');var n='<div class="form-field">\n '+t+'\n <p><i translate>notify.default.proceed_warning</i></p>\n <button class="button" ng-click="$parent.cancel()" translate>'+(o||"message.button.cancel")+'</button>\n <button class="button-alpha button-flat" ng-click="$parent.confirm()" translate>'+(a||"message.button.default")+"</button>\n </div>";p.openTemplate(n,e,!1,r,!1,!1)}return r.cancel=function(){n.reject(),p.close()},r.confirm=function(){n.resolve(),p.close()},d(e,t).then(l,l),n.promise},confirmDelete:function(e,t,n){var s=c.defer(),i=g();"object"===(void 0===t?"undefined":(0,o.default)(t))&&(n=t,t=!1);function a(e){i.confirmText=e,i.confirmWarningText=t||"notify.default.proceed_warning",p.getState()?(i.cancel=function(){s.reject(),u.close()},i.confirm=function(){s.resolve(),u.close()},u.openTemplate('<p>{{ confirmText }}</p><p><i translate="{{confirmWarningText}}"></i></p> <button class="button-flat" ng-click="$parent.cancel()" translate="message.button.cancel">Cancel</button> <button class="button-destructive button-flat" ng-click="$parent.confirm()"> <svg class="iconic"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+r+'#trash"></use></svg> <span translate="app.delete">Delete</span> </button>',!1,!1,i,!1,!1)):(i.cancel=function(){s.reject(),p.close()},i.confirm=function(){s.resolve(),p.close()},p.openTemplate('<div class="form-field"><p><i translate="{{confirmWarningText}}"></i></p> <button class="button-beta button-flat" ng-click="cancel()">Cancel</button> <button class="button-destructive button-flat" ng-click="confirm()"> <svg class="iconic"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+r+'#trash"></use></svg> <span translate="app.delete">Delete</span> </button></div>',e,!1,i,!1,!1))}return d(e,n).then(a,a),s.promise},limit:function(e,t){var n=g();function s(e){n.message=e,u.openTemplate(a(533),"warning","error",n,!0,!1)}d(e,t).then(s,s)},confirmTos:function(){var e=c.defer(),t=g();return t.confirm=function(){e.resolve(),p.close()},p.openTemplate("<terms-of-service></terms-of-service>"," ",!1,t,!1,!1),e.promise},adminUserSetupModal:function(){p.openTemplate("<admin-user-setup><admin-user-setup/>","Change your email and password",!1,!1,!1,!1)},infoModal:function(e,t){var n=g();n.cancel=function(){p.close()},p.openTemplate('<div class="form-field"> <button class="button-alpha" ng-click="$parent.cancel()" translate="notify.generic.okay">Ok</button></div>',e,!1,n,!1,!1)},confirmLeave:function(e,t){var n=c.defer(),s=g();return s.confirm=function(){n.resolve(),p.close()},s.save=function(){i.$broadcast("event:edit:post:data:mode:save"),i.$on("event:edit:post:data:mode:saveError",function(){n.reject(),p.close()}),i.$on("event:edit:post:data:mode:saveSuccess",function(){n.resolve(),p.close()})},p.openTemplate('<div class="form-field"><p><i translate>notify.post.leave_confirm_message</i></p> <button class="button button-flat" ng-click="confirm()" translate>notify.post.leave_confirm</button> <button class="button-alpha button-flat" ng-click="save()" translate>notify.generic.save</button></div>',e,!1,s,!1,!0),n.promise},demo:function(){var e=g();t.openTemplate("<demo-deployment></demo-deployment>","star",!1,e,!1)},notifyPermanent:function(e,t){function n(e){u.openTemplate("<p>"+e+"</p>",null,null,null,null)}d(e,t).then(n,n)}};function g(){return s&&s.$destroy(),s=i.$new()}}l.$inject=["_","$q","$rootScope","$translate","SliderService","ModalService","DemoSliderService"]},,,,,,,,,,,,,,,,,,,,function(e,t){e.exports='<p>{{ message }}</p>\n<div class="form-field">\n <a class="button button-beta button-flat" ng-click="close()" href="/settings/plan" translate>limit.upgrade</a>\n <button class="button-flat message-trigger" ng-click="close()" translate="message.button.dismiss">\n Dismiss\n </button>\n</div>\n'},function(e,t,n){"use strict";function s(c,e,t){var d=e.defer(),s=e.defer();return{open:n,openTemplate:n,close:function(){s.promise.then(function(){c.$emit("slider:close")})},onOpen:function(e,t){var n=c.$on("slider:open",e);t&&t.$on("$destroy",n);d.resolve()},onClose:function(e,t){var n=c.$on("slider:close",e);t&&t.$on("$destroy",n);s.resolve()}};function n(e,t,n,s,i,a,o,r,l){d.promise.then(function(){c.$emit("slider:open",e,t,n,s,i,a,o,r,l)})}}(e.exports=s).$inject=["$rootScope","$q","$templateRequest"]},function(e,t,n){"use strict";function s(c,e,t){var d=e.defer(),s=e.defer();return{open:n,openTemplate:n,close:function(){c.toggleModalVisible(!1,!0),s.promise.then(function(){c.$emit("demoslider:close")})},onOpen:function(e,t){var n=c.$on("demoslider:open",e);t&&t.$on("$destroy",n);d.resolve()},onClose:function(e,t){var n=c.$on("demoslider:close",e);t&&t.$on("$destroy",n);s.resolve()}};function n(e,t,n,s,i,a,o,r,l){d.promise.then(function(){c.$emit("demoslider:open",e,t,n,s,i,a,o,r,l),c.toggleModalVisible(!0,!0)})}}(e.exports=s).$inject=["$rootScope","$q","$templateRequest"]},function(e,t,n){"use strict";function s(f,v,t,b){return{restrict:"E",template:n(537),scope:{insideModal:"@?",loading:"=?"},link:function(c,e){var d;c.classVisible=!1,c.icon=!1,c.iconClass={},c.showCloseButton=!0,c.closeOnNavigate=!1,c.closeButtonClicked=function(e){m()};var u=null,p=n(0),g=e.find("slider-content");function m(){c.classVisible=!1,h()}function h(){d&&d.$destroy(),u&&f.cancel(u),g.html("")}c.$on("$destroy",h),c.$on("$locationChangeStart",function(){c.closeOnNavigate&&m()}),t.onOpen(function(e,t,n,s,i,a,o,r,l){c.loading=!1,void 0!==c.insideModal===b.getState()&&(h(),(d=i?i.$new():c.$new()).close=m,g.html(t),v(g)(d),c.icon=n?p+"#"+n:n,c.iconClass={},s&&(c.iconClass[s]=!0),c.showCloseButton=void 0===o||o,c.closeOnNavigate=void 0!==r&&r,a=void 0===a||a,c.classVisible=!0,a&&(u=f(m,5e3)),l&&(c.loading=!0))},c),t.onClose(m,c)}}}(e.exports=s).$inject=["$timeout","$compile","SliderService","ModalService"]},function(e,t){e.exports='\n<div\n class="message"\n ng-class="{\'active\': classVisible}"\n>\n\n <div class=\'progress-bar\' ng-if="loading"><span>Loading...</span></div><br>\n\n <div \n class="message-image"\n ng-if="icon"\n ng-class="iconClass"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{{ icon }}"></use>\n </svg>\n </div>\n\n <div\n class="message-body"\n >\n\t\t<slider-content></slider-content>\n\n <button class="button-flat message-trigger" ng-show="showCloseButton" ng-click="closeButtonClicked()" translate="message.button.dismiss">\n Dismiss\n </button>\n </div>\n</div>\n'},function(e,t,i){"use strict";function n(p,t,n,s){return{restrict:"E",template:i(539),scope:{loading:"=?"},link:function(o,e){var r;o.classVisible=!1,o.icon=!1,o.iconClass={},o.expired=!1,o.limitReached=!1,o.upgrading=!1,n.$on("demo:limitAvailability",function(e,t,n){o.expired=t,o.limitReached=n});var l=i(0),c=e.find("demo-slider-content");function d(){o.classVisible=!1,u()}function u(){r&&r.$destroy(),c.html("")}o.$on("$destroy",u),t.onOpen(function(e,t,n,s,i,a){o.loading=!1,u(),(r=i?i.$new():o.$new()).close=d,c.html(t),p(c)(r),o.icon=n?l+"#"+n:n,o.iconClass={},s&&(o.iconClass[s]=!0),o.classVisible=!0,a&&(o.loading=!0)},o),t.onClose(d,o),s.onEnter({},function(e,t){var n=e.targetState().$state();o.upgrading=!!n.includes["settings.plan"]})}}}(e.exports=n).$inject=["$compile","DemoSliderService","$rootScope","$transitions"]},function(e,t){e.exports='\n<div\n class="message demo"\n ng-class="{\'active\': classVisible && !upgrading}"\n>\n\n <div\n class="message-image"\n ng-if="icon"\n ng-class="iconClass"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{{ icon }}"></use>\n </svg>\n </div>\n\n <div\n class="message-body"\n >\n\n\t\t<demo-slider-content></demo-slider-content>\n </div>\n\n</div>\n'},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util",function(e,t,n){return e(n.apiUrl("/apikeys/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return n.transformResponse(e).results}},get:{method:"GET"},update:{method:"PUT"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util","_","CacheFactory","$rootScope","UserEndpoint","Authentication","Session","$q",function(e,t,n,s,i,a,o,r,l){var c;(c=s.get("configCache"))||(c=s.createCache("configCache",{storageMode:"memory"})),c.removeExpired();var d=e(t.apiUrl("/config/:id"),{id:"@id"},{get:{method:"GET",transformResponse:function(e){return t.transformResponse(e)},cache:c},update:{method:"PUT",transformResponse:function(e){return t.transformResponse(e)}}});return d.invalidateCache=function(){return c.removeAll()},d.getFresh=function(e){return c.remove(t.apiUrl("/config/"+e.id)),d.get(e)},d.saveCache=function(e){var t=e.id?d.update:d.save;return c.removeAll(),t(e)},d}]},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util","CacheFactory",function(e,t,n,s){var i;(i=s.get("userCache"))||(i=s.createCache("userCache")),i.removeExpired();var a=e(n.apiUrl("/users/:id"),{id:"@id"},{query:{method:"GET",isArray:!1,paramSerializer:"$httpParamSerializerJQLike",transformResponse:function(e){return angular.fromJson(e)},cache:i},get:{method:"GET",cache:i},update:{method:"PUT"},deleteEntity:{method:"DELETE"}});return a.getFresh=function(e){return i.remove(n.apiUrl("/users/"+e.id)),a.get(e)},a.invalidateCache=function(){return i.removeAll()},a.queryFresh=function(e){return i.removeAll(),a.query(e)},a.saveCache=function(e){var t=e.id?a.update:a.save;return i.removeAll(),t(e)},a.delete=function(e){return i.removeAll(),a.deleteEntity(e)},a}]},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util","CacheFactory",function(e,t,n,s){var i;(i=s.get("userSettingsCache"))||(i=s.createCache("userSettingsCache")),i.removeExpired();var a=e(n.apiUrl("/users/:id/settings/:keyId"),{id:"@user_id",keyId:"@id"},{query:{method:"GET",isArray:!1,paramSerializer:"$httpParamSerializerJQLike",transformResponse:function(e){return angular.fromJson(e)},cache:i},get:{method:"GET",cache:i},update:{method:"PUT"},deleteEntity:{method:"DELETE"}});return a.getFresh=function(e){return i.remove(n.apiUrl("/users/"+e.id+"/settings")),a.get(e)},a.invalidateCache=function(){return i.removeAll()},a.queryFresh=function(e){return i.removeAll(),a.query(e)},a.saveCache=function(e){var t=e.id?a.update:a.save;return i.removeAll(),t(e)},a.delete=function(e){return i.removeAll(),a.deleteEntity(e)},a}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;(s=n.get("formCache"))||(s=n.createCache("formCache")),s.removeExpired();var i=e(t.apiUrl("/forms/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,cache:s,transformResponse:function(e){return t.transformResponse(e).results}},get:{method:"GET",cache:s},update:{method:"PUT"},deleteEntity:{method:"DELETE"}});return i.getFresh=function(e){return s.remove(t.apiUrl("/forms/"+e.id)),i.get(e)},i.invalidateCache=function(){return s.removeAll()},i.queryFresh=function(){return s.removeAll(),i.query()},i.saveCache=function(e){var t=e.id?i.update:i.save;return s.removeAll(),t(e)},i.delete=function(e){return s.removeAll(),i.deleteEntity(e)},i}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;(s=n.get("attrCache"))||(s=n.createCache("attrCache")),s.removeExpired();var i=e(t.apiUrl("/forms/:formId/attributes/:id"),{formId:"@formId",id:"@id",order:"asc",orderby:"priority"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return t.transformResponse(e).results},cache:s},get:{method:"GET",cache:s},update:{method:"PUT"},deleteEntity:{method:"DELETE"}});return i.getFresh=function(e){return s.remove(t.apiUrl("/forms/"+e.formId+"/attributes/"+e.id)),i.get(e)},i.queryFresh=function(e){return s.removeAll(),i.query(e)},i.saveCache=function(e){var t=e.id?i.update:i.save;return s.removeAll(),t(e)},i.invalidateCache=function(){return s.removeAll()},i.delete=function(e){return s.removeAll(),i.deleteEntity(e)},i}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;(s=n.get("formRoleCache"))||(s=n.createCache("formRoleCache")),s.removeExpired();var i=e(t.apiUrl("/forms/:formId/roles/"),{formId:"@formId",order:"asc",orderby:"role_id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return t.transformResponse(e).results},cache:s},get:{method:"GET",cache:s},update:{method:"PUT"}});return i.getFresh=function(e){return s.remove(t.apiUrl("/forms/"+e.formId+"/roles/")),i.get(e)},i.invalidateCache=function(){return s.removeAll()},i.queryFresh=function(e){return s.removeAll(),i.query(e)},i.saveCache=function(e){var t=i.update;return s.removeAll(),t(e)},i}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;(s=n.get("stageCache"))||(s=n.createCache("stageCache")),s.removeExpired();var i=e(t.apiUrl("/forms/:formId/stages/:id"),{formId:"@formId",id:"@id",order:"asc",orderby:"priority"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return t.transformResponse(e).results},cache:s},get:{method:"GET",cache:s},update:{method:"PUT"},deleteEntity:{method:"DELETE"}});return i.getFresh=function(e){return s.remove(t.apiUrl("/forms/"+e.formId+"/stages/"+e.id)),i.get(e)},i.invalidateCache=function(){return s.removeAll()},i.queryFresh=function(e){return s.removeAll(),i.query(e)},i.saveCache=function(e){var t=e.id?i.update:i.save;return s.removeAll(),t(e)},i.delete=function(e){return s.removeAll(),i.deleteEntity(e)},i}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/forms/:formId/stats/:extra"),{formId:"@formId"},{query:{method:"GET",isArray:!1,paramSerializer:"$httpParamSerializerJQLike",transformResponse:function(e){return angular.fromJson(e)}},get:{method:"GET"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;return(s=n.get("formContactCache"))||(s=n.createCache("formContactCache")),s.removeExpired(),e(t.apiUrl("/forms/:formId/contacts/"),{formId:"@formId"},{query:{method:"GET",isArray:!0,cache:s},get:{method:"GET",cache:s},update:{method:"PUT"}})}]},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util","CacheFactory",function(e,t,n,s){var i;(i=s.get("tagCache"))||(i=s.createCache("tagCache")),i.removeExpired();var a=e(n.apiUrl("/tags/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,cache:i,transformResponse:function(e){return n.transformResponse(e).results}},update:{method:"PUT"},get:{method:"GET",cache:i,params:{ignore403:"@ignore403"}},deleteEntity:{method:"DELETE"}});return a.getFresh=function(e){return i.remove(n.apiUrl("/tags/"+e.id)),a.get(e)},a.queryFresh=function(e){return i.removeAll(),a.query(e)},a.invalidateCache=function(){return i.removeAll()},a.saveCache=function(e){var t=e.id?a.update:a.save;return i.removeAll(),t(e)},a.delete=function(e){return i.removeAll(),a.deleteEntity(e)},t.$on("event:authentication:logout:succeeded",function(){a.queryFresh()}),t.$on("event:authentication:login:succeeded",function(){a.queryFresh()}),a}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;(s=n.get("roleCache"))||(s=n.createCache("roleCache")),s.removeExpired();var i=e(t.apiUrl("/roles/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return t.transformResponse(e).results}},get:{method:"GET",cache:s},update:{method:"PUT"},deleteEntity:{method:"DELETE"}});return i.getFresh=function(e){return s.remove(t.apiUrl("/roles/"+e.id)),i.get(e)},i.invalidateCache=function(){return s.removeAll()},i.queryFresh=function(){return s.removeAll(),i.query()},i.saveCache=function(e){var t=e.id?i.update:i.save;return s.removeAll(),t(e)},i.delete=function(e){return s.removeAll(),i.deleteEntity(e)},i}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;(s=n.get("webhookCache"))||(s=n.createCache("webhookCache")),s.removeExpired();var i=e(t.apiUrl("/webhooks/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return t.transformResponse(e).results}},get:{method:"GET",cache:s},update:{method:"PUT"},deleteEntity:{method:"DELETE"}});return i.getFresh=function(e){return s.remove(t.apiUrl("/webhooks/"+e.id)),i.get(e)},i.invalidateCache=function(){return s.removeAll()},i.queryFresh=function(){return s.removeAll(),i.query()},i.saveCache=function(e){var t=e.id?i.update:i.save;return s.removeAll(),t(e)},i.delete=function(e){return s.removeAll(),i.deleteEntity(e)},i}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;(s=n.get("permissionCache"))||(s=n.createCache("permissionCache")),s.removeExpired();var i=e(t.apiUrl("/permissions/:id"),{id:"@id"},{query:{method:"GET",transpermissionResponse:function(e){return t.transformResponse(e).results}},get:{method:"GET",cache:s}});return i.getFresh=function(e){return s.remove(t.apiUrl("/permissions/"+e.id)),i.get(e)},i.invalidateCache=function(){return s.removeAll()},i.queryFresh=function(){return s.removeAll(),i.query()},i}]},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util","CacheFactory",function(e,t,n,s){var i;(i=s.get("providerCache"))||(i=s.createCache("providerCache")),i.removeExpired();var a=e(n.apiUrl("/dataproviders/:id"),{id:"@id"},{query:{method:"GET",isArray:!1,transformResponse:function(e){return angular.fromJson(e)},cache:i},get:{method:"GET",cache:i},update:{method:"PUT"},options:{method:"OPTIONS"},deleteEntity:{method:"DELETE"}});return a.getFresh=function(e){return i.remove(n.apiUrl("/dataproviders/"+e.id)),a.get(e)},a.queryFresh=function(){return i.removeAll(),a.query()},a.invalidateCache=function(){return i.removeAll()},a.saveCache=function(e){var t=e.id?a.update:a.save;return i.removeAll(),t(e)},a.delete=function(e){return i.removeAll(),a.deleteEntity(e)},a}]},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util",function(e,t,n){return e(n.apiUrl("/media/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return n.transformResponse(e).results}},update:{method:"PUT"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/messages/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return angular.fromJson(e)}},get:{method:"GET"},allInThread:{method:"GET",params:{contact:"@contact",offset:"@offset",limit:"@limit",order:"asc",orderby:"created"},isArray:!1,transformResponse:function(e){return angular.fromJson(e)}},save:{method:"POST"}})}]},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util","_","$http",function(e,t,n,s,i){var a=e(n.apiUrl("/posts/:id/:extra"),{id:"@id"},{query:{method:"GET",isArray:!1,paramSerializer:"$httpParamSerializerJQLike",params:{order:"desc",orderby:"post_date"},transformResponse:[i.defaults.transformResponse[0],function(e){return e&&(e.results=e.results.map(o)),e}]},get:{method:"GET",transformResponse:[i.defaults.transformResponse[0],function(e){return e?o(e):e}]},save:{method:"POST",transformResponse:[i.defaults.transformResponse[0],function(e){return e?o(e):e}]},update:{method:"PUT",transformResponse:[i.defaults.transformResponse[0],function(e){return e?o(e):e}]},options:{method:"OPTIONS"},geojson:{method:"GET",url:n.apiUrl("/posts/:id/geojson"),isArray:!1,paramSerializer:"$httpParamSerializerJQLike",cancellable:!0},stats:{method:"GET",url:n.apiUrl("/posts/:id/stats"),isArray:!1,paramSerializer:"$httpParamSerializerJQLike"},collections:{method:"GET",url:n.apiUrl("/posts/:id/collections"),isArray:!0}});function o(e){return s.isArray(e.values)&&(e.values=s.object(e.values)),s.isArray(e.published_to)||(e.published_to=[]),e}return a.export=function(e){var t={params:e,paramSerializer:"$httpParamSerializerJQLike",responseType:"arraybuffer"};return i.get(n.apiUrl("/posts/export"),t)},t.$on("event:authentication:logout:succeeded",function(){a.query()}),a}]},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util","_","$http",function(e,t,n,s,i){return e(n.apiUrl("/posts/:post_id/lock/"),{post_id:"@post_id"},{getLock:{method:"PUT"},unlockByPost:{method:"DELETE"},unlock:{method:"DELETE"},options:{method:"OPTIONS"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util","_",function(e,t,n){return e(t.apiUrl("/collections/:collectionId?orderby=:orderby"),{collectionId:"@collectionId",orderby:"created",order:"DESC"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return angular.fromJson(e).results}},get:{method:"GET"},update:{method:"PUT"},editableByMe:{method:"GET",isArray:!0,params:{editableBy:"me"},transformResponse:function(e){return n.filter(angular.fromJson(e).results,function(e){return n.includes(e.allowed_privileges,"update")})}},addPost:{method:"POST",url:t.apiUrl("/collections/:collectionId/posts")},removePost:{method:"DELETE",url:t.apiUrl("/collections/:collectionId/posts/:id")},delete:{method:"DELETE"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/savedsearches/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return angular.fromJson(e).results}},get:{method:"GET"},update:{method:"PUT"},delete:{method:"DELETE"}})}]},function(e,t,n){"use strict";e.exports=["$q","$http","$resource","$rootScope","Util","CacheFactory",function(n,s,e,t,i,a){var o;(o=a.get("importJobCache"))||(o=a.createCache("importJobCache")),o.removeExpired();var r=e(i.apiUrl("/csv/:id/:action"),{id:"@id",action:"@action"},{update:{method:"PUT"},delete:{method:"DELETE"},import:{method:"POST"},get:{method:"GET",params:{ignore403:"@ignore403"}},query:{method:"GET",isArray:!0,transformResponse:function(e){return i.transformResponse(e).results}}});return r.getFresh=function(e){return o.remove(i.apiUrl("/csv/"+e.id)),r.get(e)},r.queryFresh=function(e){return o.removeAll(),r.query(e)},r.upload=function(e){var t=n.defer();return s.post(i.apiUrl("/csv"),e,{headers:{"Content-Type":void 0}}).then(function(e){t.resolve(i.transformResponse(e.data))},function(e){t.reject(e)}),t.promise},r}]},function(e,t,n){"use strict";e.exports=["$resource","Util","_","CacheFactory",function(e,t,n,s){var i;(i=s.get("userCache"))||(i=s.createCache("userCache")),i.removeExpired();var a=e(t.apiUrl("/contacts/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return angular.fromJson(e).results},cache:i},get:{method:"GET",params:{ignore403:"@ignore403"},cache:i},update:{method:"PUT"}});return a.getFresh=function(e){return i.remove(t.apiUrl("/contacts/"+e.id)),a.get(e)},a.invalidateCache=function(){return i.removeAll()},a.queryFresh=function(e){return i.removeAll(),a.query(e)},a.saveCache=function(e){var t=e.id?a.update:a.save;return i.removeAll(),t(e)},a.delete=function(e){return i.removeAll(),a.deleteEntity(e)},a}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/notifications/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,transformResponse:function(e){return angular.fromJson(e).results}},get:{method:"GET",params:{ignore403:"@ignore403"}},update:{method:"PUT"},delete:{method:"DELETE"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/tos/"),{},{get:{method:"GET"}})}]},function(e,t,n){"use strict";e.exports=["$resource","$rootScope","Util","CacheFactory",function(e,t,n,s){var i;(i=s.get("exportJobCache"))||(i=s.createCache("exportJobCache")),i.removeExpired();var a=e(n.apiUrl("/exports/jobs/:id"),{id:"@id"},{query:{method:"GET",isArray:!0,cache:i,transformResponse:function(e){return n.transformResponse(e).results}},update:{method:"PUT"},get:{method:"GET",cache:i,params:{ignore403:"@ignore403"}},deleteEntity:{method:"DELETE"}});return a.getFresh=function(e){return i.remove(n.apiUrl("/exports/jobs/"+e.id)),a.get(e)},a.queryFresh=function(e){return i.removeAll(),a.query(e)},a.invalidateCache=function(){return i.removeAll()},a.saveCache=function(e){var t=e.id?a.update:a.save;return i.removeAll(),t(e)},a.delete=function(e){return i.removeAll(),a.deleteEntity(e)},a}]},function(e,t,n){"use strict";e.exports=["$resource","Util","CacheFactory",function(e,t,n){var s;return(s=n.get("countryCodes"))||(s=n.createCache("countryCodes")),s.removeExpired(),e(t.apiUrl("/country-codes/"),{},{query:{method:"GET",isArray:!0,cache:s,transformResponse:function(e){return t.transformResponse(e).results}}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/hxl/tags"),{id:"@id"},{get:{method:"GET"},update:{method:"PUT"},deleteEntity:{method:"DELETE"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/hxl/licenses"),{id:"@id"},{get:{method:"GET"},update:{method:"PUT"},deleteEntity:{method:"DELETE"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/hxl/metadata"),{id:"@id"},{get:{method:"GET"},update:{method:"PUT"},deleteEntity:{method:"DELETE"}})}]},function(e,t,n){"use strict";e.exports=["$resource","Util",function(e,t){return e(t.apiUrl("/hxl/organisations"),{id:"@id"},{get:{method:"GET"},update:{method:"PUT"},deleteEntity:{method:"DELETE"}})}]},function(e,t,n){"use strict";e.exports=["$translate",function(e){var t=[{name:"map",display_name:e.instant("views.map")},{name:"data",display_name:e.instant("views.data")}];return{views:function(){return t}}}]},function(e,t,n){"use strict";e.exports=["ConfigEndpoint","Util","$q",function(e,t,n){var s={features:void 0,loadFeatures:function(){var t=n.defer();return s.features?t.resolve(s.features):e.getFresh({id:"features"}).$promise.then(function(e){s.features=e,t.resolve(s.features)}),t.promise},isFeatureEnabled:function(e){return s.features[e].enabled},isViewEnabled:function(e){return s.features.views[e]},getLimit:function(e){return s.features.limits[e]}};return t.bindAllFunctionsToSelf(s)}]},function(e,t,n){"use strict";e.exports=["_","CONST","$window",function(a,t,e){var n={currentUrl:function(){return e.location.href},url:function(e){return t.BACKEND_URL+e},apiUrl:function(e){return t.API_URL+e},deploymentUrl:function(e){var t=/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/\n]+)/g.exec(this.apiUrl(e));return t[0].replace("api.","")},transformResponse:function(e,t){return t=(t||[]).concat(["allowed_methods"]),a.omit(angular.fromJson(e),t)},simpluUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},bindAllFunctionsToSelf:function(e){var t=a.functions(e);return t.length&&a.bindAll.apply(a,[e].concat(t)),e},autoMap:function(e,t){var s=a.map(t,function(e){return e.label.toLowerCase()}),n=a.pluck(t,"key"),i=a.object(s,n);return a.map(e,function(e,t){var n=e.toLowerCase().trim();return a.contains(s,n)?i[e]:void 0})}};return n.bindAllFunctionsToSelf(n)}]},function(e,t,l){"use strict";function n(t,i,e,n){var s={baselayers:{satellite:{name:"Satellite",url:"https://api.tiles.mapbox.com/v4/{mapid}/{z}/{x}/{y}.png?access_token={apikey}",layerOptions:{apikey:n.MAPBOX_API_KEY,mapid:"mapbox.satellite",attribution:'© <a href="http://osm.org/copyright">OpenStreetMap</a>, © <a href="https://www.mapbox.com/about/maps/"">Mapbox</a> | <a href="https://www.mapbox.com/feedback/" target="_blank">Improve the underlying map</a>'}},streets:{name:"Streets",url:"https://api.tiles.mapbox.com/v4/{mapid}/{z}/{x}/{y}.png?access_token={apikey}",layerOptions:{apikey:n.MAPBOX_API_KEY,mapid:"mapbox.streets",attribution:'© <a href="http://osm.org/copyright">OpenStreetMap</a>, © <a href="https://www.mapbox.com/about/maps/"">Mapbox</a> | <a href="https://www.mapbox.com/feedback/" target="_blank">Improve the underlying map</a>'}},hOSM:{name:"Humanitarian",url:"//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",layerOptions:{attribution:'© <a href="http://osm.org/copyright">OpenStreetMap</a>, © <a href="http://hot.openstreetmap.org/">Humanitarian OpenStreetMap</a> | <a href="https://www.mapbox.com/feedback/" target="_blank">Improve the underlying map</a>'}}}};return{createMap:function(t){return a().then(function(e){var n=i.map(t,e);return n.attributionControl.setPrefix(!1),n.zoomControl.setPosition("bottomleft"),n.setMaxBounds([[-90,-360],[90,360]]),n.scrollWheelZoom.enable(),n.on("popupopen",function(e){var t=n.project(e.popup._latlng);t.y-=e.popup._container.clientHeight/2,n.panTo(n.unproject(t),{animate:!0})}),n})},getLeafletConfig:a,getBaseLayers:function(){return s.baselayers},pointToLayer:function(e,t){return i.marker(t,{icon:r(e.properties["marker-color"])})},getConfig:o,getLayer:function(e){var t=s.baselayers[e];return i.tileLayer(t.url,t.layerOptions)},pointIcon:r};function a(){return o().then(function(e){var t=s.baselayers[e.default_view.baselayer];return angular.extend({scrollWheelZoom:!1,center:[-1.2833,36.8167],zoom:8,layers:[i.tileLayer(s.baselayers.streets.url,s.baselayers.streets.layerOptions)]},{layers:[i.tileLayer(t.url,t.layerOptions)],center:[e.default_view.lat,e.default_view.lon],zoom:e.default_view.zoom,clustering:e.clustering})})}function o(e){return t[e?"getFresh":"get"]({id:"map"}).$promise.then(function(e){return"MapQuest"===e.default_view.baselayer&&(e.default_view.baselayer="streets"),"MapQuestAerial"===e.default_view.baselayer&&(e.default_view.baselayer="satellite"),e})}function r(e,t,n){e=e&&/^[a-zA-Z0-9#]+$/.test(e)?e:"#959595",t=t||[32,32];var s=l(0);return i.divIcon({className:"custom-map-marker "+n,html:'<svg class="iconic" style="fill:'+e+';"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+s+'#map-marker"></use></svg><span class="iconic-bg" style="background-color:'+e+';""></span>',iconSize:t,iconAnchor:[t[0]/2,t[1]],popupAnchor:[0,0-t[1]]})}}(e.exports=n).$inject=["ConfigEndpoint","Leaflet","_","CONST"]},function(e,t,n){"use strict";e.exports=["$q","$http","_",function(s,i,a){return{searchCoordinates:function(e){return t(e).then(function(e){return e&&e[0]&&e[0].lat&&e[0].lon?[parseFloat(e[0].lat),parseFloat(e[0].lon)]:null})},searchAllInfo:function(e){return t(e).then(function(e){return e&&e[0]?e:null})}};function t(e){return window.googlePlaces?(t=e,n=s.defer(),window.googlePlaces.textSearch({query:t},function(e){n.resolve(a.map(e,function(e){return{display_name:e.name+" - "+e.formatted_address,lat:e.geometry.location.lat(),lon:e.geometry.location.lng()}}))}),n.promise):i({method:"GET",url:"//nominatim.openstreetmap.org/search",params:{q:e,format:"json"}}).then(function(e){return e.data},function(){});var t,n}}]},function(e,t,n){"use strict";e.exports=["Util","$http",function(e,t){return t.get("locales/languages.json").then(function(e){return e.data.languages},function(){return[{rtl:!1,pluralequation:"language.pluralequation",code:"en",name:"English",nplurals:2}]})}]},function(e,t,n){"use strict";e.exports=["FontAwesomeIcons","Util","_","Notify",function(e,t,s,n){var i={fontAwesome:e.getIconSet(),noun:{}},a={getIconSetArray:function(e){var n=[],t=e.split(" ");return s.each(t,function(e){var t=i[e].iconClass+" "+i[e].iconClassPrefix;s.each(i[e].icons,function(e){n.push(t+e)})}),n}};return t.bindAllFunctionsToSelf(a)}]},function(e,t,n){"use strict";e.exports=["Util","$q",function(e,t){return{getIconSet:function(){return{iconClass:"fa",iconClassPrefix:"fa-",icons:["adjust","anchor","archive","area-chart","arrows","arrows-h","arrows-v","automobile","asterisk","at","ban","bank","bar-chart-o","barcode","bars","beer","bell","bell-o","bell-slash","bell-slash-o","bicycle","binoculars","birthday-cake","bolt","bomb","book","bookmark","bookmark-o","briefcase","bug","building","building-o","bullhorn","bullseye","bus","cab","calculator","calendar","calendar-o","camera","camera-retro","car","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","cc","cc-amex","cc-discover","cc-mastercard","cc-paypal","cc-stripe","cc-visa","certificate","check","check-circle","check-circle-o","child","circle","circle-o","circle-thin","clock-o","cloud","cloud-download","cloud-upload","code","code-fork","coffee","cog","cogs","comment","comment-o","comments","comments-o","compass","copyright","credit-card","crop","crosshairs","cube","cubes","cutlery","dashboard","database","desktop","dot-circle-o","download","edit","ellipsis-h","ellipsis-v","envelope","envelope-o","envelope-square","eraser","exchange","exclamation","exclamation-circle","exclamation-triangle","external-link","external-link-square","eye","eye-slash","eyedropper","fax","female","fighter-jet","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o","file-pdf-o","file-photo-o","file-picture-o","file-powerpoint-o","file-sound-o","file-video-o","file-word-o","file-zip-o","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash","flask","folder","folder-o","folder-open","folder-open-o","frown-o","futbol-o","gamepad","gavel","gear","gears","gift","glass","globe","graduation-cap","group","hdd-o","headphones","heart","heart-o","history","home","image","inbox","info","info-circle","institution","key","keyboard-o","language","laptop","leaf","legal","lemon-o","level-down","level-up","life-bouy","life-ring","life-saver","lightbulb-o","line-chart","location-arrow","lock","magic","magnet","mail-forward","mail-reply","mail-reply-all","male","map-marker","meh-o","microphone","microphone-slash","minus","minus-circle","minus-square","minus-square-o","mobile","mobile-phone","money","moon-o","mortar-board","music","navicon","newspaper-o","paint-brush","paper-plane","paper-plane-o","paw","pencil","pencil-square","pencil-square-o","phone","phone-square","photo","picture-o","pie-chart","plane","plug","plus","plus-circle","plus-square","plus-square-o","power-off","print","puzzle-piece","qrcode","question","question-circle","quote-left","quote-right","random","refresh","reorder","reply","reply-all","retweet","road","rocket","rss","rss-square","search","search-minus","search-plus","send","send-o","share","share-alt","share-alt-square","share-square","share-square-o","shield","shopping-cart","sign-in","sign-out","signal","sitemap","sliders","smile-o","soccer-ball-o","sort","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-asc","sort-desc","sort-down","sort-numeric-asc","sort-numeric-desc","sort-up","space-shuttle","spinner","spoon","square","square-o","star","star-half","star-half-empty","star-half-full","star-half-o","star-o","suitcase","sun-o","support","tablet","tachometer","tag","tags","tasks","taxi","terminal","thumb-tack","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up","ticket","times","times-circle","times-circle-o","tint","toggle-down","toggle-left","toggle-off","toggle-on","toggle-right","toggle-up","trash","trash-o","tree","trophy","truck","tty","umbrella","university","unlock","unlock-alt","unsorted","upload","user","users","video-camera","volume-down","volume-off","volume-up","warning","wheelchair","wifi","wrench","check-square","check-square-o","bitcoin","btc","cny","dollar","eur","euro","gbp","ils","inr","jpy","krw","rmb","rouble","rub","ruble","rupee","shekel","sheqel","try","turkish-lira","usd","won","yen","align-center","align-justify","align-left","align-right","bold","chain","chain-broken","clipboard","columns","copy","cut","dedent","file","file-o","file-text","file-text-o","files-o","floppy-o","font","header","indent","italic","link","list","list-alt","list-ol","list-ul","outdent","paperclip","paragraph","paste","repeat","rotate-left","rotate-right","save","scissors","strikethrough","subscript","superscript","table","text-height","text-width","th","th-large","th-list","underline","undo","unlink","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-right","angle-up","arrow-circle-down","arrow-circle-left","arrow-circle-o-down","arrow-circle-o-left","arrow-circle-o-right","arrow-circle-o-up","arrow-circle-right","arrow-circle-up","arrow-down","arrow-left","arrow-right","arrow-up","arrows-alt","caret-down","caret-left","caret-right","caret-up","chevron-circle-down","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-down","chevron-left","chevron-right","chevron-up","hand-o-down","hand-o-left","hand-o-right","hand-o-up","long-arrow-down","long-arrow-left","long-arrow-right","long-arrow-up","backward","compress","eject","expand","fast-backward","fast-forward","forward","pause","play","play-circle","play-circle-o","step-backward","step-forward","stop","youtube-play","adn","android","angellist","apple","behance","behance-square","bitbucket","bitbucket-square","css3","delicious","digg","dribbble","dropbox","drupal","empire","facebook","facebook-square","flickr","foursquare","ge","git","git-square","github","github-alt","github-square","gittip","google","google-plus","google-plus-square","google-wallet","hacker-news","html5","instagram","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","linkedin","linkedin-square","linux","maxcdn","meanpath","openid","pagelines","paypal","pied-piper","pied-piper-alt","pinterest","pinterest-square","qq","ra","rebel","reddit","reddit-square","renren","skype","slack","slideshare","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","tencent-weibo","trello","tumblr","tumblr-square","twitch","twitter","twitter-square","vimeo-square","vine","vk","wechat","weibo","weixin","windows","wordpress","xing","xing-square","yahoo","yelp","youtube","youtube-square","ambulance","h-square","hospital-o","medkit","stethoscope","user-md"]}}}}]},function(e,t,n){"use strict";function s(s,e){var i=e.defer(),a=e.defer(),t=!1;return{open:n,openTemplate:n,close:o,closeTemplate:o,getState:function(){return t},onOpen:function(e,t){var n=s.$on("mainsheet:open",e);t&&t.$on("$destroy",n);i.resolve()},onClose:function(e,t){var n=s.$on("mainsheet:close",e);t&&t.$on("$destroy",n);a.resolve()},setState:function(e){s.$emit("mainsheet:statechange"),t=e}};function n(e,t,n){i.promise.then(function(){s.$emit("mainsheet:open",e,t,n)})}function o(){a.promise.then(function(){s.$emit("mainsheet:close")})}}(e.exports=s).$inject=["$rootScope","$q"]},function(e,t,n){"use strict";function s(o,e,t){var r=e.defer(),s=e.defer(),n=!1;return{open:i,openTemplate:i,close:function(){s.promise.then(function(){o.$emit("modal:close")})},getState:function(){return n},onOpen:function(e,t){var n=o.$on("modal:open",e);t&&t.$on("$destroy",n);r.resolve()},onClose:function(e,t){var n=o.$on("modal:close",e);t&&t.$on("$destroy",n);s.resolve()},setState:function(e){n=e}};function i(e,t,n,s,i,a){r.promise.then(function(){o.$emit("modal:open",e,t,n,s,i,a)})}}(e.exports=s).$inject=["$rootScope","$q","$templateRequest"]},function(e,t,p){"use strict";e.exports=["$rootScope","$q","$translate","$document","Languages","Session","Authentication","UserEndpoint","ConfigEndpoint","moment",function(s,a,e,n,i,o,r,l,c,d){function t(t){null!==t&&(e.use(t).then(function(n){n&&(e.preferredLanguage(n),i.then(function(e){var t=e.find(function(e){return e.code===n});s.rtlEnabled!==t.rtl&&(t.rtl?p.e(2).then(function(){s.$apply(function(){p(228),s.rtlEnabled=t.rtl})}.bind(null,p)).catch(p.oe):s.rtlEnabled=t.rtl)}))}),"en"===t?d.locale("en"):Promise.all([p.e(3),p.e(4)]).then(function(){var e=[p(1180)("./"+t+".js")];(function(){d.locale(t)}).apply(null,e)}).catch(p.oe),s.$emit("setPageTitle",e.instant(n[0].title)))}var u=function(i){return a(function(t,e){if(o.getSessionDataEntry("language"))t(o.getSessionDataEntry("language"));else{var n=a.when(i||c.get({id:"site"}).$promise),s=a.when(!1);r.getLoginStatus()&&(s=l.get({id:"me"}).$promise),a.all({user:s,config:n}).then(function(e){e.user&&e.user.language?t(e.user.language):e.config.language?t(e.config.language):t("en")})}})};return{translate:t,setStartLanguage:function(){u().then(function(e){t(e)})},getLanguage:u,setLanguage:function(t){o.setSessionDataEntry("language",t),r.getLoginStatus()&&l.get({id:"me"}).$promise.then(function(e){e.language=t,l.update(e)})}}}]},function(e,t,n){"use strict";function s(e,t,n,s,i){var a=this;function o(){t.get({id:"site"}).$promise.then(function(e){a.site=e})}a.site=n,a.reloadSiteConfig=o,i.loadFeatures().then(function(){a.activityIsAvailable=i.isViewEnabled("activity"),a.planIsAvailable=i.isViewEnabled("plan")}),o(),s.$on("event:update:header",o)}(e.exports=s).$inject=["Authentication","ConfigEndpoint","BootstrapConfig","$rootScope","Features"]},function(e,t,n){"use strict";e.exports=["$rootScope","$location","$window","$scope","Authentication","ConfigEndpoint",function(e,t,n,s,i,a){var o="Ushahidi";s.siteTitle=o,s.pageTitle=null,s.pageDescription=null,s.pageKeywords=null,s.pageRobots=null,s.appStoreId=n.ushahidi.appStoreId,s.currentFullUrl=t.absUrl(),s.reloadSiteConfig=function(){a.get({id:"site"}).$promise.then(function(e){s.siteTitle=e.name?e.name:o})},e.$on("event:update:header",function(){s.reloadSiteConfig()}),s.reloadSiteConfig(),e.$on("setPageTitle",function(e,t){s.pageTitle=null,t&&t.length&&(s.pageTitle=t+" - ")}),e.$on("setPageDescription",function(e,t){s.pageDescription=null,t&&t.length&&(s.pageDescription=t)}),e.$on("setPageKeywords",function(e,t){s.pageKeywords=null,t&&t.length&&(s.pageKeywords=t)}),e.$on("setPageRobots",function(e,t){s.pageRobots=null,t&&(!0===t?s.pageRobots="index, follow":!1===t?s.pageRobots="noindex, nofollow":t.length&&(s.pageRobots=t))})}]},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","Authentication","UserEndpoint","ConfigEndpoint","$q","$window","$location",function(e,t,n,s,i,a,o,r){e.startIntercom=function(){""!==o.ushahidi.intercomAppId&&a.all([i.get({id:"site"}).$promise,s.getFresh({id:"me"}).$promise]).then(function(e){var t=e[0],n=e[1],s=r.host();o.Intercom("boot",{app_id:o.ushahidi.intercomAppId,custom_launcher_selector:"#intercom_custom_launcher",hide_default_launcher:!0,email:n.email,created_at:n.created,user_id:s+"_"+n.id,deployment_url:s,realname:n.realname,last_login:n.last_login,role:n.role,company:{name:t.name,id:s,created_at:0,plan:t.tier}})})},e.stopIntercom=function(){""!==o.ushahidi.intercomAppId&&o.Intercom("shutdown")},t.$on("event:authentication:login:succeeded",function(){e.startIntercom()}),t.$on("event:authentication:logout:succeeded",function(){e.stopIntercom()}),n.getLoginStatus()&&e.startIntercom()}]},function(e,t,n){"use strict";function s(t,e,n){return{watchTransitions:function(){e.onStart({},function(e){t.isLoading=!0,"list.data.edit"===e.from().name&&(t.isSaving=!0)}),e.onExit({},function(e){0===n.get("$http").pendingRequests.length&&(t.isLoading=!1,t.isSaving=!1)})},getLoadingState:function(){return t.isLoading},getSavingState:function(){return t.isSaving},setLoadingState:function(e){t.isLoading=e},setSavingState:function(e){t.isSaving=e}}}(e.exports=s).$inject=["$rootScope","$transitions","$injector"]},function(e,t,n){"use strict";function s(a,o,r,l,c,e,n,s,d){var t=[];function u(e){var t,i=[];t=c(function(){s.all(e).then(function(e){d.each(e,function(e){if("SUCCESS"===e.status)a.$broadcast("event:export_job:stopped"),e.send_to_browser?(t=e.url,n=l.URL||l.webkitURL,(s=angular.element("<a/>")).attr({href:t}),angular.element(document.body).append(s),s[0].click(),s[0].remove(),m(!1),c(function(){n.revokeObjectURL(t)},100)):e.send_to_hdx&&m(!1,!1,e),p(e);else if("FAILED"===e.status){a.$broadcast("event:export_job:stopped");m(!1,"Export job has failed."),p(e)}else i.push(o.getFresh({id:e.id}));var t,n,s}),0<i.length&&u(i)},function(e){a.$broadcast("event:export_job:stopped"),r.apiErrors(e)})},n.EXPORT_POLLING_INTERVAL),a.$on("event:authentication:logout:succeeded",function(){c.cancel(t)})}function p(t){var e=f(),n=d.findIndex(e,function(e){return e.id===t.id});0<=n?e[n]=t:e.push(i(t)),v(e=h(e)),a.$broadcast("exportJobs:updated",e)}function g(e){o.delete({id:e}),a.$broadcast("event:export_job:stopped"),r.notify('<p translate="notify.export.canceled_job"></p>')}function m(e,t,n){var s,i,a,o;t?r.apiErrors(t):(o=!0===e?(s='<p translate="notify.export.in_progress"> ',i={callback:g,text:"notify.export.cancel_export",actionClass:"button-destructive",callbackArg:n.id},a="ellipses",!0):(s=n&&n.send_to_hdx?'<p translate="notify.export.upload_complete"></p>':'<p translate="notify.export.complete"></p>',!(a="thumb-up")),r.notifyAction(s,null,o,a,"circle-icon confirmation",i))}function i(e){return e.status&&(e.url_expiration?d.isNumber(e.url_expiration)&&(e.url_expiration=new Date(1e3*e.url_expiration).toLocaleString()):e.url_expiration="",e.created_timestamp=e.created_timestamp?e.created_timestamp:e.created,e.created=new Date(e.created).toLocaleString(),e.status=e.status.toLowerCase()),e}function h(e){d.filter(d.map(e,function(e){return i(e)}));return d.sortBy(e,function(e){return e.created_timestamp}).reverse()}function f(){return t}function v(e){t=e}return{startExport:function(e,t){return e.entity_type="post",o.save(e).$promise.then(function(e){return p(e),t||m(!0,null,e),u([o.getFresh({id:e.id})]),e.id},function(e){m(!1,e)})},loadExportJob:function(){var t=[];o.queryFresh({user:"me"}).$promise.then(function(e){d.each(e,function(e){"SUCCESS"!==e.status&&"FAILED"!==e.status&&t.push(o.getFresh({id:e.id}))}),u(t)})},loadExportJobs:function(){return o.queryFresh({user:"me",max_expiration:Math.round((new Date).getTime()/1e3)}).$promise},processExportJobs:h,setExportJobs:v,getExportJobs:f,loadingStatus:m}}(e.exports=s).$inject=["$rootScope","ExportJobEndpoint","Notify","$window","$timeout","$interval","CONST","$q","_"]},function(e,t,n){"use strict";function s(e,t,s,a,o){return{getFormsWithTags:function(){return t.get().$promise.then(function(e){return n=e.results,s.queryFresh({targeted_survey:!1}).$promise.then(function(e){return t=e,i=n,o.each(t,function(n){return a.query({formId:n.id}).$promise.then(function(e){return n.attributes=e,t=n,s=i,o.each(t.attributes,function(n){n.tags=[],o.each(s,function(t){o.each(t.form_attribute_types,function(e){e.form_attribute_type===n.type&&n.tags.push(t)})})}),t;var t,s})});var t,i});var n})}}}(e.exports=s).$inject=["$rootScope","HxlTagEndpoint","FormEndpoint","FormAttributeEndpoint","_"]},function(e,t,n){"use strict";function s(a,o,n,e,s,t,r,l,c,d,i,u){var p=[];function g(e){var t,i=[];t=s(function(){l.all(e).then(function(e){c.each(e,function(e){if("SUCCESS"===e.status){var t=e.processed,n=e.collection_id,s=e.errors;d.importComplete({processed:t,errors:s,collectionId:n,filename:e.filename}),a.$emit("event:import:complete",{filename:e.filename,collectionId:n}),m(e)}else if("FAILED"===e.status){a.$broadcast("event:import_job:stopped");m(e)}else i.push(o.getFresh({id:e.id}).$promise)}),0<i.length&&g(i)},function(e){a.$broadcast("event:import_job:stopped"),n.apiErrors(e)})},r.EXPORT_POLLING_INTERVAL),a.$on("event:authentication:logout:succeeded",function(){s.cancel(t)})}function m(t){var e=v(),n=c.findIndex(e,function(e){return e.id===t.id});0<=n?e[n]=t:e.push(h(t)),b(e=f(e)),a.$broadcast("importJobs:updated",e)}function h(e){return e.status&&(e.status=e.status.toLowerCase()),e}function f(e){c.filter(c.map(e,function(e){return h(e)}));return c.sortBy(e,function(e){return e.created_timestamp}).reverse()}function v(){return p}function b(e){p=e}return{startImport:function(e){g([o.getFresh({id:e.id}).$promise])},loadImportJob:function(){var t=[];o.queryFresh().$promise.then(function(e){c.each(e,function(e){"SUCCESS"!==e.status&&"FAILED"!==e.status&&t.push(o.getFresh({id:e.id}).$promise)}),t.length&&g(t)})},loadImportJobs:function(){return o.queryFresh().$promise},processImportJobs:f,setImportJobs:b,getImportJobs:v}}(e.exports=s).$inject=["$rootScope","DataImportEndpoint","Notify","$window","$timeout","$interval","CONST","$q","_","ImportNotify","CollectionEndpoint","moment"]},function(e,t,n){"use strict";e.exports=["Verifier","Notify","$rootScope","Util",function(e,t,n,s){return{debugModeCheck:function(){e.checkDebugMode(s.apiUrl("/verifier/db")).then(function(e){e&&t.notifyPermanent('You have debug-mode switched on. If you are an admin of this deployment, \n we recommend you disable this check and NOT leaving it enabled in the API. \n You may disable the check by running the "composer installdebug:disable" command in the API folder.')})}}}]},function(e,t,n){"use strict";e.exports=[function(){return{restrict:"E",template:n(591),scope:{post:"="},controller:["$scope","$rootScope","$translate","Notify","RoleEndpoint","_",function(t,e,n,s,i,a){t.showRoles=!!t.post.published_to.length,t.canSeeThis=function(){return t.post.published_to&&t.post.published_to.length?a.map(t.post.published_to,function(e){return t.roles[e].display_name}).join(", "):"draft"===t.post.status?n.instant("post.just_you"):n.instant("post.everyone")},i.query().$promise.then(function(e){t.roles=a.indexBy(e,"name")}),t.checkIfAllSelected=function(){return t.roles.length===t.post.published_to.length},t.toggleRole=function(e){"draft"!==e&&""!==e&&!t.checkIfAllSelected()||(t.post.published_to=[],t.showRoles=!1),t.post.status="draft"===e?e:"published"},t.toggleRolesView=function(){t.showRoles=!0}}]}}]},function(e,t,n){e.exports=' <fieldset dropdown auto-close="outsideClick" class="custom-fieldset init">\n <legend data-toggle="dropdown-menu" class="dropdown-trigger init" dropdown-toggle>\n <span>\n <span class="custom-fieldset-value">\n {{canSeeThis()}}\n </span>\n <span translate="post.can_see_this">\n can see this\n </span>\n </span>\n <svg class="iconic chevron">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom">\n </svg>\n </legend>\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-fieldgroup" dropdown>\n <div class="form-field radio">\n <input\n name="{{post.id}}"\n id="{{post.id}}_draft"\n value="draft"\n type="radio"\n ng-checked="post.status===\'draft\'"\n ng-click="toggleRole(\'draft\')">\n <label for="{{post.id}}_draft" translate="post.just_you">Just you</label>\n </div>\n\n <div class="form-field radio">\n <input\n name="{{post.id}}"\n id="{{post.id}}_everyone"\n value=""\n type="radio"\n ng-checked="post.status===\'published\' && post.published_to.length === 0"\n ng-click="toggleRole(\'\')">\n <label for="{{post.id}}_everyone" translate="post.everyone">Everyone</label>\n </div>\n <div class="form-field radio">\n <input\n name="{{post.id}}"\n id="{{post.id}}_roles"\n auto-close="disabled"\n ng-checked="post.published_to.length"\n value="roles"\n type="radio" ng-click="toggleRolesView()">\n <label for="{{post.id}}_roles" translate="post.specific_roles">Specific roles...</label>\n <div class="form-fieldgroup" dropdown-menu ng-show="showRoles">\n <div class="form-field checkbox" ng-repeat="role in roles">\n <input\n id="{{role.id}}"\n type="checkbox"\n checklist-model="post.published_to"\n checklist-value="role.name"\n ng-click="toggleRole(role.name)">\n <label for="{{role.id}}">{{role.display_name}}</label>\n </div>\n </div>\n </div>\n </div>\n </div>\n</fieldset>\n'},function(e,t,n){"use strict";e.exports=[function(){var e=["$scope","$rootScope","$translate","_",function(e,t,n,s){e.selectAll=function(){Array.prototype.splice.apply(e.selectedSet,[0,e.selectedSet.length].concat(s.pluck(e.entities,"id")))},e.deselectAll=function(){e.selectedSet.splice(0)}}];return{restrict:"E",template:n(593),replace:!0,transclude:!0,scope:{entities:"=",selectedSet:"="},controller:e}}]},function(e,t){e.exports='<div class="listing-toolbar">\n <div class="listing-toolbar-summary">\n <strong translate="nav.selected_items" translate-values="{ selectedItems : selectedSet.length }"></strong>\n <button class="button-link" ng-click="deselectAll()" translate="nav.deselect">Deselect</button>\n <button class="button-link" ng-click="selectAll()" translate="nav.select_all">Select all</button>\n </div>\n\n <div class="listing-toolbar-actions">\n <ng-transclude></ng-transclude> \n </div>\n</div>\n'},function(e,t,n){"use strict";e.exports=["IconManager",function(s){return{restrict:"E",template:n(595),replace:!0,scope:{model:"=?ngModel",iconLibName:"="},link:function(t,e,n){t.iconSet=s.getIconSetArray(n.iconLibName),t.setIcon=function(e){t.model=e}}}}]},function(e,t){e.exports='<span dropdown>\n <button\n dropdown-toggle\n type="button"\n class="button-secondary dropdown toggle-content-trigger"\n >\n <span class={{model}}></span>\n </button>\n <ul class="dropdown-menu init toggle-content list-unstyled" dropdown-menu>\n <li ng-repeat="icon in iconSet" class="inline">\n <button type="button" class="button-secondary inline" ng-click="setIcon(icon)">\n <span class="{{ icon }}"></span>\n </button>\n </li>\n </ul>\n</span>\n'},function(e,t,n){"use strict";e.exports=[function(){return{restrict:"E",replace:!0,template:n(597),scope:{colorContainer:"="},controller:["$scope","$translate",function(t,e){t.color="#eee",t.$watch("colorContainer.color",function(){t.colorContainer.color&&(t.color=t.colorContainer.color.replace("#",""))}),t.setColor=function(e){t.colorContainer.color=-1<e.indexOf("#")?e:"#"+e}}]}}]},function(e,t,n){e.exports='<fieldset class="custom-fieldset init" data-fieldset-type="color" dropdown auto-close="outsideClick">\n\n <legend class="dropdown-trigger init active" data-toggle="dropdown-menu" dropdown-toggle>\n <span class="swatch" ng-style="{ backgroundColor: colorContainer.color}"></span>\n <span class="legend-label">Color</span>\n <svg class="iconic chevron">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field">\n <label translate>color_picker.hex_value</label>\n <input type="text" data-input-type="color" ng-change="setColor(color)" ng-model="color">\n </div>\n\n <div class="form-field">\n <button class="button-gamma" data-button-type="color" value="A51A1A" style="border-top-color: #A51A1A;" ng-click="setColor(\'#A51A1A\')" translate>color_picker.red</button>\n <button class="button-gamma" data-button-type="color" value="E69327" style="border-top-color: #E69327;" ng-click="setColor(\'#E69327\')" translate>color_picker.gold</button>\n <button class="button-gamma" data-button-type="color" value="2274B4" style="border-top-color: #2274B4;" ng-click="setColor(\'#2274B4\')" translate>color_picker.blue</button>\n <button class="button-gamma" data-button-type="color" value="5BAA00" style="border-top-color: #5BAA00;" ng-click="setColor(\'#5BAA00\')" translate>color_picker.green</button>\n </div>\n </div>\n\n</fieldset>\n'},function(e,t,n){"use strict";e.exports=["$q","$http","$rootScope","ConfigEndpoint","_","Notify","Util","Languages",function(s,i,t,a,o,r,l,e){return{restrict:"E",template:n(599),scope:!0,link:function(n){n.modalOpen=!1,n.site={},n.saving_config=!1,n.step="customize",n.fileContainer={file:null};function e(){a.get({id:"site"},function(e){n.site=e,n.hasName=!!e.name,o.contains(e.allowed_privileges,"update")&&e.first_login&&(n.modalOpen=!0)})}t.loggedin&&e(),t.$on("event:authentication:login:succeeded",function(){e()}),n.skip=function(){a.update({id:"site",first_login:!1},function(){n.step="first-post"})},n.closeModal=function(){n.modalOpen=!1},n.clearHeader=function(){n.site.image_header=null};n.updateConfig=function(){n.saving_config=!0,n.site.first_login=!1,function(){var t=s.defer();if(n.fileContainer.file){var e=new FormData;e.append("file",n.fileContainer.file),i.post(l.apiUrl("/media"),e,{headers:{"Content-Type":void 0}}).then(function(e){n.site.image_header=e.data.original_file_url,t.resolve()})}else t.resolve();return t.promise}().then(function(){a.saveCache(n.site).$promise.then(function(e){n.saving_config=!1,n.step="first-post",t.$broadcast("event:update:header")})},function(e){r.apiErrors(e)})}}}}]},function(e,t){e.exports='<modal visible="modalOpen" show-close-button="step == \'first-post\'" close-on-overlay-click="false">\n <form ng-show="step == \'customize\'" name="form">\n <h1 translate>settings.customize_your_new_deployment</h1>\n\n <div ng-hide="hasName">\n <label class="input-label" for="site-settings-name" ng-class="{ \'success\': !form.name.$invalid && form.name.$dirty, \'error\' : form.name.$invalid && form.name.$dirty }" translate>settings.site_name</label>\n <input id="name" name="name" type="text" ng-model="site.name" ng-class="{\'error\': form.name.$invalid && form.name.$dirty}" required>\n <p ng-repeat="(error, value) in form.name.$error"\n ng-show="form.name.$dirty"\n class="alert error"\n translate="{{\'settings.valid.name.\' + error}}"></p>\n </div>\n\n <div class="divider white"></div>\n\n <label class="input-label" for="site-settings-description" translate>settings.site_description</label>\n <textarea id="site-settings-description" type="text"\n ng-model="site.description" placeholder="{{\'settings.site_description_placeholder\' | translate}}"></textarea>\n\n <div class="divider white"></div>\n\n \x3c!-- <label class="input-label">Default View</label>\n <p class="small">This is how your posts will be displayed by default. Don\'t worry, you can always change it later.</p>\n <div class="custom-select">\n <select name="default-view">\n <option value="1">Map</option>\n <option value="2">List</option>\n <option value="3">Graph</option>\n </select>\n </div>\n\n <div class="divider white"></div> --\x3e\n\n <label class="input-label" for="appearance-header-image" translate>settings.appearance_header_image</label>\n <p class="small" translate>settings.appearance_header_image_instructions</p>\n <file-upload container="fileContainer">\n </file-upload>\n\n <div class="divider white"></div>\n\n <button class="save" ng-click="updateConfig()" ng-disabled="form.$invalid || isUnchanged(site) || saving_config">\n <div class="loading" ng-show="saving_config"><div class="line"></div><div class="line"></div><div class="line"></div></div>\n <span translate>settings.continue</span>\n </button>\n <a class="cta" ng-click="skip()" ng-show="hasName" translate>settings.skip</a>\n </form>\n <div ng-show="step == \'first-post\'">\n <h3 class="edit" translate>settings.add_first_post</h3>\n <div class="divider padded"></div>\n <p translate>settings.add_first_post_subtitle</p>\n <a class="button button-create" ui-sref="postCreate" ng-click="closeModal()">\n <span translate>settings.add_first_post</span>\n </a>\n <div class="divider padded"></div>\n <p translate>settings.invite_people</p>\n <a class="button button-primary" ui-sref="settings.users" ng-click="closeModal()">\n <span translate>settings.add_new_users</span>\n </a>\n </div>\n</modal>\n'},function(e,t,n){"use strict";function s(d,u,p){return{restrict:"E",scope:!0,template:n(601),link:function(a,e){var o;a.closeMainsheet=l,a.showMainsheet=!1,a.title="";var r=e.find("mainsheet-content");function l(){a.showMainsheet=!1,p.setState(!1),c()}function c(){o&&o.$destroy(),r.html("")}p.onOpen(function(e,t,n,s){var i;c(),(o=(i=s)?i.constructor!==d.constructor?angular.extend(d.$new(),i):i.$new():a.$new()).closeMainsheet=l,r.html(t),u(r)(o),a.title=n,a.showMainsheet=!0,p.setState(!0)},a),p.onClose(l,a)}}}(e.exports=s).$inject=["$rootScope","$compile","MainsheetService"]},function(e,t){e.exports='<div class="mainsheet init active" ng-show="showMainsheet" style="display: block; opacity: 1;">\n <div class="mainsheet-window">\n <h3 class="mainsheet-heading" ng-if="title">\n {{ title | translate }}\n </h3>\n <mainsheet-content></mainsheet-content>\n </div>\n <div class="mainsheet-overlay" ng-click="closeMainsheet()"></div>\n</div>\n'},function(e,t,n){"use strict";function s(e,h,f,v,t){return{restrict:"E",template:n(603),scope:!0,link:function(c,e){var d;c.classVisible=!1,c.modalOffset=0,c.title="",c.icon=!1,c.closeOnOverlayClick=!0,c.showCloseButton=!0,c.closeButtonClicked=function(e){if("overlay"===e&&!0!==c.closeOnOverlayClick)return;t.close(),g()};var u=n(0),p=e.find("modal-content");function g(){c.classVisible=!1,h.toggleModalVisible(!1),v.setState(!1),m()}function m(){d&&d.$destroy(),p.html("")}v.onOpen(function(e,t,n,s,i,a,o){var r,l;m(),(d=(r=i)?r.constructor!==h.constructor?angular.extend(h.$new(),r):r.$new():c.$new()).closeModal=g,p.html(t),f(p)(d),c.title=n,c.icon=s?u+"#"+s:s,c.closeOnOverlayClick=void 0===a||a,c.showCloseButton=void 0===o||o,l=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop,c.modalOffset=l+40+"px",c.classVisible=!0,v.setState(!0),h.toggleModalVisible(!0)},c),v.onClose(g,c)}}}(e.exports=s).$inject=["$timeout","$rootScope","$compile","ModalService","SliderService"]},function(e,t,n){e.exports='<div ng-show="classVisible" class="modal" style="display: block;">\n <div class="modal-window" ng-style="{ top : modalOffset }">\n <button class="button-beta button-flat modal-trigger modal-trigger-close" ng-show="showCloseButton" ng-click="closeButtonClicked()">\n <svg class="iconic">\n \x3c!-- TODO: fix icon to be settable --\x3e\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#x"></use>\n </svg>\n <span class="hidden" translate>modal.button.close</span>\n </button>\n <h3 class="modal-title" ng-if="title">\n <svg class="iconic" ng-if="icon">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{{ icon }}"></use>\n </svg>\n <span class="label">\n {{ title | translate }}\n </span>\n </h3>\n <modal-content></modal-content>\n <ush-slider inside-modal="true"></ush-slider>\n </div>\n <div class="modal-overlay" ng-click="closeButtonClicked(\'overlay\')"></div>\n</div>\n'},function(e,t,n){"use strict";function s(i){return{restrict:"AC",link:function(e,t){function n(){t.css("max-height",.66*i.innerHeight+"px")}function s(){n(),e.$digest()}n(),angular.element(i).bind("resize",s),e.$on("$destroy",function(e){angular.element(i).unbind("resize",s)})}}}(e.exports=s).$inject=["$window"]},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{layout:"@"},controller:i}}function i(e,t,n,s){n.self!==n.top?t.setLayout("layout-embed layout-"+e.layout):t.setLayout("layout-"+e.layout)}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope","$window","Util"]},function(e,t,n){"use strict";function s(){return{restrict:"A",controller:i}}function i(e,t,n,s,i,a){var o=a.self!==a.top;(o&&"false"===n.embedOnly||!o&&"true"===n.embedOnly)&&t.addClass("hidden")}(e.exports=s).$inject=[],i.$inject=["$scope","$element","$attrs","$rootScope","_","$window"]},function(e,t,n){"use strict";function s(){return{restrict:"E",controller:i,replace:!0,template:n(608)}}function i(){}(e.exports=s).$inject=[],i.$inject=[]},function(e,t){e.exports='<a embed-only="true" href="https://www.ushahidi.com" class="ushahidi-bug" target="_blank">\n <ng-include include-replace src="\'common/directives/mode-bar/ushahidi-logo.html\'"></ng-include>\n <span class="hidden">Powered by Ushahidi</span>\n</a>\n'},function(e,t,n){"use strict";e.exports=["$timeout",function(e){return{restrict:"E",replace:!0,template:n(610),scope:{model:"=",placeholderEntity:"="},link:function(t,e,n,s){t.searchResultsVisible=!1,t.form=s,t.applyFilters=function(){t.searchResultsVisible=!1},t.showSearchResults=function(){t.searchResultsVisible=!0},t.detectSubmit=function(e){e.stopPropagation(),e&&13===e.keyCode?t.hideSearchResults():t.showSearchResults()},t.hideSearchResults=function(){t.searchResultsVisible=!1},t.onClear=function(){t.hideSearchResults(),t.form.q.$setViewValue(null),t.model.q=null}},require:"?^form"}}]},function(e,t,n){e.exports='<div class="searchbar-input" dropdown auto-close="outsideClick">\n \x3c!-- Search input --\x3e\n <div class="form-field">\n <label class="hidden" translate="toolbar.searchbar.search_entity">Search</label>\n <div class="input-with-icon">\n <input\n name="q"\n type="search"\n autocomplete="off"\n placeholder="{{ \'toolbar.searchbar.search_entity\' | translate:{ entity: placeholderText } }}"\n ng-model="model.q"\n ng-focus="showSearchResults()"\n ng-keyup="detectSubmit($event)"\n ng-value="model.q"\n >\n <svg class="iconic" ng-show="!form.q.$viewValue.length">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#magnifying-glass"></use>\n </svg>\n <svg class="iconic" ng-click="onClear()" ng-show="form.q.$viewValue.length">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n </div>\n </div>\n\n\n <div class="searchbar-results dropdown-menu" ng-class="{active: (searchResultsVisible && form.q.$viewValue.length > 0) }">\n <div class="form-field">\n <button class="button-plain" type="submit" ng-click="applyFilters()">\n <span class="button-label">\n <span translate-values="{ entity: entityType }" translate>\n toolbar.searchbar.search_all_entities_for\n </span>\n "<em>{{ form.q.$viewValue }}</em>"\n </span>\n </button>\n </div>\n </div>\n</div>\n'},function(e,t,n){"use strict";e.exports=[function(){return{restrict:"E",replace:!0,template:n(612),scope:{model:"="},controller:["$scope","$rootScope","$translate","RoleEndpoint",function(t,e,n,s){s.query().$promise.then(function(e){t.roles=e})}]}}]},function(e,t){e.exports='<fieldset>\n <label translate>app.roles</label>\n <div class="form-field checkbox" ng-repeat="role in roles">\n <label>\n <input\n type="checkbox"\n checklist-model="model"\n checklist-value="role.name"\n >\n {{role.display_name | translate}}\n </label>\n </div>\n</fieldset>\n'},function(e,t,n){"use strict";function s(a){return{restrict:"A",link:function(e,t,n){var s=t[0].querySelector(".form-field-toggle"),i=angular.bind({},a(n.hasOverflow),e);e.$watch(i,function(e){t.toggleClass("has-overflow",e)}),angular.element(s).on("click",function(e){e.preventDefault(),i()&&t.toggleClass("show-overflow")})}}}(e.exports=s).$inject=["$parse"]},function(e,t,n){"use strict";function s(s){return{restrict:"A",link:function(e,t,n){e.$watch(n.focus,function(e){e&&s(function(){t[0].focus()})})}}}(e.exports=s).$inject=["$timeout"]},function(e,t,d){"use strict";e.exports=["Features","Authentication","Registration","ModalService","$rootScope","ConfigEndpoint","CollectionsService","$window",function(n,s,i,a,o,r,l,c){return{restrict:"E",replace:!0,scope:{currentUser:"="},template:d(616),link:function(t){function e(){t.moreActive=!1}t.moreActive=!1,t.isActivityAvailable=!1,t.canRegister=!1,t.hasManageSettingsPermission=o.hasManageSettingsPermission,t.showMore=function(){t.moreActive=!t.moreActive},t.viewCollectionListing=l.showCollectionList,t.viewAccountSettings=function(){a.openTemplate("<account-settings></account-settings>","",!1,!1,!0,!0)},t.viewSupportLinks=function(){var e={intercomAppId:t.intercomAppId,loggedin:s.getLoginStatus()};a.openTemplate(d(617),"",!1,e,!0,!0)},t.login=s.openLogin,t.logout=s.logout,t.register=i.openRegister,t.intercomAppId=c.ushahidi.intercomAppId,t.$on("$locationChangeStart",e),n.loadFeatures().then(function(){t.isActivityAvailable=n.isViewEnabled("activity")}),r.get({id:"site"},function(e){t.canRegister=!e.private})}}}]},function(e,t,n){e.exports='<div class="mode-bar" ng-class="{ active : moreActive }">\n \x3c!-- mode bar --\x3e\n \x3c!-- PL JS --\x3e\n <nav>\n \x3c!-- main menu --\x3e\n <ul class="deployment-menu">\n <li ui-sref-active="{ \'active\' : \'posts.map\' }">\n <a ui-sref="posts.map.all" ui-sref-opts="{reload:true}" class="view-map">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#map-marker"></use>\n </svg>\n <translate>views.map</translate>\n </a>\n </li>\n\n <li ui-sref-active="active">\n <a ui-sref="posts.data" ui-sref-opts="{reload:true}" class="view-data">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#list-rich"></use>\n </svg>\n <translate>views.data</translate>\n </a>\n </li>\n\n <li ng-if="isActivityAvailable || hasManageSettingsPermission()" ui-sref-active="active" data-message="customize">\n <a ui-sref="activity">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#pulse"></use>\n </svg>\n <translate>views.activity</translate>\n </a>\n </li>\n\n <li>\n <a class="more-menu-trigger" ng-class="{ active : moreActive }" ng-click="showMore($event)">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#ellipses"></use>\n </svg>\n <translate>nav.more</translate>\n </a>\n <ul>\n <li data-message="customize" ng-show="hasManageSettingsPermission()" ui-sref-active="active">\n <a ui-sref="settings.list">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#cog"></use>\n </svg>\n <translate>nav.settings</translate>\n </a>\n </li>\n </ul>\n </li>\n </ul>\n \x3c!-- main menu --\x3e\n\n <ul class="account-menu">\n \x3c!-- user account menu --\x3e\n\n <li>\n <a href="" ng-click="viewSupportLinks()">\n <ng-include src="\'common/directives/mode-bar/ushahidi-logo.html\'"></ng-include>\n <span class="label" translate>app.support</span>\n </a>\n </li>\n\n <li ng-show="currentUser">\n <a ng-click="logout()" data-modal="login">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#account-logout"></use>\n </svg>\n <span class="label" translate="nav.logout">Log out</span>\n </a>\n </li>\n\n <li ng-show="currentUser">\n <a ng-click="viewAccountSettings()">\n <img class="avatar" ng-src="https://www.gravatar.com/avatar/{{ currentUser.gravatar || \'00000000000000000000000000000000\' }}?d=retro" alt="{{ currentUser.realname }}"/>\n <span class="label">{{currentUser.realname || currentUser.email}}</span>\n </a>\n </li>\n\n <li ng-show="!currentUser && canRegister">\n <a ng-click="register()" data-modal="signup">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#person"></use>\n </svg>\n <translate translate="nav.register">Sign up</translate>\n </a>\n </li>\n\n <li ng-hide="currentUser">\n <a ng-click="login()" data-modal="login">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#account-login"></use>\n </svg>\n <translate translate="nav.login">Log in</translate>\n </a>\n </li>\n\n <li>\n <a ng-click="viewCollectionListing()">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#grid-three-up"></use>\n </svg>\n <span class="label" translate>nav.collections</span>\n </a>\n </li>\n \x3c!-- user account menu --\x3e\n </ul>\n\n </nav>\n \x3c!-- PL JS --\x3e\n \x3c!-- mode bar --\x3e\n</div>\n'},function(e,t){e.exports='<h3 class="modal-title" translate>\n app.support\n</h3>\n\n<div class="modal-body">\n <dl>\n <dt class="list-item"><a href="https://www.ushahidi.com/support" target="_blank" translate>app.documentation.title</a></dt>\n <dd translate>app.documentation.description</dd>\n <dt class="list-item"><a href="https://github.com/ushahidi/platform/issues/new" target="_blank" translate>app.report_a_bug.title</a></dt>\n <dd translate>app.report_a_bug.description</dd>\n <dt class="list-item"><a href="https://www.ushahidi.com/features" target="_blank" translate>app.features.title</a></dt>\n <dd translate>app.features.description</dd>\n <dt class="list-item" ng-show="loggedin && intercomAppId"><a id="intercom_custom_launcher" href="mailto:{{intercomAppId}}@intercom-mail.com" target="_blank" translate>app.intercom.intercom</a></dt>\n <dd translate ng-show="loggedin && intercomAppId">app.intercom.description</dd>\n </dl>\n</div>\n\n'},function(e,t,n){"use strict";e.exports=function(){return{restrict:"E",template:n(619),replace:!0,scope:{container:"=",model:"=",validation:"="},controller:["$scope","$attrs","Notify",function(s,e,n){s.required=void 0!==e.required,s.uploadFile=function(e){if(function(e){if("image"!==s.validation)return 1;var t=/[\/.](gif|jpg|jpeg|png)$/i.test(e.type),n=e.size<1048576;return t&&n}(e.target.files[0])){s.container.file=e.target.files[0];var t=new FileReader;t.onload=function(){var e=t.result;s.container.dataURI=e,s.container.changed=!0,s.container.deleted=!1,s.model="changed",s.$apply()},t.readAsDataURL(e.target.files[0])}else n.error("post.media.error_in_upload")}}]}}},function(e,t){e.exports='<input name="file" type="file" custom-on-change=\'uploadFile\' ng-required="{{ required }}" />\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{model:"=",title:"="},controller:i,template:n(621)}}function i(t,e,n){t.setEveryone=function(){t.model.role=[]},e.query().$promise.then(function(e){t.roles=e})}(e.exports=s).$inject=[],i.$inject=["$scope","RoleEndpoint","$translate"]},function(e,t,n){e.exports=' \x3c!--// Who can add //--\x3e\n <fieldset>\n <legend translate="{{title}}"></legend>\n <div\n class="form-field radio icon-input"\n ng-class="{ \'checked\': !model.role.length }"\n >\n <label for="add_everyone">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <input\n name="add"\n id="add_everyone"\n ng-value="true"\n checked=""\n type="radio"\n ng-model="everyone"\n ng-click="setEveryone()"\n >\n <span class="label" translate="nav.everyone">Everyone</span>\n </label>\n </div>\n\n <div\n class="form-field radio icon-input"\n ng-class="{ \'checked\': model.role.length }"\n >\n <label for="add_roles">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#people"></use>\n </svg>\n <input\n class="init"\n name="add"\n id="add_roles"\n ng-value="false"\n ng-modaldata-fieldgroup-toggle="add_roles"\n type="radio"\n ng-model="everyone"\n >\n <span translate="app.specific_roles">Specific roles...</span>\n </label>\n\n <div\n class="form-fieldgroup init"\n data-fieldgroup-target="add_roles"\n ng-class="{true:\'\', false:\'active\'}[everyone]"\n >\n\n <div class="form-field checkbox" ng-repeat="role in roles">\n <label>\n <input\n type="checkbox"\n checklist-model="model.role"\n checklist-value="role.name"\n >\n {{role.display_name | translate}}\n </label>\n </div>\n </div>\n </div>\n </fieldset>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{formId:"=",attribute:"=",postValue:"=",available:"="},controller:i,template:n(623)}}function i(e,n,t,s,i){n.showInput=!1,n.categoryName="",n.category={type:"category",icon:"tag",color:"",parent_id:null,forms:[n.formId]},n.userCanAddCategory=e.hasPermission("Manage Settings"),n.showInputToggle=function(){n.categoryName="",n.showInput=!n.showInput},n.saveCategory=function(e){e.preventDefault(),n.category.tag=n.categoryName,n.category.slug=n.categoryName,t.saveCache(n.category).$promise.then(function(e){if(e.id){n.attribute.options.push(e),n.postValue.push(e.id);var t=angular.copy(n.attribute);t.options=t.options.map(function(e){return e.id}),t.formId=n.formId,s.saveCache(t).$promise.then(function(e){n.categoryName=""}),i.notify("category added",{response:e}),n.available.push.apply(n.available,e)}},function(e){i.apiErrors(e)})}}(e.exports=s).$inject=[],i.$inject=["$rootScope","$scope","TagEndpoint","FormAttributeEndpoint","Notify"]},function(e,t,n){e.exports='<div class="form-field inline" ng-class="{\'hidden\': !showInput}">\n <label class="hidden" translate="category.editor.name">Category name</label>\n <input\n type="text"\n placeholder="{{\'category.editor.name\' | translate}}"\n style="width: 240px;"\n ng-model="categoryName"\n />\n <button\n type="button"\n class="button-alpha button-flat"\n ng-disabled="categoryName.length === 0"\n ng-click="saveCategory($event);"\n >\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#check"></use>\n </svg>\n <span class="hidden" translate="app.add">Add</span>\n </button>\n <button\n type="button"\n class="button-beta button-flat"\n ng-click="showInputToggle()"\n >\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="hidden" translate="category.delete">Delete</span>\n </button>\n</div>\n\n<div class="form-field init" ng-click="showInputToggle()" ng-if="userCanAddCategory && !showInput">\n <a data-toggle="add-label" translate="app.add_new_category">+ Add new category</a>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{selected:"=",enableParents:"=",form:"=",available:"="},controller:i,template:n(625)}}function i(a,o){a.selectAll=function(){a.form&&a.form.$setDirty();a.selectAllEnabled()?(a.selected.splice(0,a.selected.length),a.selectedParents.splice(0,a.selectedParents.length)):o.each(a.available,function(e){var t=!e.parent_id&&0<e.children.length;o.contains(a.selected,e.id)||t?t&&!o.contains(a.selectedParents,e.id)&&a.selectedParents.push.apply(a.selectedParents,[e.id]):a.selected.push.apply(a.selected,[e.id])})},a.selectChild=function(t){a.selected.includes(t.id)?a.selected=o.filter(a.selected,function(e){return e!==t.id}):(a.selected.push(t.id),a.selected.includes(t.parent.id)||a.selected.push(t.parent.id))},a.selectParent=function(t){a.selected.includes(t.id)?(a.selected=o.filter(a.selected,function(e){return e!==t.id}),t.children&&t.children.length&&o.each(t.children,function(t){a.selected=o.filter(a.selected,function(e){return e!==t.id})})):a.selected.push(t.id)},a.selectedParents=[],a.disabledCategories=[],a.changeCategories=function(){o.each(a.categories,function(t){var e=o.chain(t.children).pluck("id").intersection(a.selected).value(),n=-1,s=!t.parent_id&&0<t.children.length;if(0<e.length)a.disabledCategories[t.id]=!0,o.contains(a.selectedParents,t.id)||a.selectedParents.push.apply(a.selectedParents,[t.id]),o.contains(a.selected,t.id)||!0!==a.enableParents||a.selected.push.apply(a.selected,[t.id]);else{var i=o.findIndex(a.selectedParents,function(e){return e===t.id});n=o.findIndex(a.selected,function(e){return e===t.id}),0<=i&&(a.selectedParents.splice(i,1),!0===a.enableParents&&a.selected.splice(n,1)),a.disabledCategories[t.id]=s}!1===a.enableParents&&s&&0<=(n=o.findIndex(a.selected,function(e){return e===t.id}))&&a.selected.splice(n,1)})},function(){null===a.selected[0]&&(a.selected=[]);a.categories=[],a.categories=a.available,a.changeCategories()}(),a.selectAllEnabled=function(){return a.enableParents?a.selected.length===a.available.length:a.selected.length+a.selectedParents.length===a.available.length}}(e.exports=s).$inject=[],i.$inject=["$scope","_"]},function(e,t,n){e.exports='<div class="form-fieldgroup checkbox" ng-if="categories.length > 0" overflow-toggle has-overflow="categories.length > 2">\n <div class="form-field checkbox">\n <label>\n <input\n type="checkbox"\n ng-checked="selectAllEnabled()"\n ng-click="selectAll()"\n >\n <em><span translate="category.select_all"></span></em>\n </label>\n </div>\n <div class="form-field checkbox" ng-repeat="(index, category) in categories" ng-class="{ overflow : ($index > 1) }" ng-if="category.parent_id === null">\n <label>\n <input\n ng-show="category.children.length === 0 || enableParents === true"\n type="checkbox"\n checklist-value="category.id"\n ng-disabled="disabledCategories[category.id]"\n value="category.id"\n checklist-model="selected"\n checklist-change="changeCategories()"\n >\n <input\n ng-show="category.children.length > 0 && enableParents === false"\n type="checkbox"\n checklist-value="category.id"\n ng-disabled="true"\n value="category.id"\n checklist-model="selectedParents"\n >\n <bdi>{{ ::category.tag }}</bdi>\n </label>\n <div class="form-field checkbox" ng-if="category.children" ng-repeat="child in category.children">\n <label>\n <input\n type="checkbox"\n checklist-model="selected"\n checklist-value="child.id"\n value="child.id"\n ng-selected="selected.indexOf(category.id) >-1"\n checklist-change="changeCategories()"\n >\n <bdi>{{ ::child.tag }}</bdi>\n </label>\n </div>\n </div>\n <span class="form-field-toggle">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span translate="nav.more">More</span>\n </span>\n </div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{site:"=?"},controller:i,template:n(627)}}function i(t,e,n,s){t.changeLanguage=function(e){"/settings/general"!==s.path()&&(n.setLanguage(e),n.translate(e))},t.$on("event:authentication:login:succeeded",n.setStartLanguage),t.$on("event:authentication:logout:succeeded",n.setStartLanguage),e.then(function(e){t.languages=e})}(e.exports=s).$inject=[],i.$inject=["$scope","Languages","TranslationService","$location"]},function(e,t){e.exports='\t<div class="form-field select">\n\t <div class="custom-select">\n\t <select\n ng-model="site.language"\n ng-options="lang.code as lang.name for lang in languages"\n ng-change="changeLanguage(site.language)"\n >\n <option value="" translate="app.select_language">Select language</option>\n </select>\n\t </div>\n\t</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{buttonClass:"@",label:"=",disabled:"="},controller:i,template:n(629)}}function i(e){}(e.exports=s).$inject=[],i.$inject=["$scope"]},function(e,t){e.exports=' <button type="button" ng-disabled="disabled" ng-class="{{buttonClass}}">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label" translate>{{label}}</span>\n</button>'},function(e,t,n){"use strict";function s(t,n,s){return{request:function(e){return!0!==t.getLoadingState()&&t.setLoadingState(!0),"PUT"===e.method&&-1===e.url.indexOf("lock")&&t.setSavingState(!0),e},response:function(e){return 0===s.get("$http").pendingRequests.length&&(t.setLoadingState(!1),t.setSavingState(!1)),e||n.when(e)}}}(e.exports=s).$inject=["LoadingProgress","$q","$injector"]},function(e,t,n){"use strict";e.exports=["$httpProvider",function(e){e.interceptors.push("loading")}]},function(e,t,n){"use strict";e.exports=["$translateProvider",function(e){e.useSanitizeValueStrategy("escaped"),e.translations("en",n(633)),e.useStaticFilesLoader({prefix:"locales/",suffix:".json"}),e.preferredLanguage("en"),e.fallbackLanguage("en")}]},function(e){e.exports=JSON.parse('{"app":{"404":"That URL doesn\'t exist","powered_by_ushahidi":"Powered by Ushahidi.","support":"Ushahidi Support","by":"by","submit":"Submit","anonymous":"Anonymous","submitting":"Submitting","submit_another":"Submit & Add Another","submit_response":"Submit a survey response","can_see_this":"can see this","collection":"Collection","collections":"Collections","create_collection":"Create collection","export_to_csv":"Export filtered data","create_new":"Create new","create_new_survey":"Create new survey","created_by":"Created by {{author}}","date_created":"Date created","date_updated":"Date updated","documentation":{"title":"Documentation","description":"Learn how to set up, configure, and manage your Ushahidi deployment."},"intercom":{"intercom":"Intercom","description":"Contact Ushahidi staff for chat support"},"report_a_bug":{"title":"Report a bug","description":"Tell us when something doesn\'t work the way you expected."},"edit_collection":"Edit collection","features":{"title":"Features","description":"See what Ushahidi can do and how it works."},"forbidden":"Sorry, you\'re not allowed to do that.","get_notifications":"Get notifications","turn_off_notifications":"Turn off notifications","load_more":"Load more","loading":"Loading","loading_saved_searches":"Loading saved searches","more":"More","cancel":"Cancel","save":"Save","save_and_close":"Save & close","add_and_close":"Add & close","update_and_close":"Update & close","updating":"Updating","saving":"Saving","settings":"Settings","share":"Share","specific_roles":"Specific roles...","general":"General","surveys":"Survey","add_survey":"Add Survey","edit_survey":"Edit Survey","data_sources":"Data Sources","import":"Import","users":"Users","edit_user":"Edit User","add_user":"Add User","edit":"Edit","roles":"Roles","edit_role":"Edit Role","add_role":"Add Role","webhooks":"Webhooks","edit_webhook":"Edit Webhook","add_webhook":"Add Webhook","categories":"Categories","edit_category":"Edit Category","add_category":"Add Category","categories_count":"{{count}} categories","plans":"Plans","delete":"Delete","description":"Description","color":"Color","search_users":"Search users","searching":"Searching","show_hide":"Show/Hide","fields":"Fields","no_results":"No results found.","filter_by":"Filter by...","sort_filter":"Sort & filter","apply_filters":"Apply","show_more_less":"Show more/less","filters":"Filters","filter_by_survey":"Filter by survey","configure":"Configure","post":"Post","name":"Name","key":"Key","survey_web_address":"Your survey\'s web address","default_value":"Default value (optional):","select_one":"Select One","sort_and_filter":"Sort & filter","saved_search":"Saved Search","tasks":"Tasks","return_to_all_posts":"Return to all posts","this_deplyment_is_private":"This deployment is private","private_deployment":"Private Deployment","mark_as":"Mark as","who_can_see_this_category":"Who can see this category?","this_category_is_child_to":"This category is a child to <strong>{{parent}}</strong>","nothing":"Nothing","who_can_see_this":"Who can see this?","add":"Add","add_new_category":"+ Add new category","sort_by":"Sort By ...","newest_first":"Newest first","oldest_first":"Oldest first","language":"Language","select_language":"Select language"},"toolbar":{"searchbar":{"search_entity":"Search {{entity}}","search_all_entities_for":"Search all {{entity}} for "}},"demo_warnings":{"close":"Close","visitor":{"not_expired":"Deployment {{site_name}} is using a free trial of Ushahidi. You will only see the first 25 posts for the next {{days}} days.","expired":"Deployment {{site_name}} is using a free trial of Ushahidi. You will only see the first 25 posts."},"user":{"expired":"Your 30 day trial is over. Upgrade now to make the most of Ushahidi.","not_expired":"You have {{days}} days left in your free trial. Upgrade now for unlimited posts and full access to Ushahidi.","limit_reached":"Nice work! You have more than 25 posts. Upgrade now to see the rest of your posts or reach out to our team about a full-service enterprise partnership for your project."}},"color_picker":{"hex_value":"Hex Value","red":"Red","gold":"Gold","blue":"Blue","green":"Green"},"feature_limits":{"view_unavailable":"The {{value}} view isn\'t available on your current plan. <a href=\\"/settings/plan\\">Upgrade your plan</a> to get it!"},"limit":{"plan_limit":"Ushahidi Plan Limit","post_limit_reached":"You have reached the limit of published Posts for your plan.","admin_limit_reached":"You have reached the limit of admin users for your plan.","post_type_limit_reached":"You have reached the surveys limit for your plan.","upgrade":"Upgrade"},"activity":{"activity_over_time":"Activity over time","activity_by_volume":"Activity by volume","recent_activity_timeline":"Recent Activity timeline","new_post":"New Post","by":"By","context_body":"A summary of how people are interacting with {{site}}.","inbound":"Inbound Response Messages","outbound":"Outbound Surveying Messages","recipients":"Unique Recipients of Targeted Survey","responders":"Unique Responders to Targeted Survey","all_targeted":"All Targeted Surveys","no_targeted":"You don\'t have any Targeted Survey data to show.","all_sources":"All Data Souces","web_mobile":"Web and Mobile","email":"email","sms":"sms","twitter":"twitter","all_crowdsourced":"All Crowdsourced Surveys","no_crowdsourced":"You don\'t have any Crowdsourced Survey data to show.","targeted_activity":"Tageted Survey Activity","crowdsourced_activity":"Crowdsourced Survey Activity"},"form":{"add_field":"Add field","add_field_instructions":"Add instructions to this field","add_field_instructions_info":"These instructions will be presented as a tooltip to a user when filling in this field.","add_field_instructions_placeholder":"Explain this field...","add_post_type":"Add Survey","add_step":"Add Task","added_form_stage_attribute":"Saved field","field_allowed_relation_post_type":"Allowed surveys","choose_order_message":"Choose and order the fields that you would like to include in this survey","created_form_stage":"Saved task","currently_disabled":"This survey is currently disabled.","custom_structure":"Custom Structure","default_date_placeholder":"Default date","default_default_placeholder":"Default value","default_location_placeholder":"Nairobi, Kenya","delete_post_type":"Delete this survey","deleted_form":"Deleted Survey","deleted_form_stage":"Deleted Task","deleted_form_stage_attribute":"Deleted field","editable_by":"Editable By","edit_post_step":"Edit Task: {{step}}","edit_post_type":"Edit Survey: {{form}}","edit_post_types":"Edit Surveys","field_add_option":"Add","field_default":"Field Default","field_key":"Field Key","field_type":"Field Type","field_name":"Field Name","field_options":"Field Options","field_key_placeholder":"field-key","field_name_placeholder":"Name this field","field_option_placeholder":"Option 1","field_required":"This field is required","form_name":"Name","form_description":"Description","forms":"Forms","form_stage_settings_saved":"Saved settings","permission_public":"Public","permission_admin":"Admin","permission_self":"Only Me","post_type_settings":"Survey Settings","post_step_settings":"Task Settings","priority_changed":"Changed priority","save_and_close":"Save & Close","save_post_type":"Save Survey","save_post_step":"Save Task","saved_form":"Survey saved.","step_delete":"Delete","step_name":"Task Name","step_rename":"Rename","step_required":"This task is required","post_step":"Post","type":"type","visible_to":"Visible To"},"survey":{"delete_task":"Delete task","duplicate_survey":"Duplicate","internal_use_task":"Task is only for internal use","internal_use_task_desc":"This task will only be visible to User who have Manage Post permission.","duplicate_task":"Duplicate task","show_this_task_to":"Show this task to everyone when published","show_this_task_to_desc":"When a survey response is published, data from this task will be displayed.","survey_name":"Survey name","describe_your_survey":"Describe your survey...","describe_this_task":"Describe this task...","untitled_task":"Untitled task","add_task":"Add task","title":"Title","field_allowed_relation_survey":"Allowed surveys","collect_image_caption":"Include image caption field","disable_caption_field_explanation":"This will disable and hide all existing captions for this field, but you can re-enable them at any time.","description":"Description","task_description":"Task description","post_fields":"Post fields","task_fields":"Task fields","show_task":"Show this task to everyone when the post is published","task_info":"You can add additional information to each post, like translations or verification, and assign them to people by adding <strong>Tasks</strong>. You can choose from pre-built tasks or create your own from scratch.","text_desc":"A sentence or less","short_text":"Short text","long_text":"Long text","number_decimal":"Number (Decimal)","number_integer":"Number (Integer)","location":"Location","date":"Date","datetime":"Date & Time","select":"Select","radio_button":"Radio Button(s)","checkbox":"Checkbox(es)","related_post":"Related Post","upload_image":"Image","embed_video":"Embed video","markdown":"Markdown","categories":"Categories","textarea_desc":"Multiple sentences or paragraphs","decimal_desc":"A number with decimal places","integer_desc":"A whole number","location_desc":"A geographic location chosen via a map","date_desc":"A date with year, month, day","datetime_desc":"A date with time in hours and minutes","select_desc":"A drop down list of items","radio_desc":"Allows the user to choose only one of a predefined set of options.","checkbox_desc":"Allows the user to choose one or more of a predefined set of options.","relation_desc":"Create a relation between different surveys","upload_desc":"Allows image(s) to be uploaded to the post","video_desc":"Allows Youtube or Vimeo videos to be embed in the post","markdown_desc":"Allows the use of markdown syntax to style the field content.","tasks":"Tasks","task_visible_when_published":"This task will be visible when post is published.","show_field_description":"Add field description (optional):","add_field":"Add field","edit_field":"Edit field","build":"Build","configure":"Configure","require_section":"Require this task be completed before a post can be visible to the public","hide_author_information":"Hide author information","hide_author_information_desc":"Only people with permission to edit responses will be able to see who submitted them; and only when editing them.","hide_location_information":"Hide exact location information","hide_location_information_desc":"Only people with permission to edit responses will be able to see exact locations. Other people will see rounded locations. The location will be accurate to {{precision}}km.","hide_time_information":"Hide exact time information","hide_time_information_desc":"Only people with permission to edit responses will be able to see exact time submitted. Other people will see only the date.","share":"Share","task_name":"Task name","required_field":"Required","required":"Required","required_desc":"Require this task be completed before a post can be visible to the public.","require_field_desc":"Require this field be completed","name_this_task":"Name this task...","require_review":"Require posts to be reviewed before they\'re published","require_review_desc":"New responses to this survey will be put \'under review\', and therefore not immediately visible to the public. Users with permission to review the response can review and \'publish\' them, which would then make them visible to everyone.","require_task":"Required","make_response_private":"Make responses private","response_private_desc":"Only people with permission to edit responses can see responses to this field","require_task_desc":"Require this task be completed before a post can be visible to the public","survey_permissions":"Survey permissions","who_can_add":"Who can add to this survey","survey_field":"Survey field","choose_survey_field":"Choose what should be assigned to each survey field","choose_survey_field_desc":"Each of the survey\'s fields are listed below. Choose the data from {{datasource_type}} that you\'d like to use to populate each of those fields.","who_can_contribute_to_task":"Who can contribute to fields in this task","delete":{"desc":"<strong>If you delete this survey</strong>, all of its posts will also be deleted. Proceed with caution.","delete":"Delete survey","delete_this":"Delete this survey","delete_this_field":"Delete this field","delete_field":"Delete field","desc_field":"<strong>If you delete this field</strong>, all of the data that was collected within it will also be deleted. Proceed with caution."},"name":"Survey name","color":{"color":"Color","hex":"Hex value","red":"Red","gold":"Gold","blue":"Blue","green":"Green"},"who":"Who can see this?","task":{"delete":{"desc":"<strong>If you delete this task</strong>, all of the data captured in it will also be deleted. Proceed with caution.","delete":"Delete task","delete_this":"Delete this task"}},"targeted_survey":{"title":"Create a new targeted survey","description":"Send questions via SMS to a list of those phone numbers.","name_title":"Name your survey","name":"Survey name","description_title":"Survey Description","audience_title":"Choose your audience","add_questions_title":"Add your questions","add_questions_description":"We will send each question as a separate SMS. After someone responds, we will send the next question in the survey.","add_another":"Add another question...","add_a_question":"Add a question...","edit_title":"Edit question","new_question_title":"New Question","question_text":"Question text","question_description":"This is what users will see when they go to your survey.","sample_question":"Sample question: Hi there! How are you feeling today? Your response is free.","char_remains":"{{remaining}}/160 characters remaining","publish":"Publish survey","delete":"Delete","send_to_old_number_warning":"If you are messaging a number that you have messaged in the past, that person\'s responses will always apply to the most recent survey. They will no longer be able to reply to previous unanswered survey questions.","publish_description_many":"We will send {{questions}} questions to {{numbers}} people via SMS for a total of {{total_sms_messages}} messages. Your telecommunications provider will charge you for each message. Please be careful about the costs you will incur by sending this survey. This action cannot be undone.","publish_description_one_question":"We will send {{questions}} question to {{numbers}} people via SMS for a total of {{total_sms_messages}} messages. Your telecommunications provider will charge you for each message. Please be careful about the costs you will incur by sending this survey. This action cannot be undone.","publish_description_one_number":"We will send {{questions}} questions to {{numbers}} person via SMS for a total of {{total_sms_messages}} messages. Your telecommunications provider will charge you for each message. Please be careful about the costs you will incur by sending this survey. This action cannot be undone.","publish_description_one_number_one_question":"We will send {{questions}} question to {{numbers}} person via SMS for a total of {{total_sms_messages}} message. Your telecommunications provider will charge you for each message. Please be careful about the costs you will incur by sending this survey. This action cannot be undone.","question_warning":"You must enter at least 1 question.","publish_warning":"Are you sure you ant to send this SMS survey?","publish_notification_many":"{{messages}} messages will be sent as part of this survey. You will be charged for these messages by your telecommunications provider","publish_notification_one":"{{messages}} message will be sent as part of this survey. You will be charged for that message by your telecommunications provider","hide_responders":"Hide information about responders","hide_responders_desc":"The phone numbers of the people who respond to your questions remain hidden from the public site. Only the team members with edit permissions will be able to see them.","notification_button":"View survey in datamode","name_warning":"You must give your survey a name.","description_warning":"You must give your survey a description.","send_to_person":"<strong>Targeted:</strong> Send this survey to {{recipientCount}} person via SMS","send_to_people":"<strong>Targeted:</strong> Send this survey to {{recipientCount}} people via SMS","country_code":"Country Code","country_code_error":"You must select a country.","select_country":"Select Country","phone_numbers":"Phone Numbers","phone_number_warning":"You must enter at least 1 phone number.","one_repeat_alert":"We removed a total of {{repeatCount}} repeat number from your list.","multi_repeat_alert":"We removed a total of {{repeatCount}} repeat numbers from your list.","multi_number_error":"Of the {{total}} phone numbers you entered, we noticed problems with {{bad}} of them. Please correct the phone numbers below and continue. Numbers must match the selected country\'s formatting rules.","one_number_error":"Of the {{total}} phone numbers you entered, we noticed problems with {{bad}} of them. Please correct the phone number below and continue. Numbers must match the selected country\'s formatting rules.","multi_numbers_good":"These {{good_numbers}} numbers look fine.","one_number_good":"This {{good_numbers}} number looks fine.","question_error":"You must add at least one question.","phone_number_instructions":"Please type in the phone numbers you\'d like to contact. You must place a comma between each phone number.","targeted_survey":"Targeted Survey","targeted_survey_desc":"We sent this survey via SMS","sent_messages":"We have sent {{totalSent}} messages, and","sent_message":"We have sent {{totalSent}} message, and","received_responses":"you have received {{responses}} responses ","received_response":"you have received {{responses}} response ","recipients_count":"from {{recipients}} recipients so far.","recipient_count":"from {{recipients}} recipient so far.","error_message":"An error occurred while trying to save your targeted survey","error_contacts":"Some of the numbers you provided failed, please check your numbers and try again","pending_messages":"We are processing {{totalPending}} messages.","pending_message":"We are processing {{totalPending}} message.","cancel":"Cancel"}},"global_filter":{"filter":"Filter","categories":{"categories":"Categories","all_categories":"All Categories"},"post_types":{"post_types":"Surveys","all_types":"All Types","unstructured":"Unstructured"},"post_statuses":{"post_statuses":"Status","all_statuses":"Any Status","draft":"Draft","published":"Published"},"post_stages":{"post_stages":"Current Task","all_stages":"All Tasks"},"collections":{"collections":"Collections","all_collections":"All Collections","search_collections":"Search Collections"},"sort":{"order":{"filter_type_tag":"Order","desc":"Newest first","asc":"Oldest first"},"orderby":{"post_date":"Post Date","created":"Date created","updated":"Date updated"},"unlockedOnTop":{"filter_type_tag":"Unlocked posts on top"}},"filter_tabs":{"order":"Order","order_group":{"orderby":{"post_date":"Post Date","created":"Date created","updated":"Date updated"},"order":{"desc":"Newest first","asc":"Oldest first"},"unlocked_on_top_yes":"Yes","unlocked_on_top_no":"No"},"orderby":"Order by","order_unlocked_on_top":"Unlocked posts on top","savedsearch":"Saved Search","saved_search":"Saved Search","q":"Keyword","created_after":"Start date","created_before":"End date","date_after":"Start date","date_before":"End date","center_point":"Location","tags":"Category","form":"Survey","current_stage":"Current Task","set":"Collection","status":"Status","location_value":"Within {{km}} km of {{value}}","visible_to":"Visible to","user":"User","has_location":"Post-locations","all_posts":"Show all posts","unmapped":"Show unmapped posts","mapped":"Show posts with a location","source":"Source"},"unmapped_start_one":"There is","unmapped_start_many":"There are","unmapped_one":"{{post_nb}} post","unmapped_many":"{{post_nb}} posts","unmapped_end":"not shown here because they don\'t include location information.","more":"More","keyword":"Keyword","start_date":"Start Date","start_date_placeholder":"Jan 25, 2014","end_date":"End Date","end_date_placeholder":"April 25, 2014","location":"Location","location_placeholder":"Enter city or address","within_km":"Within","km":"Km","within_km_placeholder":"Distance","option_1":"within 1 km","option_2":"within 10 km","option_3":"within 50 km","option_4":"within 100 km","option_5":"within 500 km","restore_defaults":"Restore Defaults","apply_filters":"Apply","save_to_set":"Save to Set","search":"Search","date_range":"Date range","who_its_visible_to":"Who it\'s visible to","status":"Status","source":"Source"},"graph":{"all_posts":"Nothing; Show all posts","all":"All time","compare":"Compare...","compare_all":"Compare...","compare_status":"Compare status","compare_tags":"Compare categories","compare_form":"Compare surveys","compare_":"Compare ","created":"Created time","cumulative":"Show cumulative totals","cumulative_post_count":"Total post count","custom":"Custom date range","custom_display":"{{start || \'Beginning\'}} to {{end || \'Now\'}}","group_by_placeholder":"Graph","new_post_count":"New posts","none":"None","no_data":"No activity to show","post_count":"Post count","post_date":"Post created date","select_one":"Select one","week":"This week","month":"This month","updated":"Updated time"},"message":{"button":{"dismiss":"Dismiss","upgrade":"Upgrade now","default":"Ok","cancel":"Cancel"}},"modal":{"button":{"close":"Close"}},"nav":{"404":"Whoops","about":"About","activity":"Activity","add_post":"Add Post","account_settings":"Account Settings","alerts":"Alerts","all":"All","author_tagline":"By {{author}}","appearance":"Appearance","back":"Back","category":"Category","categories":"Categories","clear":"Clear","collections":"Collections","comments":"Comments","data_sources":"Data Sources","data_import":"Data Import","deselect":"Deselect","edit_profile":"Edit Profile","edit_post_type":"Edit Survey","everyone":"Everyone","export":"Export","forbidden":"Access Denied","dashboard":"Dashboard","delete":"Delete","edit":"Edit","filters":"Filters","forgotyourpassword":"Forgot your password?","resetpassword":"Reset password","resetmypassword":"Reset my password","forms":"Forms","help":"Help","home":"Home","login":"Log in","logout":"Log out","registration":"Sign up","register":"Sign up","map_settings":"Map Settings","more":"More","notifications":"Notifications","only_author":"Only the author","only_you":"Only you","people":"People","permissions":"Permissions","plan_settings":"Plan","please_wait_loading":"Please wait. Loading...","plugins":"Plugins","posts":"Posts","posts_and_entities":"Surveys","profile":"My Profile","role":"Role","roles":"Roles","webhook":"Webhook","webhooks":"Webhooks","saved_searches":"Saved Searches","search":"Search","select_all":"Select all","selected_items":"{{selectedItems}} selected","settings":"Settings","survey_settings":"Survey settings","tags":"Categories","today":"Today","general":"General Settings","type":"Type","unknown":"Unknown","unselect_all":"Unselect All","user":"User","users":"Users","views":"Views","yesterday":"Yesterday"},"views":{"map":"Map","list":"Timeline","activity":"Activity","data":"Data"},"post":{"see_more_plural":"See {{newPostsCount}} new posts","see_more_singular":"See {{newPostsCount}} new post","add_to_form":"Add to {{form}}","posts":"Posts","there_are_no_posts":"There are no posts","in_this_deployment":" in this deployment, yet.","posts_total":" {{posts}} of {{total_nb}} posts","by":"by","task_completed":"Task completed","everyone":"Everyone","just_you":"Just you","specific_roles":"Specific roles...","can_see_this":"can see this","add_post_type":"Add {{form_name}}","edit_post_type":"Edit {{form_name}}","messages":{"by_sms":"By SMS","by_email":"By Email","by_twitter":"By Twitter","reply":"Reply to Message thread","send":"Send New Message","save":"Save","simple_send":"Send","title":"Conversation with author","associated_messages":"View messages associated with this post","show_only_incoming":"Show only {{provider}} not assigned to a survey yet ","imported_by":"{{messages}} imported by this deployment","Twitter":"Twitter","Email":"Email","SMS":"SMS"},"post":"Post","message":"Message","message_thread":"Message Thread","all_posts":"All posts","no_search_results":"Your search didn\'t match any posts","no_posts_yet":"There are no posts yet!","add_first_post":"Add the first post","create_post":"Create Post","create":"Create","change":"Change","posted_by":"Posted by","draft":"Under review","archived":"Archived","edited_by":"Edited by","export":"Export","select_all":"Select All","unselect_all":"Unselect All","per_page":"{{count}} posts","post_details":"Post Details","steps":"This post\'s tasks","mark_complete":"Mark as Complete","complete":"Complete","type_details":"{{type}} Details","edit_post":"Edit Post","history":"History","hide_form":"Hide {{form}}","hide_unknown_form":"Hide Unknown","publish":"Publish to...","publish_for_you":"You","publish_for_everyone":"Everyone","published":"Published","unpublished":"Unpublished","published_by":"Published by","can_see_this_post":"can see this post","location":"Location","categories":"Categories","status":"Status","type":"Type","view":"View","step":"Task","update":"Update","options":"Options","complete_draft":"Complete (Draft)","complete_published":"Complete (Published)","structure":"Structure","source":"via {{source}}","visible_to_public":"This post is visible to the public","visible_to_you":"This post is visible to just you and admins","visible_to_roles":"This post is visible to {{roles}}","show_only_form":"Show only {{form}}","show_only_unknown_form":"Show only Unknown","delete_post":"Delete post","delete_this_post":"Delete this post","delete_post_desc":"<strong>If you delete this post</strong>, all of its comments will also be deleted. Proceed with caution.","post_actions":{"edit":"Edit","delete":"Delete","export":"Export","put_under_review":"Put under review","archive":"Archive","publish":"Publish"},"created_at":"<strong>Created</strong> at","updated_at":"<strong>Last updated</strong> at","author":"Author","post_date":"Post date","change_author":"Change author","status_published":"Published","status_review":"Under review","status_archived":"Archived","unknown_posts":"Unknown posts","my_posts":"My posts","unstructured_posts":"Unstructured posts","published_posts":"Published posts","all_posts_desc":"All posts","published_posts_desc":"All published posts","unstructured_posts_desc":"Unstructured posts","my_posts_desc":"Your posts","unknown_posts_desc":"Posts with no assigned survey","locking":{"unlocked":"Post successfully unlocked","unlock":"Unlock","lock_broken_by_other":"Your Post has been unlocked. Your current unsaved changes will be lost.","locked_message":"The post is locked because <strong>{{ user }}</strong> is working on it right now. Try editing a different post."},"modify":{"intro":"Select survey:","no_task_values":"There are currently no saved values for this task.","create_type":"Create {{type}}","edit_type":"Edit {{type}}: {{title}}","add_a_post":"Add a post","add_to_survey":"Add to this survey","edit_post":"Edit {{title}}","change_type":"Change type","incomplete_step":"To publish a post all required tasks must be marked as complete. The required task {{stage}} has not yet been marked complete","save_post":"Save Post","publish":"Publish to...","publish_to":"Publish to {{role}}","published_to":"Published to {{role}}","unpublish":"Revert to Draft","everyone":"Everyone","back":"Back","contact_info":"Enter your contact info (optional)","author_realname":"Name","author_email":"Email","bulk_actions":"Bulk Actions","form":{"categories":"Categories","description":"Description","location":"Location","title":"Title","link":{"name":"Link Name","url":"Link url","add_link":"Add Link"}}},"preview":{"private":"private","public":"public","read_more":" ... Read More","tags":"Categories","post_actions":{"post_actions":"Post Actions","select":"select","edit":"edit","set":"set","publish":"publish","unpublish":"unpublish","delete":"delete"}},"valid":{"no_changes":"You haven’t made any changes","invalid_state":"This post is currently in an invalid state. You\'ll need to complete all required tasks before you can re-publish this post. You can either complete the necessary tasks or give your post a different status, like \\"under review.\\"","validation_fail":"Required fields are missing, these fields are marked with an * below.","title":{"required":"A title is required","minlength":"Title is too short","maxlength":"Title is too long"},"label":{"required":"A name is required"},"content":{"required":"Description cannot be empty"},"tags":{"required":"Categories are required"},"values":{"required":"\\"{{label}}\\" is required","parse":"\\"{{label}}\\" could not be parsed","date":"\\"{{label}}\\" must be a date","number":"\\"{{label}}\\" must be a number"},"author_name":{"maxlength":"Name is too long"},"author_email":{"email":"Invalid email"}},"media":{"enter_a":"Enter a","youtube":" Youtube","current_url":"Current image","add_caption":"Add caption","upload":"Upload","add_photo":"Add photo","delete_photo":"Delete photo","replace_image":"Replace image","error_in_upload":"Your image is too large (maximum size is 1MB) or has the wrong format (allowed formats are gif, png, jpg and jpeg), please check and try again!"},"video":{"enter_a":"Enter a","or":" or ","vimeo":" Vimeo","video_url":" video URL"},"unstructured":{"add_survey":{"info":"<strong>This post hasn\'t yet been assigned to a survey within your deployment.</strong> That\'s because it was submitted via {{source}}, which doesn\'t provide a way for the author to add their post to a specific survey.","choose":"Which survey would you like to add this post to?","title":"Add this post to a survey","save_and_edit":"Add to survey & edit"},"survey_title":"Unknown Survey"}},"role":{"add_role":"Add Role","edit_role":"Edit Role","name":"Name","description":"Description","save":"Save Role","save_add_another":"Save & Add Another","permissions":"Permissions","delete":"Delete","delete_role":"Delete this role","delete_role_desc":"<strong>If you delete this role</strong>, all of the users assigned to it will be assigned default permissions. Proceed with caution.","everyone":"Everyone","just_you":"Just you"},"webhook":{"add_webhook":"Add Role","edit_webhook":"Edit Role","uuid":"Webhook UUID","name":"Name","shared_secret":"Shared Secret","url":"API URL","entity_type":"Entity Type","event_type":"Event Type","save":"Save Role","save_add_another":"Save & Add Another","delete":"Delete","delete_webhook":"Delete this webhook","delete_webhook_desc":"<strong>If you delete this webhook</strong>, all associated webhook events will be lost. Proceed with caution."},"saved_search":{"visible_to_public":"This Saved Search is visible to the public","visible_to_you":"This Saved Search is visible to just you and admins","visible_to_roles":"This Saved Search is visible to {{roles}}","featured":"Featured","featured_tooltip":"Featured searches appear to all users in <br>the \\"Saved Searches\\" menu"},"collection":{"visible_to_public":"This Collection is visible to the public","visible_to_you":"This Collection is visible to just you and admins","visible_to_roles":"This Collection is visible to {{roles}}"},"set":{"by":"by","clear_search":"Clear Search","create_collection":"Create Collection","create_new":" Create New","create_savedsearch":"Create Saved Search","description":"Description","delete_collection":"Delete this collection","delete_savedsearch":"Delete this Saved Search","default_viewing_mode":"Default viewing mode","edit_collection_settings":"Edit Collection","edit_search_settings":"Edit Saved Search","featured":"Featured","featured_collection":"This collection is featured","featured_collection_tooltip":"Featured Collections appear to all users in <br>the \\"Collections\\" menu","find_a_collection":"Find a collection...","find_a_saved_search":"Find a saved search...","delete_saved_searches":"Delete Saved Searches","add_to_collection":"Add to Collection","empty_list_collections":"No collections","empty_list_savedsearches":"No saved searches","collection_name":"Collection name","name_your_collection":"Name your collection...","name_savedsearch":"Saved Search name","visible_to_collection":"Who can see this Collection","visible_to_savedsearch":"Who can see this Saved Search","reset_savedsearch":"Reset Search","save_set":"Save Collection","save_savedsearch":"Save Search","update_savedsearch":"Update Search","edit_savedsearch":"Edit Search","set_settings":"Collection Settings","add_notification":"Add Notification","remove":"remove"},"category":{"add_tag":"Add Category","save_add_another":"Save & Add Another","delete_category":"Delete category","delete_this_category":"Delete this category","delete_category_desc":"<strong>If you delete this category</strong>, it will no longer be associated with any posts. Proceed with caution.","show_categories":"Show available categories","child_permissions":"Permissions for this category are managed by the parent category.","select_all":"Select All","choose_roles":"Choose Roles","create_tag":"Create Category","saved_tag":"Category saved.","deleted_tags":"Categories deleted.","manage_tags":"Manage Categories","edit_tag":"Edit Category","editor":{"name":"Category Name","slug":"Category Link","slug_help":"If left blank, will be automatically generated from category name.","description":"Description","type":"Type","color":"Icon Color","icon":"Icon Name","roles_help":"Only selected roles will be able to view this category."},"types":{"category":"Category","status":"Status"},"delete":"Delete"},"tool":{"manage_forms":"Manage Forms","manage_tags":"Manage Categories","manage_users":"Manage Users","manage_roles":"Manage Roles","manage_webhooks":"Manage Webhooks","manage_views":"Manage Views","manage_map_settings":"Manage Map Settings","manage_appearance_settings":"Manage Appearance Settings","manage_plugins":"Manage Plugins","appearance_settings":"Appearance Settings","map_settings":"Map Settings","site_settings":"Site Settings","settings":"Settings","tools":"Tools"},"map_settings":{"admin_map_settings":"Map Settings","saved_map_settings":"Map Settings saved."},"settings":{"api_key":"API Key","api_key_desc":"The API Key is unique to your deployment, it can be used to allow third party systems to interact with your Ushahidi deployment.","appearance":"Appearance Settings","continue":"Continue","create":"Create a new survey","create_open_or_targeted":"Create an open or targeted survey to gather information about Ushahidi.","current_header":"Current background image","customize_your_new_deployment":"Customize your new deployment","embed":"Embed","embed_info":"To embed your map on another site use the code snippet below.","settings_list":{"general":"General","general_desc":"Change your deployment\'s name, description, logo, and other details.","surveys":"Surveys","surveys_desc":"Create and configure the surveys your deployment collects.","data_sources":"Data Sources","data_sources_desc":"Configure email, SMS, and social media channels that help your deployment collect survey data.","import":"Import","import_desc":"Upload survey data to your deployment from a CSV file.","user_settings":"Configure HDX API","user_settings_desc":"Configure your API so that your tagged Ushahidi data can be uploaded to your Humanitarian Data Exchange (HDX) account.","export":"Export data","export_hxl":"Export and tag data","export_desc_hxl":"Export your data as a CSV file or assign tags and attributes to your data and upload directly to a Humanitarian Data Exchange (HDX) account or export as a tagged CSV file.","export_desc":"Export all of your data as a CSV file or choose custom fields to export","users":"Users","users_desc":"Create and manage the people that contribute to your deployment.","roles":"Roles","roles_desc":"Create and manage the type of permissions your users have on your deployment.","categories":"Categories","categories_desc":"Create and manage the categories people can put posts into for improved organization.","webhooks":"Webhooks","webhooks_desc":"Create webhooks that send Ushahidi Platform data to external applications when specific events are triggered.","plans":"Plans","plan_desc":"Your deployment\'s current plan is <strong>{{current_plan}}</strong>."},"user_settings":{"user_settings_desc_1":"Here you can add your unique API key for your Humanitarian Data Exchange (HDX) account.","user_settings_desc_2":"Once set up, this will enable you to upload data directly to a Humanitarian Data Exchange (HDX) account.","user_settings_desc_3":"You can find your API key on your Humanitarian Data Exchange (HDX) profile once you\'re logged in.","view_guide":"View the guide to your API key","hdx_maintainer_id":"HDX Maintainer Id","api_key":"Api key","profile_page":"Found on your Humanitarian Data Exchange (HDX) profile page","valid_key":"A valid key is required","valid_user":"A valid maintainer id is required","api_key_saved":"API key saved! You can now tag your data and upload to a Humanitarian Data Exchange (HDX) account.","start_tagging":"Start tagging data"},"webhooks":{"use_webhook_for":"Use webhook for","enable_source_destination":"Enable Source and Destination Fields","enable_source_destination_desc":"This webhook will only be applied to Surveys of the selected type.","destination":"Destination"},"data_sources":{"associate_with_form":"Import to survey","associate_with_form_desc":"All incoming data from {{provider}} will be used to create responses to the survey you choose","data_sources":"Data Sources","enable_provider_message":"Accept survey submissions from this source","hint_turn_on_off":"You can configure options for data sources, and then turn sources on and off.","hint_plugin_needs_configuring":"You need to configure this data source before you can enable it.","provider_options":"Options","configure":"Configure","options":"Options","saving_changes":"Saving","unavailable":"The datasource {{value}} is unavailable. <a href=\\"/settings/plan\\">Upgrade your plan</a> to get it!","email":{"email_desc":"This will be used to send outgoing emails","incoming_server_type":"Incoming Server Type","incoming_server_type_pop":"POP","incoming_server_type_imap":"IMAP","incoming_server":"Incoming Server","incoming_server_desc":"Examples: mail.yourwebsite.com, imap.gmail.com, pop.gmail.com","incoming_server_port":"Incoming Server Port","incoming_server_port_desc":"Common ports: 110 (POP3), 143 (IMAP), 995 (POP3 with SSL), 993 (IMAP with SSL)","incoming_server_security":"Incoming Server Security","server_security_none":"None","server_security_SSL":"SSL","server_security_TLS":"TLS","incoming_username":"Incoming Username","username_desc":"Email account username","incoming_password":"Incoming Password","password_desc":"Email account password","outgoing_server_type":"Outgoing Server Type","outgoing_server_type_SMTP":"SMTP","outgoing_server_type_sendmail":"sendmail","outgoing_server_type_native":"Native","outgoing_server":"Outgoing Server","outgoing_server_desc":"Examples: smtp.yourhost.com, smtp.gmail.com","outgoing_server_port":"Outgoing Server Port","outgoing_server_port_desc":"Common ports: 25 (SMTP default), 465 (SMTP with SSL)","outgoing_server_security":"Outgoing Server Security","outgoing_username":"Outgoing Username","outgoing_password":"Outgoing Password","email_address":"Email Address","email_sender_name":"Email Sender Name","email_sender_name_desc":"Appears in the \'from:\' field on outgoing emails"},"sms":{"secret":"Secret","api_key_desc":"The API key","frontline_sms":{"api_key":"Key","secret_desc":"Set a secret so that only authorized FrontlineCloud accounts can send/recieve message. You need to configure the same secret in the FrontlineCloud Activity."},"nexmo":{"from":"From","from_desc":"The from number","secret_desc":"The secret value","api_key":"API Key","api_secret":"API secret","api_secret_desc":"The API secret"},"smssync":{"intro_step_1":"Step 1: Download the \'SMSSync\' app from the Android Market.","intro_step_1_desc":"Scan this QR Code with your phone to download the app from the Android Market","intro_step_2":"Step 2: Android App Settings","intro_step_2_desc":"Turn on SMSSync and use the following link as the Sync URL: ","secret_desc":"Set a secret so that only authorized SMSSync devices can send/recieve message. You need to configure the same secret in the SMSSync App."},"twilio":{"phone_nb":"Phone Number","phone_nb_desc":"The from phone number. A Twilio phone number enabled for the type of message you wish to send. ","account_sid":"Account SID","account_sid_desc":"The unique id of the Account that sent this message.","auth_token":"Auth Token","sms_auto_response":"SMS Auto response"}},"twitter":{"intro_step_1":"Step 1: Create a new Twitter application: <br />Twitter applications may take a few hours or days to be approved by Twitter.<br />Please be aware of this if you need this data quickly.","intro_step_1_desc":"Create a <a href=\\"https://apps.twitter.com/app/new\\">new twitter application</a>","intro_step_2":"Step 2: Generate a consumer key and secret","intro_step_2_desc":"Once you\'ve created the application click on \\"Keys and Access Tokens\\".<br /> Then click \\"Generate Consumer Key and Secret\\".<br /> Copy keys, tokens and secrets into the fields below.","consumer_key":"Consumer Key","consumer_key_desc":"Add the consumer key from your Twitter app.","consumer_secret":"Consumer Secret","consumer_secret_desc":"Add the consumer secret from your Twitter app.","access_token":"Access Token","access_token_desc":"Add the access token you generated for your Twitter app.","access_token_secret":"Access Token Secret","access_token_secret_desc":"Add the access secret that you generated for your Twitter app.","search_terms":"Twitter search terms","search_terms_desc":"Add search terms separated with commas"}},"roles":{"member":"Member","admin":"Admin","manage_users":"Manage Users","manage_posts":"Manage Posts","manage_settings":"Mangage Settings","bulk_data_import":"Bulk Data Import and Export","edit_own_posts":"Edit their own posts","registred_member":"Registered member","administrator":"Administrator","roles_description":"These options control what this type of role can make changes to. <a href=\\"https://www.ushahidi.com/support/custom-roles#add-a-role\\" target=\\"_blank\\">Visit our support guides to find out more."},"deployment_delete_this":"Delete this deployment","deployment_delete":"Delete deployment","deployment_delete_info":"<strong>If you delete this deployment</strong>, all of its data will also be deleted. Proceed with caution.","deployment_name":"Deployment name","deployment_logo":"Deployment logo","delete_logo":"Delete logo","map_default_baselayer":"Default base layer","map_location_precision":"Map Precision Level","map_precise_to":"When hide location is enabled for a survey, locations will be precise to: ","map_clustering":"Combine nearby posts","map_default_latitude":"Default latitude","map_default_longitude":"Default longitude","map_default_zoom_level":"Default zoom level","map_default_location":"Default location","new_survey":"New Survey","send_targeted":"Send a targeted survey via SMS","send_crowdsourced":"Go back to crowd-sourced survey","site":"Site Settings","site_email":"Contact email address","site_email_note":"Use caution, as this will be visible to anyone on your site.","site_description":"Describe your site","site_description_placeholder":"An optional one sentence description","site_timezone":"Site timezone","site_language":"Site language","site_private":"Make this deployment private","site_private_desc":"Enabling this option makes your deployment and it’s data only accessible to registered users with the correct privileges, who must sign in for access","select_image":"Select image","saved_settings":"Deployment settings saved!","saved_map_settings":"Map settings saved!","features":{"features":"Features","please_select_features":"Please select the features you would like to enable."},"generic_field_error":"Invalid entry, please try again.","skip":"Skip this task","add_first_post":"Add Your First Post","add_first_post_subtitle":"A deployment is nothing until it has some content in it.","invite_people":"Or invite people to help you create posts.","add_new_users":"Add New Users","valid":{"name":{"required":"Site name is required"}}},"data_import":{"survey_field":"Survey field","csv_column":"CSV column","choose_which_column":"Choose which CSV column should be assigned to each survey field","each_survey_field":"Each of the survey\'s fields are listed below. Choose the column from your CSV file that you\'d like to use to populate each of those fields.","status_explanation":"Ushahidi recognizes one of three post statuses: Published, Under review, and Archived. So be sure that each entry in the column you select has one of those three values.","defined_column":"Defined by a column in your CSV file...","imported_posts_status":"Imported posts should have their status...","marked_as":"Marked as...","see_imported_posts":"See imported posts","import_another_csv":"Import another CSV file","import_complete":"Your import is complete","complete_info":"The data from your CSV spreadsheet, <em>{{filename}}</em>, was successfully imported.","import_another":"Import another CSV file","nearly_complete":"Your import is nearly complete","finish_info":"The data from your CSV spreadsheet is still being processed. You\'re welcome to leave this page or wait until the process is complete. Either way, we\'ll notify you when your data is ready.","next":"Next","configure_imported_posts":"Configure imported posts","configure_explanation":"Through this interface you can set values for the survey fields that were not mapped to entries in the CSV. These values will be the same for all imported posts.","import":"Import","import_explanation_csv":"Import the data from a CSV spreadsheet into your deployment as posts belonging to a specific survey","import_explanation_file_size":"The size for a single file is limited to 10 MB","import_explanation_format_location_1":"Geographic locations should be included as separate latitude and longitude columns in your CSV","import_explanation_required_fields":"All required survey fields must have an associated value set in the CSV. For example, if the field title is required then the field must be mapped to a CSV column where all rows of that column have a value set","configure_posts":"Configure Posts","configure_all_imported_posts":"Configure all imported posts","csv":"CSV","file_csv":"CSV file","import_csv":"Import CSV","import_to":"Import to ","choose_csv_file":"Choose CSV file","organize_data":"Organize data","organize_your_imported_data":"Assign CSV columns to post fields","assign_csv_message":"Assign CSV columns to post fields","csv_instructions":"Each of the column names from your CSV file are listed below. Choose the <strong>{{form_name}}</strong> field that you\'d like each column to be imported to.","csv_instructions_required_fields":"Fields marked with a [*] are required and must be assigned a value.","csv_column_name":"CSV column name","post_type_title":"{{form_name}} field name","leave_empty":"Leave empty","cancel_import":"Cancel import","finish_import":"Finish import","which_survey":"which survey?"},"data_export":{"title":"Export data","title_hxl":"Export and tag data","description":"Export all of your data as a CSV or choose specific survey fields you want to export.","description_hxl":"Export all of your data from Ushahidi as a CSV, choose specific survey fields you want to export as a CSV or assign","export":"Export","export_history":"Export History","hxl_tags":"HXL tags","hxl_attributes":"HXL attributes","and_choose":"and choose to upload to an","HDX":"Humanitarian Data Exchange","account":"account or download as a HXL \'tagged\' CSV file.","all":"Export all data","select_fields":"Select fields","select_fields_title":"Select fields for export...","select_fields_desc":"If you don\'t want to export all of your data at once, you can select specific fields from each survey for export.","export_selected":"Export selected fields","cancel":"Cancel","export_progress":"<p>Export in progress... </p><p>You can leave this page if you want. Your export will continue.</p><p> We will let you know when we\'re done.</p>","no_fields":"Uh oh... you need to select some fields to export first.","expires":"<strong>Expires:</strong> {{expires}}","job":"CSV Export {{jobId}}","created":"<strong>Created:</strong> {{created}}","success":"<strong>Status:</strong> Finished","pending":"<strong>Status:</strong> Pending","failed":"<strong>Status:</strong> Failed","queued":"<strong>Status:</strong> In Progress","pending_hdx":"Pending HDX","exported_to_cdn":"Exported to CDN","tags_attributes":"Assign tags and attributes","hxl_apikey_alert_1":"It looks like you haven\'t set up your Humanitarian Data Exchange (HDX) API. Without this set up, you can\'t tag data and upload to a Humanitarian Data Exchange (HDX) account.","hxl_configure":"Configure HDX API","hxl_apikey_alert_2":"We strongly advide you set this up now in","hxl_apikey_alert_3":"before continuing as you won\'t be able to upload your data to HDX","hxl_title":"Assign your HXL tags and attributes, select fields and export or upload","hxl_desc":"Select specific fields from a survey, assign a tag per field and then choose to assign multiple attributes. Preview your tag and attributes in tag preview.","hxl_instructions_1":"You can then choose to export your tagged fields to a CSV file or upload to a","hxl_instructions_2":"Humanitarian Data Exchange (HDX)","hxl_instructions_3":"account that has been set up in","hxl_instructions_4":"Configure HDX API","hxl_instructions_5":"(found in settings menu).","hxl_instructions_6":"Visit the","hxl_instructions_7":"HXL tag assist","hxl_instructions_8":"for more information on how to choose the best HXL tags and attributes for your data or the","hxl_instructions_9":"HXL \'cheat sheet\'","HXL_tags":"HXL tags","HXL_attributes":"HXL attributes","tag_preview":"Tag preview","upload_title":"Are you ready to upload to an Humanitarian Data Exchange (HDX) account?","hdx_csv_title":"Are you ready to export to CSV?","upload_desc":"You selected {{fields}} fields to upload to a Humanitarian Data Exchange (HDX) account. <br /> <br /> You assigned tags and attributes - to check, you can go back. If you are done, you can add details and upload. <br /> <br /> The Humanitarian Data Exchange (HDX) requires a few more details in order to upload to their system. You\'ll add these next","hdx_csv_desc":"You selected {{fields}} fields to export to CSV.<br /> <br /> You assigned tags and attributes - to check these are correct, you can go back and check. If you\'re done, you can export.","upload_button":"Add dataset details and upload to hdx","export_button":"Export to csv","go_back":"Go back and check","add_details":"Add details","details_desc":"To upload to the Humanitarian Data Exchange (HDX) some extra details are required.","privacy_title":"Privacy Settings","privacy_desc":"You have a choice of sharing your dataset publicly or restricting access to other members of the organisation which owns the dataset.","this_dataset":"This data set is:","private_desc":"<strong>Private</strong> (Only you and other HDX members of your organisation can <strong>search, view/edit</strong> or <strong> download </strong> this dataset)","public_desc":"<strong>Public</strong> (Anyone can <strong>search, view/edit</strong> or <strong> download </strong> this dataset)","dataset":"Dataset Title & Description","dataset_desc":"When users search for data on HDX, their search terms will be matched to terms in your title. Avoid using abbreviations in the title which may not be familiar to all users. Also, avoid using words such as current, latest or previous when referring to the time period (e.g Latest 3W) as these terms become misleading as the dataset ages.","dataset_example":"Example dataset title: <strong>Who is Doing What Where in Afghanistan, Jan-Dec 2015</strong>","dataset_title":"Title of data set","metadata_title":"Metadata","metadata_desc":"Metadata is additional information about your dataset that will make it easier for others to understand and put your data into context. Datasets on HDX must include a set of metadata fields.","source":"Source","organisation":"Organisation","select_organisation":"Select an organisation","license":"License","add_license":"Add license","read_more_licenses":"Read more about licenses","submit_hdx":"Submit to HDX Account","uploading_data":"Uploading data...","uploading_data_desc":"The data upload to your Humanitarian Data Exchange (HDX) account is in progress... <br /> <br />You can navigate away from this page while this upload happens but please don\'t close the browser.","uploading_data_err":"Uh oh... Something went wrong when uploading your data, please check the required fields and your api-key and try again.","no_fields_selected":"You haven\'t selected any fields or assigned any hxl tags or attributes. Please select at least one field and assign at least one tag to be able to export to CSV or upload to a Humanitarian Data Exchange (HDX) account.","validation":{"title":"A title is needed","source":"Source is needed","organisation":"An organisation is needed","license":"A license is needed","all_fields":"Please fill in all required fields"}},"user":{"role_display":"Role: {{role}}","contact":"{{type}}: {{contact}}","add_user":"Add User","edit_user":"Edit User","update_password":"Update Password","change_role":"Change Role","save":"Save User","save_add_another":"Save & Add Another","show_all_roles":"Show All Roles","cannot_delete_yourself":"You cannot delete your own user","cannot_change_your_own_role":"You cannot change your own role","confirm_password":"Confirm Password","delete_user":"Delete user","delete_this_user":"Delete this user","delete_user_desc":"<strong>If you delete this user</strong>, posts created by this user will no longer have author information. This cannot be undone. Proceed with caution.","edit_profile":"Edit Profile","save_profile":"Save Profile","cancel":"Cancel","email":"Email Address","failed_attempts":"Failed attempts: ","full_name":"Display Name","never":"Never","no_full_name":"No display name","number_of_users_shown":"Number of users shown","per_page":"{{count}} users","password":"Password","new_password":"New Password","register":"Register","role":"Role: ","roles":"Roles","saved_user":"User saved","deleted_user":"User deleted","search_and_filter":"Search & Filter Users","passwordreset_instructions":"Enter your email to request a password reset","passwordreset_confirm_instructions":"If your email exists in our database, you will receive a password recovery email soon.","token":"Password reset token","valid":{"full_name":{"required":"Display name is required","maxlength":"Display name is too long"},"email":{"required":"Email address is required","email":"This email address is invalid","maxlength":"This email address is too long"},"password":{"required":"Password is required","minlength":"This password is too short","maxlength":"This password is too long"}}},"user_profile":{"title":"account settings","update_password":"Update password","update_success":"Your profile was updated successfully. You may need to sign out and back in before all your changes are reflected.","button":{"save":"Save & close","cancel":"Cancel"},"nav":{"general":"General","notifications":"Notifications"}},"user_create":{"full_name":"Display Name","email":"Email Address","role":"Role"},"notify":{"api_key":{"change_question":"Are you sure you want to change the API Key?"},"contact":{"save_success":"Contact saved","delete_confirm":"Do you want to remove your account?","error_message":"An error occurred while trying to remove your account","destroy_success":"Account removed successfully"},"default":{"proceed_warning":"This action cannot be undone. Please proceed with caution.","save_success":"Saved resource","save_error":"Unable to save resource, please try again","destroy_confirm":"Are you sure you want to delete this resource?","destroy_success":"Deleted resource","destroy_error":"Unable to delete resource, please try again","destroy_cancelled":"Delete cancelled","bulk_destroy_confirm":"Are you sure you want to delete {{count}} resources?","bulk_destroy_success":"Deleted resource","bulk_destroy_error":"Unable to delete resource, please try again","bulk_destroy_cancelled":"Delete cancelled"},"data_import":{"see_imported_posts":"See imported posts","file_missing":"Please choose a CSV file to upload.","form_missing":"Please select a Survey.","csv_upload":"File {{name}} successfully uploaded","csv_import_processed_errors":"<strong>Your CSV import</strong> is complete. {{processed}} records imported, {{errors}} records failed.","csv_import_success_info":"The data from your CSV spreadsheet, <em>{{filename}}</em>, was successfully imported into your <a href=\\"/views/list\\">{{form_name}}</a> survey.","duplicate_fields":"Columns must be mapped to unique survey fields. The following columns have more than 1 mapping: {{duplicates}}","required_fields":"Required fields must be set to a value. The following fields have not been set: {{required}}","empty_mapping":"The CSV file you uploaded is empty. Please check your CSV file and try again","empty_mapping_empty":"The CSV file does not contain column names. Please check your CSV file and try again","no_mappings":"No fields have been assigned mappings - at least one field must be mapped to continue","csv_import_cancel":"CSV import cancelled","csv_import_cancel_confirm":"Are you sure you want to cancel importing?"},"general_settings":{"save_success":"General settings saved"},"map_settings":{"save_success":"Map settings saved"},"generic":{"okay":"Ok","alerts":"Alerts","confirm":"Confirmation","save":"Save"},"login":{"failed":"Login failed, check your email and password."},"register":{"failed":"There were errors during registration. Check your input and try again.","success":"Registration complete! You can now log in.."},"post":{"delete_image_confirm":"Are you sure you want to remove this image?","save_success":"Post {{name}} saved","save_success_review":"Post {{name}} saved. Your post will be reviewed by a moderator before publishing.","save_error":"Unable to save post, please try again","publish_success":"Post has been published for {{role}}","set_draft":"Post is now visible to just you","publish_error":"Unable to publish post, please try again","unpublish_success":"Post has been unpublished","unpublish_error":"Unable to unpublish post, please try again","yes_confirm_delete":"Yes, delete this post","confirm_delete":"Confirm Delete","destroy_title":"Delete Post","delete_question":"Are you sure you want to delete your post {{post}}?","destroy_success":"Post deleted","destroy_success_bulk":"Posts deleted","destroy_confirm":"Are you sure you want to delete this post?","destroy_error":"Unable to delete post, please try again","bulk_destroy_confirm":"Are you sure you want to delete {{count}} posts?","stage_save_success":"Updated {{stage}}","export":"This will export filtered posts. Are you sure you want to continue?","update_status_success_bulk":"Status updated for {{count}} posts","leave_without_save":"Do you want to leave this post without saving?","leave_confirm_message":"If you continue, all of your changes will be lost","leave_confirm":"Continue without saving"},"category":{"save_success":"Saved category {{name}}","destroy_confirm":"Are you sure you want to delete this category?","destroy_confirm_desc":"Deleting this category will remove it from all existing posts. This action cannot be undone.","destroy_success":"Category deleted","destroy_error":"Unable to delete category, please try again","bulk_destroy_confirm":"Are you sure you want to delete {{count}} categories?","bulk_destroy_confirm_desc":"Deleting these categories will remove them from all existing posts. This action cannot be undone.","bulk_destroy_success":"{{count}} categories deleted"},"role":{"delete_question":"Are you sure you want to delete the role {{role}}?","destroy_success":"Role {{role}} deleted.","save_success":"Role {{role}} saved.","last_admin":"You can not delete the only admin role"},"webhook":{"delete_question":"Are you sure you want to delete the webhook {{webhook}}?","destroy_success":"Webhook {{webhook}} deleted.","save_success":"Webhook {{webhook}} saved."},"datasource":{"save_success":"Saved Data Source {{name}}"},"user":{"save_success":"User {{name}} saved","edit_success":"User {{name}} updated","destroy_confirm":"Are you sure you want to delete this user?","destroy_success":"User deleted","destroy_error":"Unable to delete user, please try again","bulk_destroy_confirm":"Are you sure you want to delete {{count}} users?","bulk_destroy_success":"Users deleted","bulk_role_change_confirm":"Are you sure you want to change the role of {{count}} users to {{role}}?","bulk_role_change_success":"User roles changed to {{role_name}}"},"video":{"incorrect_url":"The URL, {{url}}, you entered did not match either a Youtube or Vimeo URL format."},"form":{"add_to_survey":"Add to survey","save_success":"Survey {{name}} saved","save_stage_success":"Survey task {{name}} saved","save_attribute_success":"Field {{name}} added","edit_form_success":"Survey {{name}} updated","edit_stage_success":"Survey task {{name}} updated","delete_form_confirm":"Are you sure you want to delete this survey?","delete_form_confirm_desc":"This action cannot be undone. Deleting this survey will remove all of its data, including posts.","destroy_form_success":"Survey {{name}} deleted","delete_stage_confirm":"Are you sure you want to delete this task?","delete_stage_confirm_desc":"This action cannot be undone. Deleting this task will remove all of its fields, and any data in them.","destroy_stage_success":"Survey task {{name}} deleted","delete_attribute_confirm":"Are you sure you want to delete this field?","delete_attribute_confirm_desc":"This action cannot be undone. Deleting this field will remove its data from all existing posts.","destroy_attribute_success":"Field {{name}} deleted","validation":{"name":{"required":"A survey-name is needed","minlength":"Name is too short","maxlength":"Name is too long"},"description":{"required":"Description cannot be empty"}}},"collection":{"delete_collection_confirm":"Are you sure you want to delete this collection?","created_collection":"Collection {{collection}} created successfully","updated_collection":"Collection {{collection}} saved","add_to_collection":"Post has been added to {{collection}}","removed_from_collection":"Post has been removed from {{collection}}","bulk_add_to_collection":"{{count}} posts have been added to {{collection}}"},"savedsearch":{"delete_savedsearch_success":"Saved search deleted successfully.","delete_savedsearch_plural_success":"Saved searches deleted successfully.","delete_savedsearch_confirm":"Are you sure you want to delete this saved search?","savedsearch_updated":"{{savedsearch}} was updated","savedsearch_saved":"{{savedsearch}} was saved"},"passwordreset":{"failed":"Password reset failed","success":"Your password has been reset"},"notification":{"add":"You will now be notified when new posts are added to {{set}}","delete_confirm":"Are you sure you want to remove this notification?","destroy_success":"<strong>You will no longer receive notifications about</strong> {{name}}."},"message":{"sent_to":"Message sent to {{contact}}"},"export":{"in_progress":"We are preparing your CSV file. This may take a few moments. You can leave this page if you want. We will let you know when we\'re done.","complete":"Export done. You should see your CSV-file in your downloads.","complete_data_found_message":"The data from your export can be found in your browser\'s downloads","confirmation":"Got it","cancel_export":"Cancel export","canceled_job":"Your export-job is canceled","upload_complete":"Upload complete. You should now see your tagged data in your HDX account."}},"empty":{"default":"No records found.","post":"No posts found.","user":"No users found.","category":"No categories found.","role":"No roles found.","webhook":"No webhooks found.","permission":"No permissions found.","form":"No forms found."},"location":{"search":"Search","use_current_location":"Use your current location","click_map":"<em>You can search or click the area of map where you want to place the marker.</em>","placeholder":"Search for addresses, place names, or coordinates...","search_results":"Search results","error":"Sorry we could not find a location matching your search","my_location_error":"Sorry we could not find your location","update_map":"Update map","no_matching_locations":"No matching locations"},"notification":{"title":"Notifications","contacts_heading":"How you get notifications","notifications_heading":"What you get notified about","error_message":"The notification could not be deleted at this time","send_to_address":"Send notifications to this address","button":{"delete":"Delete notification"}},"contact":{"edit":"Edit","save_changes":"Save changes","saving_changes":"Saving changes","cancel_edit":"Cancel","add_phone_number":"Add a phone number","add_email_address":"Add an email address","edit_phone_number":"Edit your phone number","edit_email_address":"Edit your email address","error_message":"The contact could not be saved at this time","type":{"phone":"Phone","email":"Email"},"button":{"add":"Add account","delete":"Remove account"},"valid":{"email":{"required":"An email address is required to receive notifications","email":"This email address is invalid","maxlength":"This email address is too long"},"phone":{"required":"A phone number is required to receive notifications","pattern":"A valid phone number is required","minlength":"This number is too short","maxlength":"This number is too long"}}},"terms_of_service":{"title":"Ushahidi Terms of Service","terms_of_service":"We have updated our <a href=\\"https://www.ushahidi.com/terms-of-service\\" target=\\"_blank\\">Terms and Conditions</a> and <a href=\\"https://www.ushahidi.com/privacy-policy\\" target=\\"_blank\\">Privacy Policy</a>. Please review these documents carefully and accept the terms in order to continue to use Ushahidi\'s services.","agree":"I agree to Ushahidi\'s Terms of Service.","accept_and_continue":"Accept and Continue"},"languages":{"ach":"Acoli","ady":"Adyghe","af":"Afrikaans","af-ZA":"Afrikaans (South Africa)","ak":"Akan","sq":"Albanian","sq-AL":"Albanian (Albania)","aln":"Albanian Gheg","am":"Amharic","am-ET":"Amharic (Ethiopia)","ar":"Arabic","ar-EG":"Arabic (Egypt)","ar-SA":"Arabic (Saudi Arabia)","ar-SD":"Arabic (Sudan)","ar-SY":"Arabic (Syria)","ar-AA":"Arabic (Unitag)","an":"Aragonese","hy":"Armenian","hy-AM":"Armenian (Armenia)","as":"Assamese","as-IN":"Assamese (India)","ast":"Asturian","ast-ES":"Asturian (Spain)","az":"Azerbaijani","az@Arab":"Azerbaijani (Arabic)","az-AZ":"Azerbaijani (Azerbaijan)","az-IR":"Azerbaijani (Iran)","az@latin":"Azerbaijani (Latin)","bal":"Balochi","ba":"Bashkir","eu":"Basque","eu-ES":"Basque (Spain)","bar":"Bavarian","be":"Belarusian","be-BY":"Belarusian (Belarus)","be@tarask":"Belarusian (Tarask)","bn":"Bengali","bn-BD":"Bengali (Bangladesh)","bn-IN":"Bengali (India)","brx":"Bodo","bs":"Bosnian","bs-BA":"Bosnian (Bosnia and Herzegovina)","br":"Breton","bg":"Bulgarian","bg-BG":"Bulgarian (Bulgaria)","my":"Burmese","my-MM":"Burmese (Myanmar)","ca":"Catalan","ca-ES":"Catalan (Spain)","ca@valencia":"Catalan (Valencian)","ceb":"Cebuano","tzm":"Central Atlas Tamazight","hne":"Chhattisgarhi","cgg":"Chiga","zh":"Chinese","zh-CN":"Chinese (China)","zh-CN.GB2312":"Chinese (China) (GB2312)","gan":"Chinese (Gan)","hak":"Chinese (Hakka)","zh-HK":"Chinese (Hong Kong)","czh":"Chinese (Huizhou)","cjy":"Chinese (Jinyu)","lzh":"Chinese (Literary)","cmn":"Chinese (Mandarin)","mnp":"Chinese (Min Bei)","cdo":"Chinese (Min Dong)","nan":"Chinese (Min Nan)","czo":"Chinese (Min Zhong)","cpx":"Chinese (Pu-Xian)","zh-Hans":"Chinese Simplified","zh-TW":"Chinese (Taiwan)","zh-TW.Big5":"Chinese (Taiwan) (Big5) ","zh-Hant":"Chinese Traditional","wuu":"Chinese (Wu)","hsn":"Chinese (Xiang)","yue":"Chinese (Yue)","cv":"Chuvash","ksh":"Colognian","kw":"Cornish","co":"Corsican","crh":"Crimean Turkish","hr":"Croatian","hr-HR":"Croatian (Croatia)","cs":"Czech","cs-CZ":"Czech (Czech Republic)","da":"Danish","da-DK":"Danish (Denmark)","dv":"Divehi","doi":"Dogri","nl":"Dutch","nl-BE":"Dutch (Belgium)","nl-NL":"Dutch (Netherlands)","dz":"Dzongkha","dz-BT":"Dzongkha (Bhutan)","en":"English","en-AU":"English (Australia)","en-AT":"English (Austria)","en-BD":"English (Bangladesh)","en-BE":"English (Belgium)","en-CA":"English (Canada)","en-CL":"English (Chile)","en-CZ":"English (Czech Republic)","en-ee":"English (Estonia)","en-FI":"English (Finland)","en-DE":"English (Germany)","en-GH":"English (Ghana)","en-HK":"English (Hong Kong)","en-HU":"English (Hungary)","en-IN":"English (India)","en-IE":"English (Ireland)","en-lv":"English (Latvia)","en-lt":"English (Lithuania)","en-NL":"English (Netherlands)","en-NZ":"English (New Zealand)","en-NG":"English (Nigeria)","en-PK":"English (Pakistan)","en-PL":"English (Poland)","en-RO":"English (Romania)","en-SK":"English (Slovakia)","en-ZA":"English (South Africa)","en-LK":"English (Sri Lanka)","en-SE":"English (Sweden)","en-CH":"English (Switzerland)","en-GB":"English (United Kingdom)","en-US":"English (United States)","myv":"Erzya","eo":"Esperanto","et":"Estonian","et-EE":"Estonian (Estonia)","fo":"Faroese","fo-FO":"Faroese (Faroe Islands)","fil":"Filipino","fi":"Finnish","fi-FI":"Finnish (Finland)","frp":"Franco-Provençal (Arpitan)","fr":"French","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-CH":"French (Switzerland)","fur":"Friulian","ff":"Fulah","ff-SN":"Fulah (Senegal)","gd":"Gaelic, Scottish","gl":"Galician","gl-ES":"Galician (Spain)","lg":"Ganda","ka":"Georgian","ka-GE":"Georgian (Georgia)","de":"German","de-AT":"German (Austria)","de-DE":"German (Germany)","de-CH":"German (Switzerland)","el":"Greek","el-GR":"Greek (Greece)","kl":"Greenlandic","gu":"Gujarati","gu-IN":"Gujarati (India)","gun":"Gun","ht":"Haitian (Haitian Creole)","ht-HT":"Haitian (Haitian Creole) (Haiti)","ha":"Hausa","haw":"Hawaiian","he":"Hebrew","he-IL":"Hebrew (Israel)","hi":"Hindi","hi-IN":"Hindi (India)","hu":"Hungarian","hu-HU":"Hungarian (Hungary)","is":"Icelandic","is-IS":"Icelandic (Iceland)","io":"Ido","ig":"Igbo","ilo":"Iloko","id":"Indonesian","id-ID":"Indonesian (Indonesia)","ia":"Interlingua","iu":"Inuktitut","ga":"Irish","ga-IE":"Irish (Ireland)","it":"Italian","it-IT":"Italian (Italy)","it-CH":"Italian (Switzerland)","ja":"Japanese","ja-JP":"Japanese (Japan)","jv":"Javanese","kab":"Kabyle","kn":"Kannada","kn-IN":"Kannada (India)","pam":"Kapampangan","ks":"Kashmiri","ks-IN":"Kashmiri (India)","csb":"Kashubian","kk":"Kazakh","kk@Arab":"Kazakh (Arabic)","kk@Cyrl":"Kazakh (Cyrillic)","kk-KZ":"Kazakh (Kazakhstan)","kk@latin":"Kazakh (Latin)","km":"Khmer","km-KH":"Khmer (Cambodia)","rw":"Kinyarwanda","ky":"Kirgyz","tlh":"Klingon","kok":"Konkani","ko":"Korean","ko-KR":"Korean (Korea)","ku":"Kurdish","ku-IQ":"Kurdish (Iraq)","lad":"Ladino","lo":"Lao","lo-LA":"Lao (Laos)","ltg":"Latgalian","la":"Latin","lv":"Latvian","lv-LV":"Latvian (Latvia)","lez":"Lezghian","lij":"Ligurian","li":"Limburgian","ln":"Lingala","lt":"Lithuanian","lt-LT":"Lithuanian (Lithuania)","jbo":"Lojban","en@lolcat":"LOLCAT English","lmo":"Lombard","dsb":"Lower Sorbian","nds":"Low German","lb":"Luxembourgish","mk":"Macedonian","mk-MK":"Macedonian (Macedonia)","mai":"Maithili","mg":"Malagasy","ms":"Malay","ml":"Malayalam","ml-IN":"Malayalam (India)","ms-MY":"Malay (Malaysia)","mt":"Maltese","mt-MT":"Maltese (Malta)","mni":"Manipuri","mi":"Maori","arn":"Mapudungun","mr":"Marathi","mr-IN":"Marathi (India)","mh":"Marshallese","mw1":"Mirandese","mn":"Mongolian","mn-MN":"Mongolian (Mongolia)","nah":"Nahuatl","nv":"Navajo","nr":"Ndebele, South","nap":"Neapolitan","ne":"Nepali","ne-NP":"Nepali (Nepal)","nia":"Nias","nqo":"N\'ko","se":"Northern Sami","nso":"Northern Sotho","no":"Norwegian","nb":"Norwegian Bokmål","nb-NO":"Norwegian Bokmål (Norway)","no-NO":"Norwegian (Norway)","nn":"Norwegian Nynorsk","nn-NO":"Norwegian Nynorsk (Norway)","ny":"Nyanja","oc":"Occitan (post 1500)","or":"Oriya","or-IN":"Oriya (India)","om":"Oromo","os":"Ossetic","pfl":"Palatinate German","pa":"Panjabi (Punjabi)","pa-IN":"Panjabi (Punjabi) (India)","pap":"Papiamento","fa":"Persian","fa-AF":"Persian (Afghanistan)","fa-IR":"Persian (Iran)","pms":"Piemontese","en@pirate":"Pirate English","pl":"Polish","pl-PL":"Polish (Poland)","pt":"Portuguese","pt-BR":"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)","ps":"Pushto","ro":"Romanian","ro-RO":"Romanian (Romania)","rm":"Romansh","ru":"Russian","ru-ee":"Russian (Estonia)","ru-lv":"Russian (Latvia)","ru-lt":"Russian (Lithuania)","ru@petr1708":"Russian Petrine orthography","ru-RU":"Russian (Russia)","sah":"Sakha (Yakut)","sm":"Samoan","sa":"Sanskrit","sat":"Santali","sc":"Sardinian","sco":"Scots","sr":"Serbian","sr@Ijekavian":"Serbian (Ijekavian)","sr@ijekavianlatin":"Serbian (Ijekavian Latin)","sr@latin":"Serbian (Latin)","sr-RS@latin":"Serbian (Latin) (Serbia)","sr-RS":"Serbian (Serbia)","sn":"Shona","scn":"Sicilian","szl":"Silesian","sd":"Sindhi","si":"Sinhala","si-LK":"Sinhala (Sri Lanka)","sk":"Slovak","sk-SK":"Slovak (Slovakia)","sl":"Slovenian","sl-SI":"Slovenian (Slovenia)","so":"Somali","son":"Songhay","st":"Sotho, Southern","st-ZA":"Sotho, Southern (South Africa)","sma":"Southern Sami","es":"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-419":"Spanish (Latin America)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-US":"Spanish (United States)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)","su":"Sundanese","sw":"Swahili","sw-KE":"Swahili (Kenya)","ss":"Swati","sv":"Swedish","sv-FI":"Swedish (Finland)","sv-SE":"Swedish (Sweden)","tl":"Tagalog","tl-PH":"Tagalog (Philippines)","tg":"Tajik","tg-TJ":"Tajik (Tajikistan)","tzl":"Talossan","ta":"Tamil","ta-IN":"Tamil (India)","ta-LK":"Tamil (Sri-Lanka)","tt":"Tatar","te":"Telugu","te-IN":"Telugu (India)","tet":"Tetum (Tetun)","th":"Thai","th-TH":"Thai (Thailand)","bo":"Tibetan","bo-CN":"Tibetan (China)","ti":"Tigrinya","to":"Tongan","ts":"Tsonga","tn":"Tswana","tr":"Turkish","tr-TR":"Turkish (Turkey)","tk":"Turkmen","tk-TM":"Turkmen (Turkmenistan)","udm":"Udmurt","ug":"Uighur","ug@Arab":"Uighur (Arabic)","ug@Cyrl":"Uighur (Cyrillic)","ug@Latin":"Uighur (Latin)","uk":"Ukrainian","uk-UA":"Ukrainian (Ukraine)","vmf":"Upper Franconian","hsb":"Upper Sorbian","ur":"Urdu","ur-PK":"Urdu (Pakistan)","uz":"Uzbek","uz@Arab":"Uzbek (Arabic)","uz@Cyrl":"Uzbek (Cyrillic)","uz@Latn":"Uzbek (Latin)","uz-UZ":"Uzbek (Uzbekistan)","ve":"Venda","vec":"Venetian","vi":"Vietnamese","vi-VN":"Vietnamese (Viet Nam)","vls":"Vlaams","wa":"Walloon","war":"Wáray-Wáray","cy":"Welsh","cy-GB":"Welsh (United Kingdom)","fy":"Western Frisian","fy-NL":"Western Frisian (Netherlands)","wo":"Wolof","wo-SN":"Wolof (Senegal)","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu","zu-ZA":"Zulu (South Africa)"},"countries":{"Afghanistan":"Afghanistan","Åland Islands":"Åland Islands","Albania":"Albania","Algeria":"Algeria","American Samoa":"American Samoa","Andorra":"Andorra","Angola":"Angola","Anguilla":"Anguilla","Antarctica":"Antarctica","Antigua and Barbuda":"Antigua and Barbuda","Argentina":"Argentina","Armenia":"Armenia","Aruba":"Aruba","Australia":"Australia","Austria":"Austria","Azerbaijan":"Azerbaijan","Bahamas":"Bahamas","Bahrain":"Bahrain","Bangladesh":"Bangladesh","Barbados":"Barbados","Belarus":"Belarus","Belgium":"Belgium","Belize":"Belize","Benin":"Benin","Bermuda":"Bermuda","Bhutan":"Bhutan","Bolivia, Plurinational State of bolivia":"Bolivia, Plurinational State of bolivia","Bosnia and Herzegovina":"Bosnia and Herzegovina","Botswana":"Botswana","Bouvet Island":"Bouvet Island","Brazil":"Brazil","British Indian Ocean Territory":"British Indian Ocean Territory","Brunei Darussalam":"Brunei Darussalam","Bulgaria":"Bulgaria","Burkina Faso":"Burkina Faso","Burundi":"Burundi","Cambodia":"Cambodia","Cameroon":"Cameroon","Canada":"Canada","Cape Verde":"Cape Verde","Cayman Islands":"Cayman Islands","Central African Republic":"Central African Republic","Chad":"Chad","Chile":"Chile","China":"China","Christmas Island":"Christmas Island","Cocos (Keeling) Islands":"Cocos (Keeling) Islands","Colombia":"Colombia","Comoros":"Comoros","Congo":"Congo","Congo, The Democratic Republic of the Congo":"Congo, The Democratic Republic of the Congo","Cook Islands":"Cook Islands","Costa Rica":"Costa Rica","Cote d\'Ivoire":"Cote d\'Ivoire","Croatia":"Croatia","Cuba":"Cuba","Cyprus":"Cyprus","Czech Republic":"Czech Republic","Denmark":"Denmark","Djibouti":"Djibouti","Dominica":"Dominica","Dominican Republic":"Dominican Republic","Ecuador":"Ecuador","Egypt":"Egypt","El Salvador":"El Salvador","Equatorial Guinea":"Equatorial Guinea","Eritrea":"Eritrea","Estonia":"Estonia","Ethiopia":"Ethiopia","Falkland Islands (Malvinas)":"Falkland Islands (Malvinas)","Faroe Islands":"Faroe Islands","Fiji":"Fiji","Finland":"Finland","France":"France","French Guiana":"French Guiana","French Polynesia":"French Polynesia","French Southern Territories":"French Southern Territories","Gabon":"Gabon","Gambia":"Gambia","Georgia":"Georgia","Germany":"Germany","Ghana":"Ghana","Gibraltar":"Gibraltar","Greece":"Greece","Greenland":"Greenland","Grenada":"Grenada","Guadeloupe":"Guadeloupe","Guam":"Guam","Guatemala":"Guatemala","Guernsey":"Guernsey","Guinea":"Guinea","Guinea-Bissau":"Guinea-Bissau","Guyana":"Guyana","Haiti":"Haiti","Heard Island and Mcdonald Islands":"Heard Island and Mcdonald Islands","Holy See (Vatican City State)":"Holy See (Vatican City State)","Honduras":"Honduras","Hong Kong":"Hong Kong","Hungary":"Hungary","Iceland":"Iceland","India":"India","Indonesia":"Indonesia","Iran, Islamic Republic of Persian Gulf":"Iran, Islamic Republic of Persian Gulf","Iraq":"Iraq","Ireland":"Ireland","Isle of Man":"Isle of Man","Israel":"Israel","Italy":"Italy","Jamaica":"Jamaica","Japan":"Japan","Jersey":"Jersey","Jordan":"Jordan","Kazakhstan":"Kazakhstan","Kenya":"Kenya","Kiribati":"Kiribati","Korea, Democratic People\'s Republic of Korea":"Korea, Democratic People\'s Republic of Korea","Korea, Republic of South Korea":"Korea, Republic of South Korea","Kosovo":"Kosovo","Kuwait":"Kuwait","Kyrgyzstan":"Kyrgyzstan","Laos":"Laos","Latvia":"Latvia","Lebanon":"Lebanon","Lesotho":"Lesotho","Liberia":"Liberia","Libyan Arab Jamahiriya":"Libyan Arab Jamahiriya","Liechtenstein":"Liechtenstein","Lithuania":"Lithuania","Luxembourg":"Luxembourg","Macao":"Macao","Macedonia":"Macedonia","Madagascar":"Madagascar","Malawi":"Malawi","Malaysia":"Malaysia","Maldives":"Maldives","Mali":"Mali","Malta":"Malta","Marshall Islands":"Marshall Islands","Martinique":"Martinique","Mauritania":"Mauritania","Mauritius":"Mauritius","Mayotte":"Mayotte","Mexico":"Mexico","Micronesia, Federated States of Micronesia":"Micronesia, Federated States of Micronesia","Moldova":"Moldova","Monaco":"Monaco","Mongolia":"Mongolia","Montenegro":"Montenegro","Montserrat":"Montserrat","Morocco":"Morocco","Mozambique":"Mozambique","Myanmar":"Myanmar","Namibia":"Namibia","Nauru":"Nauru","Nepal":"Nepal","Netherlands":"Netherlands","Netherlands Antilles":"Netherlands Antilles","New Caledonia":"New Caledonia","New Zealand":"New Zealand","Nicaragua":"Nicaragua","Niger":"Niger","Nigeria":"Nigeria","Niue":"Niue","Norfolk Island":"Norfolk Island","Northern Mariana Islands":"Northern Mariana Islands","Norway":"Norway","Oman":"Oman","Pakistan":"Pakistan","Palau":"Palau","Palestinian Territory, Occupied":"Palestinian Territory, Occupied","Panama":"Panama","Papua New Guinea":"Papua New Guinea","Paraguay":"Paraguay","Peru":"Peru","Philippines":"Philippines","Pitcairn":"Pitcairn","Poland":"Poland","Portugal":"Portugal","Puerto Rico":"Puerto Rico","Qatar":"Qatar","Romania":"Romania","Russia":"Russia","Rwanda":"Rwanda","Reunion":"Reunion","Saint Barthelemy":"Saint Barthelemy","Saint Helena, Ascension and Tristan Da Cunha":"Saint Helena, Ascension and Tristan Da Cunha","Saint Kitts and Nevis":"Saint Kitts and Nevis","Saint Lucia":"Saint Lucia","Saint Martin":"Saint Martin","Saint Pierre and Miquelon":"Saint Pierre and Miquelon","Saint Vincent and the Grenadines":"Saint Vincent and the Grenadines","Samoa":"Samoa","San Marino":"San Marino","Sao Tome and Principe":"Sao Tome and Principe","Saudi Arabia":"Saudi Arabia","Senegal":"Senegal","Serbia":"Serbia","Seychelles":"Seychelles","Sierra Leone":"Sierra Leone","Singapore":"Singapore","Slovakia":"Slovakia","Slovenia":"Slovenia","Solomon Islands":"Solomon Islands","Somalia":"Somalia","South Africa":"South Africa","South Sudan":"South Sudan","South Georgia and the South Sandwich Islands":"South Georgia and the South Sandwich Islands","Spain":"Spain","Sri Lanka":"Sri Lanka","Sudan":"Sudan","Suriname":"Suriname","Svalbard and Jan Mayen":"Svalbard and Jan Mayen","Swaziland":"Swaziland","Sweden":"Sweden","Switzerland":"Switzerland","Syrian Arab Republic":"Syrian Arab Republic","Taiwan":"Taiwan","Tajikistan":"Tajikistan","Tanzania, United Republic of Tanzania":"Tanzania, United Republic of Tanzania","Thailand":"Thailand","Timor-Leste":"Timor-Leste","Togo":"Togo","Tokelau":"Tokelau","Tonga":"Tonga","Trinidad and Tobago":"Trinidad and Tobago","Tunisia":"Tunisia","Turkey":"Turkey","Turkmenistan":"Turkmenistan","Turks and Caicos Islands":"Turks and Caicos Islands","Tuvalu":"Tuvalu","Uganda":"Uganda","Ukraine":"Ukraine","United Arab Emirates":"United Arab Emirates","United Kingdom":"United Kingdom","United States":"United States","Uruguay":"Uruguay","Uzbekistan":"Uzbekistan","Vanuatu":"Vanuatu","Venezuela, Bolivarian Republic of Venezuela":"Venezuela, Bolivarian Republic of Venezuela","Vietnam":"Vietnam","Virgin Islands, British":"Virgin Islands, British","Virgin Islands, U.S.":"Virgin Islands, U.S.","Wallis and Futuna":"Wallis and Futuna","Yemen":"Yemen","Zambia":"Zambia","Zimbabwe":"Zimbabwe"},"api":{"providerNotAvailable":"One or more of the enabled providers is not available :param1","range":"The file size should be less than {{param3}} KB","mime_type":"File type not supported. Please upload a .csv file.","not_empty":":field must not be empty","isKeyAvailable":"The key {{value}} is not available","contactIsValid":"Invalid phone number","roleDoesNotExist":"role_id {{value}} does not exist","invalidFormStageId":"form_stage_id :value does not exist","postTypeLimitReached":"limit: {{posttypes}}","dataUrlOrMediaRequired":"One of data_url or media_id is required","dataUrlMediaConflict":"Only one of data_url or media_id can be defined","size_error":"The file size should be less than :param1 MB","mime_type_not_allowed":"File type not supported. Please upload an image file.","mime_not_empty":"MIME type not found. The MIME type must be set for the file.","contact":{"invalid_phone":"Invalid phone number {{param1}}","invalid_email":"Invalid email {{param1}}"},"email":{"title":"{{sitename}} New post: {{title}}","message":"New post on {{sitename}}{{title}}{{content}}View post: {{url}}"},"sms":{"message":"{{sitename}} New post: {{title}}"},"publishedPostsLimitReached":"limit:{{posts}}","tagDoesNotExist":"category :value does not exist","attributeDoesNotExist":"attribute {{param1}} does not exist","tooManyValues":"Too many values for {{param1}} (max: {{param2}})","valueDoesNotExist":"value id {{param2}} for field {{param1}} does not exist","canNotUseExistingValueOnNewPost":"Cannot use existing value {{param2}} for field {{param1}} on a new post","postAttributeRequired":"attribute {{param1}} is required","taskAttributeRequired":"attribute {{param1}} is required before stage {{param2}} can be completed","emptyIdAndLocale":"Must have at least id or locale","emptyParentWithLocale":"Must have at parent id when passing locale","notAnArray":"Post values for {{param1}} must be an array","scalar":"Post values for {{param1}} must be scalar","doesTranslationExist":"Translation {{value}} for post {{param2}} already exists","isSlugAvailable":"field: {{value}} is already in use","published_to":{"exists":"The role you are publishing to {{value}} does not exist"},"stageDoesNotExist":"Stage {{param1}} does not exist","stageRequired":"Stage {{param1}} is required before publishing","postNeedsApprovalBeforePublishing":"Post needs approval by an administrator before it can be published","postCanOnlyBeUnpublishedByAdmin":"Post can only be unpublished by an administrator","alreadyLockedByDifferentUser":"Post is currently locked by a different user and can not be updated.","values":{"date":"The field {{param1}} must be a date, Given: {{param2}}","decimal":"The field {{param1}} must be a decimal with 2 places, Given: {{param2}}","digit":"The field {{param1}} must be a digit, Given: {{param2}}","email":"The field {{param1}} must be an email address, Given: {{param2}}","exists":"The field {{param1}} must be a valid post id, Post id: {{param2}}","tagExists":"The field {{param1}} must be a valid category id or name, Category: {{param2}}","max_length":"The field {{param1}} must not exceed :param2 characters long, Given: {{param2}}","invalidForm":"The field {{param1}} has the wrong post type, Post id:{{param2}}","numeric":"The field {{param1}} must be numeric, Given: {{param2}}","scalar":"The field {{param1}} must be scalar, Given: {{param2}}","point":"The field {{param1}} must be an array of lat and lon","lat":"the field {{param1}} must contain a valid latitude","lon":"the field {{param1}} must contain a valid longitude","url":"The field {{param1}} must be a url, Given: {{param2}}","video_type":"The field {{param1}} must be either a youtube or vimeo url, Given: {{param2}}"},"role":{"isRoleValid":"Role must match the parent category","exists":"Role {{value}} does not exist"},"description_regex":"The description must contain only letters, numbers, spaces and punctuation","regex":"The category name must contain only letters, numbers, spaces and punctuation","isUniqueEmail":"{{field}} is already in use","isUniqueUsername":"{{field}} is already in use","isUserSelf":"You cannot change your own role","adminUserLimitReached":"limit:{{:admin}}"}}')},function(e,t,n){"use strict";e.exports=["$templateCache",function(e){e.put("uib/template/pagination/pagination.html",n(635))}]},function(e,t,n){e.exports='\n<li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" ng-click="selectPage(1, $event)">\n <a ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a>\n</li>\n<li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="prev">\n <a ng-click="selectPage(page - 1, $event)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-left"></use>\n </svg>\n <span class="hidden">Previous</span>\n </a>\n</li>\n<li>\n <ul class="page-numbers">\n <li class="pg-number" ng-repeat="page in pages track by $index" ng-class="{active: page.active}">\n <a ng-if="!page.active" ng-click="selectPage(page.number, $event)">\n {{page.text}}\n </a>\n <span ng-if="page.active">\n {{page.text}}\n </span>\n </li>\n </ul>\n</li>\n<li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="next" >\n <a ng-click="selectPage(page + 1, $event)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-right"></use>\n </svg>\n <span class="hidden">Next</span>\n </a>\n</li>\n<li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}">\n <a ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a>\n</li>\n'},function(e,t,n){"use strict";e.exports=["CacheFactoryProvider",function(e){angular.extend(e.defaults,{maxAge:9e5,cacheFlushInterval:36e5,storageMode:"localStorage",storagePrefix:"ush-caches.",deleteOnExpire:"aggressive"})}]},function(e,t,n){"use strict";e.exports=["$stateProvider","$urlMatcherFactoryProvider",function(e,t){t.strictMode(!1),e.state({name:"login",url:"/login",controller:n(638),template:""}).state({name:"forbidden",url:"/forbidden",controller:n(639),template:n(640)}).state({name:"register",url:"/register",controller:n(641),template:""}).state({name:"forgotpassword",url:"/forgotpassword",controller:n(642),template:""}).state({name:"confirm",url:"/forgotpassword/confirm",controller:n(196),template:""}).state({name:"confirm.token",url:"/:token",controller:n(196),template:""}).state({name:"404",url:"/404",controller:n(643),template:n(644)}).state({name:"verifier",url:"/verifier",controller:n(645),template:n(646)})}]},function(e,t,n){"use strict";function s(e,t){e.openLogin(),t.url("/")}(e.exports=s).$inject=["Authentication","$location"]},function(e,t,n){"use strict";e.exports=["$scope",function(e){}]},function(e,t){e.exports='<main role="main">\n <div class="main-col">\n <h1 class="panel-title" translate>nav.forbidden</h1>\n\n <p translate>\n app.forbidden\n </p>\n </div>\n</main>\n'},function(e,t,n){"use strict";function s(e,t){e.openRegister(),t.url("/")}(e.exports=s).$inject=["Registration","$location"]},function(e,t,n){"use strict";e.exports=["PasswordReset","$location",function(e,t){e.openReset(),t.url("/")}]},function(e,t,n){"use strict";e.exports=["$scope",function(e){}]},function(e,t){e.exports='<main role="main">\n <div class="main-col">\n <h1 class="panel-title" translate>nav.404</h1>\n\n <p translate>\n app.404\n </p>\n </div>\n</main>'},function(e,t,n){"use strict";e.exports=["$scope","CONST","Verifier",function(t,e,n){var s,i,a,o;t.networkCheck=!0,t.envCheck=!0,t.endpointStatuses=[],t.endpointStructureChecks=[],t.transifexCheck=!0,t.oauthCheck=!0,t.dbConnection=!0,t.apiEnvs=!0,t.allDisabled=n.isCheckDisabled(e,"ALL"),t.allDisabled||((s=n.verifyNetwork(e))?s.then(function(e){t.networkCheck=e,t.$apply()}):t.networkCheck=!1,t.envCheck=n.verifyEnv(e),(i=n.verifyEndpointStatus(e))?i.forEach(function(e){e.then(function(e){t.endpointStatuses.push(e),t.$apply()})}):t.endpointStatuses=!1,(a=n.verifyEndpointStructure(e))?a.forEach(function(e){e.then(function(e){t.endpointStructureChecks.push(e),t.$apply()})}):t.endpointStructureChecks=!1,t.transifexCheck=n.verifyTransifex(e),(o=n.verifyOauth(e))?(o.status.then(function(e){t.oauthStatus=e,t.$apply()}),o.structure.then(function(e){t.oauthStructure=e,t.$apply()}),o.token.then(function(e){t.oauthToken=e,t.$apply()})):t.oauthCheck=!1,n.verifyDbConnection(e).then(function(e){"DISABLED"===e?t.dbConnection=!1:(t.dbConnection=e,t.$apply())}),n.verifyAPIEnvs(e).then(function(e){"DISABLED"===e?t.apiEnvs=!1:(t.apiEnvs=e,t.$apply())}))}]},function(e,t,n){e.exports='<div>\n <layout-class layout="b"></layout-class>\n <main role="main">\n <div class="main-col">\n <div class="listing card init" ng-if="allDisabled">\n <strong>USH_DISABLE_CHECKS is set to ALL, all verification processes is turned off.</strong>\n <p>If you believe this is wrong, check the .env file for the variable USH_DISABLE_CHECKS.</p>\n </div>\n <div class="listing card init" ng-if="!allDisabled">\n <h1>Installer helper</h1>\n <p>Check the messages below to get hints while installing the Ushahidi-platform!</p>\n <div class="listing-item"></div>\n <div class="listing-item">\n <h3 class="list-item-title">Checking network...</h3>\n <div class="listing-item" ng-if="!networkCheck">\n <p>Check is disabled. If you think this is incorrect, please check USH_DISABLED_CHECKS in your .env-file.</p>\n </div>\n <div class="listing-item" ng-if="networkCheck">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use style="fill: #de0000" ng-if="networkCheck.type === \'error\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="networkCheck.type === \'confirmation\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #FFC334" ng-if="networkCheck.type === \'warning\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="networkCheck.url">Status-result for {{networkCheck.url}}</strong>\n <p ng-if="networkCheck.status">The server responded with a {{networkCheck.status}}-status code</p>\n <p class="class="list-item-secondary" ng-repeat="message in networkCheck.messages">{{message}}</p>\n </div>\n </div>\n </div>\n <div class="listing-item">\n <h3 class="list-item-title">Checking endpoints...</h3>\n <h4 class="list-item-title">Checking status for endpoints...</h4>\n <div class="listing-item" ng-if="!endpointStatuses">\n <p>Check for endpoint-status is disabled. If you think this is incorrect, please check USH_DISABLED_CHECKS in your .env-file.</p>\n </div>\n <div class="listing-item" ng-repeat="endpoint in endpointStatuses" ng-if="endpointStatuses">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use style="fill: #de0000" ng-if="endpoint.type === \'error\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="endpoint.type === \'confirmation\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #FFC334" ng-if="endpoint.type === \'warning\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="endpoint.url">Status-result for {{endpoint.url}}</strong>\n <p ng-if="endpoint.status">The server responded with a {{endpoint.status}}-status code</p>\n <p ng-repeat="message in endpoint.messages">{{message}}</p>\n </div>\n </div>\n <h4 class="list-item-title">Checking structure for endpoints...</h4>\n <div class="listing-item" ng-if="!endpointStructureChecks">\n <p>Check for endpoint-status is disabled. If you think this is incorrect, please check USH_DISABLED_CHECKS in your .env-file.</p>\n </div>\n <div class="listing-item" ng-repeat="endpoint in endpointStructureChecks" ng-if="!isCheckDisabled(\'ENDPOINT_STRUCTURE\')">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic" >\n <use style="fill: #de0000" ng-if="endpoint.type === \'error\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="endpoint.type === \'confirmation\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #FFC334" ng-if="endpoint.type === \'warning\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="endpoint.url">Structure-result for {{endpoint.url}}</strong>\n <p ng-repeat="message in endpoint.messages">{{message}}</p>\n </div>\n </div>\n </div>\n <div class="listing-item">\n <h3>Checking Oauth-endpoint...</h3>\n <div class="listing-item" ng-if="!oauthStatus">\n <p>Check is disabled. If you think this is incorrect, please check USH_DISABLED_CHECKS in your .env-file.</p>\n </div>\n <div class="listing-item" ng-if="oauthStatus">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic" >\n <use style="fill: #de0000" ng-if="oauthStatus.type === \'error\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="oauthStatus.type === \'confirmation\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #FFC334" ng-if="oauthStatus.type === \'warning\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="oauthStatus.url">Status-result for {{oauthStatus.url}}</strong>\n <p>The server responded with a {{oauthStatus.status}}-status code</p>\n <p ng-repeat="message in oauthStatusCheck.messages">{{message}}</p>\n </div>\n <div class="listing-item">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic" >\n <use style="fill: #de0000" ng-if="oauthStructure.type === \'error\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="oauthStructure.type === \'confirmation\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #FFC334" ng-if="oauthStructure.type === \'warning\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="oauthStructure.url">Checking the structure for {{oauthStructure.url}}</strong>\n <p ng-repeat="message in oauthStructure.messages">{{message}}</p>\n </div>\n </div>\n <div class="listing-item">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use style="fill: #de0000" ng-if="oauthToken.type === \'error\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="oauthToken.type === \'confirmation\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #FFC334" ng-if="oauthToken.type === \'warning\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="oauthToken.messages">Checking that the oauth-token is working</strong>\n <p ng-repeat="message in oauthToken.messages">{{message}}</p>\n </div>\n </div>\n </div>\n </div>\n <div class="listing-item">\n <h3>Checking environment variables in the client...</h3>\n <div class="listing-item" ng-if="!envCheck">\n <p>Check is disabled. If you think this is incorrect, please check USH_DISABLED_CHECKS in your .env-file.</p>\n </div>\n <div class="listing-item" ng-if="envCheck">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use style="fill: #de0000" ng-if="envCheck.type === \'error\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="envCheck.type === \'confirmation\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #FFC334" ng-if="envCheck.type === \'warning\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="envCheck.messages">Checking that there is an .env file in the client </strong>\n\n <p ng-repeat="message in envCheck.messages">{{message}}</p>\n </div>\n </div>\n </div>\n <div class="listing-item">\n <h3>Checking Transifex</h3>\n <div class="listing-item" ng-if="!transifexCheck">\n <p>Check is disabled. If you think this is incorrect, please check USH_DISABLED_CHECKS in your .env-file.</p>\n </div>\n <div class="listing-item" ng-if="transifexCheck">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use style="fill: #de0000" ng-if="transifexCheck.type === \'error\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="transifexCheck.type === \'confirmation\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #FFC334" ng-if="transifexCheck.type === \'warning\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="transifexCheck">Checking if there are credentials for Transifex</strong>\n\n <p ng-repeat="message in transifexCheck.messages">{{message}}</p>\n </div>\n </div>\n </div>\n <div class="listing-item" >\n <h3>Checking Database-connection</h3>\n <div class="listing-item" ng-if="!dbConnection">\n <p>Check is disabled. If you think this is incorrect, please check USH_DISABLED_CHECKS in your .env-file.</p>\n </div>\n <div class="listing-item" ng-if="dbConnection">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use style="fill: #de0000" ng-if="dbConnection.errors" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="dbConnection.success" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #5294ff" ng-if="dbConnection.type === \'info\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#info"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="dbConnection">Checking that the database is connected</strong>\n <div ng-if="dbConnection.success" ng-repeat="result in dbConnection.success">\n <p>{{result.message}}</p>\n <p>{{result.explainer}}</p>\n </div>\n <div ng-if="dbConnection.errors" ng-repeat="result in dbConnection.errors">\n <p>{{result.message}}</p>\n <p>{{result.explainer}}</p>\n </div>\n <div ng-if="dbConnection.type === \'info\'">\n <p>{{dbConnection.message}}</p>\n </div>\n </div>\n </div>\n <div class="listing-item">\n <h3>Checking environment-variables in the API...</h3>\n <div class="listing-item" ng-if="!apiEnvs">\n <p>Check is disabled. If you think this is incorrect, please check USH_DISABLED_CHECKS in your .env-file.</p>\n </div>\n <div class="listing-item" ng-if="apiEnvs">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use style="fill: #de0000" ng-if="apiEnvs.errors" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n <use style="fill: #4fab2f" ng-if="apiEnvs.success" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-check"></use>\n <use style="fill: #5294ff" ng-if="apiEnvs.type === \'info\'" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#info"></use>\n </svg>\n </div>\n <strong class="list-item-secondary" ng-if="apiEnvs">Checking that there is an .env file in the backend</strong>\n\n <div ng-if="apiEnvs.success" ng-repeat="result in apiEnvs.success">\n <p>{{result.message}}</p>\n <p>{{result.explainer}}</p>\n </div>\n <div ng-if="apiEnvs.errors" ng-repeat="result in apiEnvs.errors">\n <p>{{result.message}}</p>\n <p>{{result.explainer}}</p>\n </div>\n <div ng-if="apiEnvs.type === \'info\'">\n <p>{{apiEnvs.message}}</p>\n </div>\n </div>\n </div>\n </div>\n <div class="listing-item" ng-if="(apiEnvs || dbConnection) && (!apiEnvs || apiEnvs.success) && (!dbConnection || dbConnection.success)">\n <h3>Checking if API Install Debug mode should be disabled...</h3>\n <div class="listing-item">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use style="fill: #FFC334" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n </div>\n <div>\n <p>For security reasons, we recommend NOT leaving some check routines enabled in the API.</p>\n <p>You may disable those checks now by running the "composer installdebug:disable" command in the API folder.</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$rootScope","$location",function(n,e){n.globalLayout="layout-a",n.setLayout=function(e){n.globalLayout=e},n.modalVisible=!1,n.demoBarVisible=!1,n.toggleModalVisible=function(e,t){t?n.demoBarVisible=void 0!==e?e:!n.demoBarVisible:n.modalVisible=void 0!==e?e:!n.modalVisible}}]},function(e,t,n){"use strict";e.exports=["$rootScope","$translate","TranslationService","Languages",function(e,t,n,s,i){e.rtlEnabled=!1,e.switchRtl=function(){e.rtlEnabled=!e.rtlEnabled},n.getLanguage().then(function(e){var t;t=e,n.translate(t)})}]},function(e,t){e.exports='<svg class="ushahidi-logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 273.5 266.5" xml:space="preserve">\n <g>\n <circle cx="248.8" cy="207.1" r="21.6"/>\n <path d="M239.8,81.7c7.9-6.6,12.9-16.5,12.9-27.6c0-19.8-16.1-35.9-35.9-35.9c-7,0-13.6,2.1-19.1,5.5\n c-2.1-6.2-8-10.7-15-10.7c-5.1,0-9.6,2.4-12.5,6.1c-9.9-3-20.4-4.6-31.3-4.6c-40.6,0-75.9,22.1-94.8,54.9\n c-23.2,3-41.3,22.8-41.3,46.9c0,21.3,14.1,39.3,33.6,45.2c7.7,20.9,21.6,38.8,39.4,51.5c10.6,28.7,38.2,49.2,70.5,49.2\n c38.4,0,70.1-28.9,74.6-66.1c17-19.3,27.3-44.5,27.3-72.2C248.2,108.9,245.2,94.7,239.8,81.7 M139,209.4\n c-47.3,0-85.6-38.3-85.6-85.6S91.7,38.2,139,38.2s85.6,38.3,85.6,85.6C224.5,171.1,186.2,209.4,139,209.4"/>\n <circle cx="25.1" cy="57.9" r="12.3"/>\n <g>\n <path d="M137,198.5c0.5,0,1.1,0.1,1.6,0.1c-0.4,0-0.8,0-1.3-0.1C137.2,198.5,137.1,198.5,137,198.5z"/>\n <path d="M70,94.5L70,94.5l-0.1,0.2l0,0C69.9,94.6,70,94.6,70,94.5z"/>\n <path d="M177.5,57.6c-0.1-0.1-0.2-0.1-0.3-0.2c-0.1,0-0.1-0.1-0.2-0.1C177.2,57.5,177.3,57.5,177.5,57.6z"/>\n <path d="M153.9,190.5c-8.7-0.5-18.3-2.3-28.1-5.3c-2.9,5.8-5.2,9.3-6.8,10c5.8,1.7,11.4,2.8,16.6,3.1\n c0.2,0,0.4,0,0.6,0C142.2,198.4,148.3,195.7,153.9,190.5z"/>\n <path d="M136.3,198.4c-0.1,0-0.1,0-0.2,0c0.3,0,0.6,0,0.9,0c0.1,0,0.2,0,0.3,0C136.9,198.5,136.6,198.4,136.3,198.4z"\n />\n <path d="M77.2,81c0.1-0.2,0.3-0.4,0.4-0.6C77.4,80.7,77.3,80.8,77.2,81z"/>\n <path d="M176,189.2c1.1-0.6,2.2-1.3,3.2-2c-5.3,2.4-12.5,3.6-20.9,3.4c-6,5.2-12.6,7.9-19.3,7.9c0.3,0,0.6,0,0.9,0\n c11.3,0,21.9-2.5,31.5-6.9l0.3-0.2C173,190.8,174.5,190,176,189.2z"/>\n <path d="M118.2,195.4c2.7,0.8,5.4,1.4,8.1,1.9c-2.6-0.5-5.2-1.1-7.8-1.9H118.2z"/>\n <path d="M116.8,194.9c0.4,0.1,0.9,0.3,1.3,0.4L117,195L116.8,194.9z"/>\n <path d="M129,197.8c-0.7-0.1-1.3-0.2-2-0.3C127.7,197.5,128.4,197.7,129,197.8z"/>\n <path d="M74.8,84.9l1.4-2.3C75.7,83.3,75.2,84.1,74.8,84.9z"/>\n <path d="M97.7,185.7c-0.1-0.1-0.2-0.1-0.3-0.2C97.6,185.6,97.7,185.6,97.7,185.7z"/>\n <path d="M106.9,190.9c-2.1-1-4.2-2.1-6-3.2l-0.6-0.4c4.8,3,10,5.4,15.4,7.2h0.1C112.8,193.5,109.8,192.3,106.9,190.9z\n "/>\n <path d="M132.4,198.2c-0.2,0-0.4,0-0.6-0.1C132,198.1,132.2,198.1,132.4,198.2z"/>\n <path d="M94.8,183.6c-0.1-0.1-0.2-0.2-0.4-0.3c0.6,0.4,1.1,0.8,1.7,1.2c-0.3-0.2-0.7-0.5-1.1-0.8\n C95,183.7,94.9,183.7,94.8,183.6z"/>\n <path d="M135.7,198.4c-0.5,0-1-0.1-1.5-0.1c0.9,0.1,1.9,0.1,2.8,0.2c-0.3,0-0.6,0-0.9,0\n C135.9,198.4,135.8,198.4,135.7,198.4z"/>\n <path d="M93.3,136.7c-9-6-15.8-12.4-20.2-18.5c-3.7,10.9-4.3,21.3-2.4,30.7c3.8,5.4,9.9,10.9,17.7,16.2\n C88.1,157.2,89.6,147.5,93.3,136.7z"/>\n <path d="M92.7,170.6c0.4,7.3,2.6,12.7,6.4,15.8c2.2,1.3,4.6,2.6,7.1,3.8c3.2,1.5,6.6,2.9,9.9,4\n c0.8-1,2.4-4.7,4.8-10.7c-5.5-1.9-11-4.1-16.3-6.6C100.2,174.9,96.3,172.8,92.7,170.6z"/>\n <path d="M94.8,132.7c4.2-10.9,10-21.6,16.8-31.3c-7.7-5.2-13.7-10.7-17.5-16c-8.4,8.3-15.2,18.1-19.5,28.8\n C79,120.3,85.9,126.6,94.8,132.7z"/>\n <path d="M95.6,79.7c9-7.6,19.5-13.6,30.6-17.3c-1.7-3-2.2-5.8-1.3-8.1c-11.5,1.5-22.3,5.5-31.5,11.7\n C91.9,69.9,92.7,74.6,95.6,79.7z"/>\n <path d="M204.1,120.9c-5.4,2.5-12.8,3.6-21.3,3.5c-0.2,11.9-2.1,23.9-5.6,34.9c9.8,0.2,18.4-1.2,24.6-4\n C205.2,144.3,205.8,132.5,204.1,120.9z"/>\n <path d="M170.6,163.3c-10.3-0.6-21.6-2.7-33.2-6.2c-3.8,10.7-7.4,19.5-10.4,25.9c10.1,3,20.1,4.9,29.1,5.4\n C161.6,182.5,166.6,174,170.6,163.3z"/>\n <path d="M97.3,82.3c3.7,5.1,9.4,10.4,16.8,15.4c7-9.5,14.9-18,23-24.7c-4.4-3-7.8-6.1-9.9-9.1\n C116.4,68,106.1,74.4,97.3,82.3z"/>\n <path d="M160.6,188.6c8.6,0.1,16.1-1,21.6-3.6c7.8-6.2,14.2-14.8,18.2-25.6c-6.3,2.9-14.8,4.2-24.7,4\n C171.8,174.2,166.5,182.6,160.6,188.6z"/>\n <path d="M150.8,114.6c9.6,2.9,19.1,4.6,27.7,5.2c0.3-11.8-0.9-23.4-3.3-33.8c-5-0.3-10.6-1.4-16.3-3.1\n C156.7,92.5,154,103.3,150.8,114.6z"/>\n <path d="M69.8,94.9c-0.4,1.1-0.9,2.2-1.3,3.3l0.2-0.5L69.8,94.9z"/>\n <path d="M203.3,116.6c-2.3-11.5-7-22.6-13.6-32.5c-3.1,1.4-7.3,2.1-12.1,2c3.2,10.4,5,22,5.1,33.9\n C191,120.1,198.1,119,203.3,116.6z"/>\n <path d="M207.9,113.8c3.3-2.7,4.7-6.1,4.5-9.9c-3.3-10.2-9.2-19.5-17.3-27.3c0.1,2.2-0.7,4.3-2.7,5.9\n c-0.4,0.3-0.8,0.6-1.2,0.9c7,9.6,12,20.6,14.6,31.9C206.6,114.8,207.3,114.3,207.9,113.8z"/>\n <path d="M98.1,139.8c-3.7,10.8-5.5,20.3-5.5,28c3.7,2.3,7.8,4.5,12.2,6.6c5.6,2.6,11.3,5,16.9,6.9\n c2.5-6.5,5.8-15.4,9.6-26.1c-6.5-2.2-13-4.8-19.3-7.9C107,144.9,102.4,142.4,98.1,139.8z"/>\n <path d="M127.7,110.4c-4.3-2.1-8.3-4.2-12-6.5c-6.4,10-12,20.9-16.1,31.8c4.3,2.6,8.9,5.1,13.9,7.5\n c6.3,3,12.8,5.6,19.3,7.8c3.9-11,7.9-22.6,11.6-33.8C138.8,115.3,133.2,113.1,127.7,110.4z"/>\n <path d="M178.3,124.3c-8.9-0.6-18.7-2.4-28.7-5.4c-3.3,11.4-7,23.1-10.8,34.1c11.6,3.5,23,5.6,33.2,6.2\n C175.6,148.1,177.7,136.1,178.3,124.3z"/>\n <path d="M118.1,100.2c3.5,2.2,7.4,4.3,11.6,6.3c5.3,2.5,10.7,4.7,16.1,6.5c3.7-11.1,7.1-21.8,10-31\n c-3.2-1.1-6.4-2.4-9.5-3.9c-2.5-1.2-4.7-2.4-6.8-3.7C132.1,81.6,124.7,90.5,118.1,100.2z"/>\n <path d="M210.4,149.8c-0.9,2.3-2.4,4.4-4.6,6.2c-0.8,0.6-1.6,1.2-2.5,1.8c-4.1,10.7-10.6,19.4-18.6,25.8\n c0.5-0.3,0.9-0.6,1.4-1c12.2-9.5,21.4-22.6,25.9-37.7l-1.1,3.4L210.4,149.8z"/>\n <path d="M91.2,66.2c0.7-1.1,1.6-2.1,2.8-3.1c0.3-0.2,0.6-0.5,0.9-0.7l3-2.1c0.4-0.3,0.8-0.6,1.2-0.8\n c-8,5.1-14.9,11.7-20.5,19.3C82.3,74,86.5,69.8,91.2,66.2z"/>\n <path d="M72.6,111c4.3-10.7,11.2-20.4,19.8-28.4c-3-5.2-3.9-10.1-2.2-14.3C82.9,73.8,77,80.8,72.6,89\n c-1,1.9-1.9,3.9-2.7,5.6C68.1,99.4,69.1,105.1,72.6,111z"/>\n <path d="M142.4,47.6c0.6,0,1.2,0,1.8,0.1C143.6,47.7,143,47.7,142.4,47.6z"/>\n <path d="M131.4,62.4c1.9,2.7,5,5.5,8.9,8.1c7.6-5.8,15.3-10,22.6-12C152.4,57.6,141.7,59,131.4,62.4z"/>\n <path d="M131.3,51.2c-0.6,0.5-1,1-1.4,1.6c10.7-0.4,21.9,1.4,32.9,5.9c-8.3-6-17-9.2-25.4-10.1\n C134.9,49,132.8,49.9,131.3,51.2z"/>\n <path d="M69.9,94.7L69.9,94.7v-0.2C70,94.6,69.9,94.6,69.9,94.7z"/>\n <path d="M71.1,115.1c-3.3-5.7-4.4-11-2.9-15.7c-2.4,7.4-3.8,15.4-3.8,23.6c0,5.9,0.7,11.6,2,17.1c0.5,2,1.4,4,2.6,6.1\n C66.9,136.6,67.4,126,71.1,115.1z"/>\n <path d="M129.4,53.8c-0.9,2.1-0.4,4.6,1.1,7.3c10.5-3,21.6-3.9,32.3-2.5C151.6,54.5,140.2,53,129.4,53.8z"/>\n <path d="M155.5,49.2c-0.3,0-0.5-0.1-0.7-0.1c3.2,0.7,6,3.7,8,9.5c3.3-3.9,5.6-5.4,7-4.8c0.8,0.3,1.8,0.8,2.6,1.2\n c-2.2-1-5.4,0.1-9.6,3.6c8.9-0.7,16.5,1,22.6,4.6c-2.1-1.8-4.7-3.7-7.6-5.4c-0.1-0.1-0.2-0.1-0.3-0.2c-0.1-0.1-0.3-0.2-0.4-0.2\n c-0.4-0.2-0.8-0.5-1.2-0.7l0,0c-0.3-0.2-0.6-0.3-0.9-0.5c-6.3-3.3-13.2-5.8-20.5-7.2l0.3,0.1L155.5,49.2z"/>\n <path d="M175.8,56.7c0.2,0.1,0.5,0.3,0.7,0.4c-0.4-0.3-0.9-0.5-1.4-0.7C175.4,56.4,175.6,56.6,175.8,56.7L175.8,56.7z\n "/>\n <path d="M77.2,165c-0.8-1.2-1.6-2.5-2.3-3.6l-0.2-0.3c-2.1-3.6-3.7-7.4-4.9-11.4c-1-1.8-1.8-3.5-2.3-5.1\n c2.4,8,6,15.4,10.8,22.1c-0.3-0.4-0.6-0.9-0.9-1.3C77.3,165.2,77.2,165.1,77.2,165z"/>\n <path d="M142.1,47.6c-0.8,0-1.5-0.1-2.3-0.1c-3.4,0-6.8,0.3-10.2,0.7c2.1-0.3,4.2-0.4,6.3-0.3\n C137.9,47.7,140,47.6,142.1,47.6z"/>\n <path d="M97.2,60.9c-1.1,0.9-2,1.9-2.7,2.9c9.1-6,19.7-9.7,31.1-10.8c0.4-0.6,0.9-1.2,1.6-1.7c1.7-1.4,4-2.4,6.8-3\n c-3.4-0.1-6.8,0.3-10,1c1.6-0.3,3.7-0.7,5.4-1c-11,1.5-21.2,5.4-30.1,11.2l-1.2,0.9C97.7,60.5,97.4,60.7,97.2,60.9z"/>\n <path d="M152.3,48.6c-4.8-0.8-9.3-0.9-13-0.4c7.9,0.9,16,4.3,23.6,10.4C159.9,52.7,156.2,49.4,152.3,48.6z"/>\n <path d="M151.9,48.5h0.3c-1.8-0.3-3.5-0.5-5.3-0.7h0.1C148.4,48.1,150.4,48.3,151.9,48.5z"/>\n <path d="M189.4,66.3c3.1,3,5,6.1,5.6,8.9c8,7.3,13.9,16.4,17.2,26.3c-0.1-0.6-0.3-1.2-0.5-1.8l0,0\n c-3.8-11.8-10.5-22.3-19.2-30.8l0.7,0.6C192,68.4,190.7,67.3,189.4,66.3z"/>\n <path d="M148.4,75.2c2.8,1.3,5.6,2.5,8.5,3.4c2.6-8.3,4.6-15.2,5.9-20c-6.5,2.4-13.5,7.1-20.4,13.3\n C144.2,73,146.3,74.1,148.4,75.2z"/>\n <path d="M179.6,58.9c-0.7-0.4-1.4-0.8-2.1-1.2c0.1,0,0.1,0.1,0.2,0.1C178.2,58.1,178.8,58.4,179.6,58.9z"/>\n <path d="M213.5,107.7c0.2,3.9-1.3,7.5-4.7,10.3c-0.7,0.5-1.4,1-2.1,1.5c2,11.4,1.5,23.2-1.9,34.2\n c0.9-0.6,1.7-1.1,2.5-1.8c2.4-2,4-4.4,4.8-7c2.1-6.9,3.2-14.3,3.2-21.9c0-1.7-0.1-3.3-0.2-5c-0.1-1.1-0.2-2-0.2-2.8\n C214.6,112.7,214.2,110.2,213.5,107.7z"/>\n <path d="M215,116c-0.1-0.6-0.1-1.1-0.2-1.6c0,0.3,0.1,0.6,0.1,0.9C214.9,115.5,215,115.8,215,116z"/>\n <path d="M95,183.8c0.5,0.4,1,0.7,1.6,1.1c-4.4-3.5-7.1-9.3-8-16.8c-7.6-5.1-13.4-10.5-17.1-15.6\n c1.3,4.5,3.2,8.8,5.6,12.6c0.1,0.1,0.1,0.2,0.2,0.3c0.3,0.5,0.6,0.9,0.9,1.3c4.4,6.2,9.7,11.7,15.7,16.3c0.3,0.2,0.6,0.4,0.8,0.6\n C94.9,183.7,95,183.7,95,183.8z"/>\n <path d="M186.8,64.6c-6.5-4-14.6-6.2-24-6c11.3,2.7,21.1,7.5,29.1,14C191.3,70.1,189.6,67.3,186.8,64.6z"/>\n <path d="M174.1,82.2c-2.6-9.3-6.4-17.5-11.3-23.6c-0.3,5.1-1.5,12.4-3.2,20.9C164.6,81,169.6,81.9,174.1,82.2z"/>\n <path d="M187.2,80.5c-6.6-8.8-14.8-16.4-24.4-21.9c5.7,6.2,10.3,14.3,13.6,23.7C180.7,82.3,184.5,81.8,187.2,80.5z"/>\n <path d="M181.4,60.1c0.5,0.3,1,0.7,1.5,1C182.4,60.7,181.9,60.4,181.4,60.1z"/>\n <path d="M190.2,66.8l0.7,0.7C190.7,67.3,190.5,67.1,190.2,66.8z"/>\n <path d="M188.6,79.8c0.4-0.2,0.7-0.5,1.1-0.8c1.7-1.5,2.5-3.2,2.4-5.2c-8-6.8-17.9-12.1-29.2-15.2\n C172.9,63.8,181.6,71.2,188.6,79.8z"/>\n <line class="st4" x1="70" y1="94.5" x2="69.9" y2="94.8"/>\n <path d="M77.2,165c0.1,0.1,0.1,0.2,0.2,0.3C77.3,165.2,77.2,165.1,77.2,165z"/>\n <path d="M78.3,166.7L78.3,166.7L78.3,166.7c-0.3-0.4-0.6-0.9-0.9-1.3C77.7,165.8,78,166.3,78.3,166.7z"/>\n <path d="M175.8,56.7L175.8,56.7L175.8,56.7z"/>\n </g>\n </g>\n</svg>\n'},function(e,t,n){"use strict";var a=g(n(185)),s=g(n(197)),o=g(n(662)),i=g(n(664)),r=g(n(665)),l=p(n(666)),c=p(n(667)),d=p(n(668)),u=p(n(669));function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}function m(t,e){var n=void 0;return(0,r.default)(t,e).then(function(e){switch(e.status.toString()){case"200":n={type:"confirmation",messages:["All is good. This is the expected result."],url:e.url,status:e.status};break;case"404":case"403":n={type:"error",messages:["Make sure the API's BACKEND_URL in the .env file is the base URL to your Platform API."],url:e.url,status:e.status};break;case"500":n={type:"error",messages:["Oh noes. This does not look good.","Please check storage/logs in the Platform API, and see what the logs say about this error."],url:e.url,status:e.status}}return n}).catch(function(e){return n={type:"error",messages:["The server could not be reached or there was an error in the request","Make sure the BACKEND_URL is in your .env-file",e],url:t}})}var h=function(e){return(0,r.default)(e).then(function(e){return e}).then(function(e){return"204"===e.status.toString()?{type:"info",message:'This check has been disabled in the Platform API. You may enable it by running "composer installdebug:enable" in the API folder.'}:e.json()}).catch(function(e){return console.log(e),{errors:[{type:"error",message:"The server could not be reached or there was an error in the request",explainer:"Make sure your Platform API is running.Check the storage/logs/lumen.log file in the API server root directory for details"},e]}})},f=function(t,e){return(0,r.default)(t.BACKEND_URL+"/oauth/token",e).then(function(t){switch(t.status.toString()){case"200":return t.json().then(function(e){return y(e,{token_type:"Bearer",expires_in:"",access_token:""},t.url)}).catch(function(e){return{type:"error",messages:["The server could not be reached or there was an error in the request","Make sure your Platform API is running",e]}});case"500":return{type:"error",messages:["Oh noes. This does not look good.","Please check storage/logs in the Platform API, and see what the logs say about this error."],url:t.url};case"401":return{type:"error",messages:["Make sure your database-migrations has ran by running ./phinx migrate in the root directory of the platform API","If you have added your own client id and name, make sure the values in the .env file matches the database."],url:t.url}}}).catch(function(e){return{type:"error",messages:["Oh noes. This does not look good.","Please check storage/logs in the Platform API, and see what the logs say about this error.",e],url:t.BACKEND_URL}})},v=function(t,e){return(0,r.default)(t.BACKEND_URL+"/oauth/token",e).then(function(e){switch(e.status.toString()){case"200":return e.json().then(function(e){return(0,r.default)(t.BACKEND_URL+"/api/v3/forms",{method:"GET",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json",Authorization:"Bearer "+e.access_token}}).then(function(e){switch(e.status.toString()){case"200":return{type:"confirmation",messages:["Token checked and is working. All good!"]};case"500":return{type:"error",messages:["Oh noes. This does not look good.","Please check storage/logs in the Platform API, and see what the logs say about this error."]};case"401":return{type:"error",messages:["Did you add your own client_secret and client_key?","Make sure you updated the database with the same values","If you did not add your own secret and key, check that the database-migration has ran, by running ./phinx migrate in the root directory of the Platform API."]};case"403":return{type:"error",messages:["There is a problem with the oauth-scopes","Check that your Platform API is set up and that all migrations has ran."]}}}).catch(function(e){return{type:"error",messages:["The server could not be reached or there was an error in the request","Make sure your Platform API is running",e]}})}).catch(function(e){return{type:"error",messages:["Oh noes. This does not look good.","Please check storage/logs in the Platform API, and see what the logs say about this error.",e],url:t.BACKEND_URL+"/api/v3/forms"}});case"500":return{type:"error",messages:["Oh noes. This does not look good.","Please check storage/logs in the Platform API, and see what the logs say about this error."],url:t.BACKEND_URL+"/api/v3/forms"};case"401":return{type:"error",messages:["Make sure your database-migrations has ran by running ./phinx migrate in the root directory of the platform API","If you have added your own client id and name, make sure the values in the .env file matches the database."],url:e.url}}}).catch(function(e){return{type:"error",messages:["Oh noes. This does not look good.","Please check storage/logs in the Platform API, and see what the logs say about this error.",e],url:t.BACKEND_URL+"/api/v3/forms"}})},b=function(e,t){if(!e.USH_DISABLE_CHECKS)return!1;var n=e.USH_DISABLE_CHECKS.split(",");return 0<=n.indexOf(t)||0<=n.indexOf("ALL")},y=function(e,t,n){var s=(0,a.default)(e).sort(),i=(0,a.default)(t).sort();return s=s.filter(function(e){return"$promise"!==e&&"$resolved"!==e}),i=i.filter(function(e){return"$promise"!==e&&"$resolved"!==e}),(0,o.default)(s)===(0,o.default)(i)?{type:"confirmation",messages:["The structure for "+n+" matches the expected, all good!"],url:n}:{type:"error",messages:["Oh noes, the structure for "+n+" does not match the expected ","Make sure you have set up the database correctly ","Check that all migrations has ran. You can check this by running ./phinx migrate in the root directory of the Platform API."],url:n}};e.exports={verifyNetwork:function(e){if(!b(e,"NETWORK"))return m(e.BACKEND_URL+"/api/v3/config")},verifyEndpointStatus:function(t){if(!b(t,"ENDPOINT_STATUS")){return["tags","forms","config/features","config/map"].map(function(e){return m(t.BACKEND_URL+"/api/v3/"+e).then(function(e){return e})})}},verifyEndpointStructure:function(t){if(!b(t,"ENDPOINT_STRUCTURE")){return["tags","forms","config/features","config/map"].map(function(s){return(0,r.default)(t.BACKEND_URL+"/api/v3/"+s).then(function(n){return n.json().then(function(e){var t={};switch(s){case"tags":t=c.default;break;case"forms":t=l.default;break;case"config/features":t=d.default;break;case"config/map":t=u.default}return y(e,t,n.url)}).catch(function(e){return{type:"error",messages:["The server could not be reached or there was an error in the request","Make sure your Platform API is running",e],url:t.BACKEND_URL+"/api/v3/"+s}})}).catch(function(e){return{type:"error",messages:["The server could not be reached or there was an error in the request","Make sure your Platform API is running",e],url:t.BACKEND_URL+"/api/v3/"+s}})})}},verifyEnv:function(e){if(!b(e,"ENV")){var t=[];return e.BACKEND_URL||t.push("BACKEND_URL not found in .env file.","Check you have added a .env file and that it contains the BACKEND_URL to connect to the Platform API."),e.BACKEND_URL&&!(0,i.default)(e.BACKEND_URL)&&t.push("BACKEND_URL found in .env file. Is not a valid URL.","Please fix the BACKEND_URL in the .env file to connect to the Platform API."),0<t.length?{type:"error",messages:t}:{type:"confirmation",messages:["All good, the .env file contains required variables"]}}},verifyOauth:function(e){if(!b(e,"OAUTH")){var t={method:"POST",body:(0,o.default)({grant_type:"client_credentials",client_id:e.OAUTH_CLIENT_ID||"ushahidiui",client_secret:e.OAUTH_CLIENT_SECRET||"35e7f0bca957836d05ca0492211b0ac707671261",scope:"forms"}),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"}};return{status:m(e.BACKEND_URL+"/oauth/token",t),structure:f(e,t),token:v(e,t)}}},verifyTransifex:function(e){if(!b(e,"TRANSIFEX"))return e.TX_USERNAME&&e.TX_PASSWORD?{type:"confirmation",messages:["All good, TX_USERNAME and TX_PASSWORD found in .env file."]}:{type:"warning",messages:["TX_USERNAME and TX_PASSWORD not found in .env file. This might be ok if you are only using English, but it will not allow you to use any other languages.","If you need languages other than English, you will need to create a transifex account and setup the TX_USERNAME and TX_PASSWORD variables in the .env file"]}},verifyDbConnection:function(e){return b(e,"DB_CONNECTION")?new s.default(function(e,t){return e("DISABLED")}):h(e.BACKEND_URL+"/api/v3/verifier/db")},verifyAPIEnvs:function(e){return b(e,"API_ENVS")?new s.default(function(e,t){return e("DISABLED")}):h(e.BACKEND_URL+"/api/v3/verifier/env")},isCheckDisabled:b,checkDebugMode:function(e){return(0,r.default)(e).then(function(e){return 200===e.status})}}},,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"count":2,"results":[{"id":1,"url":"http://192.168.33.110/api/v3/forms/1","parent_id":null,"name":"Test Form","description":"Testing form","type":"report","disabled":false,"created":"1970-01-01T00:00:00+00:00","updated":"2015-11-30T15:09:53+00:00","allowed_privileges":["read","create","update","delete","search"]},{"id":2,"url":"http://192.168.33.110/api/v3/forms/2","parent_id":null,"name":"Missing people","description":"Missing persons","type":"report","disabled":false,"created":"1970-01-01T00:00:00+00:00","updated":null,"allowed_privileges":["read","create","update","delete","search"]}],"limit":null,"offset":0,"order":"asc","orderby":"id","curr":"http://192.168.33.110/api/v3/forms?orderby=id&order=asc&offset=0","next":"http://192.168.33.110/api/v3/forms?orderby=id&order=asc&offset=0","prev":"http://192.168.33.110/api/v3/forms?orderby=id&order=asc&offset=0","total_count":2}')},function(e){e.exports=JSON.parse('{"count":6,"results":[{"id":"1","url":"http://v3.ushahidi.com/api/v2/tags/1","parent":null,"tag":"Test tag","slug":"test-tag","type":"category","color":null,"icon":"tag","description":null,"priority":"0","created":"1970-01-01T00:00:00+00:00","role":null,"allowed_methods":["get","post","put","delete"]},{"id":"2","url":"http://v3.ushahidi.com/api/v2/tags/2","parent":null,"tag":"Duplicate","slug":"duplicate","type":"category","color":null,"icon":"tag","description":null,"priority":"0","created":"1970-01-01T00:00:00+00:00","role":null,"allowed_methods":["get","post","put","delete"]},{"id":"3","url":"http://v3.ushahidi.com/api/v2/tags/3","parent":null,"tag":"Disaster","slug":"disaster","type":"category","color":null,"icon":"tag","description":null,"priority":"0","created":"1970-01-01T00:00:00+00:00","role":null,"allowed_methods":["get","post","put","delete"]},{"id":"4","url":"http://v3.ushahidi.com/api/v2/tags/4","parent":{"id":"3","url":"http://v3.ushahidi.com/api/v2/tags/3"},"tag":"Explosion","slug":"explosion","type":"category","color":null,"icon":"tag","description":null,"priority":"0","created":"1970-01-01T00:00:00+00:00","role":null,"allowed_methods":["get","post","put","delete"]},{"id":"5","url":"http://v3.ushahidi.com/api/v2/tags/5","parent":null,"tag":"Todo","slug":"todo","type":"status","color":null,"icon":"tag","description":null,"priority":"0","created":"1970-01-01T00:00:00+00:00","role":null,"allowed_methods":["get","post","put","delete"]},{"id":"6","url":"http://v3.ushahidi.com/api/v2/tags/6","parent":null,"tag":"Done","slug":"done","type":"status","color":null,"icon":"tag","description":null,"priority":"0","created":"1970-01-01T00:00:00+00:00","role":null,"allowed_methods":["get","post","put","delete"]}],"limit":100,"offset":0,"order":"desc","orderby":"created","curr":"http://localhost:8081/api/v2/tags?orderby=created&order=desc&offset=0&limit=100","next":"http://localhost:8081/api/v2/tags?orderby=created&order=desc&offset=100&limit=100","prev":"http://localhost:8081/api/v2/tags?orderby=created&order=desc&offset=0&limit=100","total_count":2}')},function(e){e.exports=JSON.parse('{"id":"features","url":"http://localhost:8081/api/v2/config/features","views":{"map":true,"list":true,"chart":true,"timeline":true,"activity":true},"data-providers":{"smssync":true,"twitter":true,"frontlinesms":true,"email":true,"twilio":true,"nexmo":true},"limits":{"posts":true,"forms":true,"admin_users":true},"private":{"enabled":true},"roles":{"enabled":true},"webhooks":{"enabled":true},"data-import":{"enabled":true},"targeted-surveys":{"enabled":true},"csv-speedup":{"enabled":true},"user-settings":{"enabled":true},"anonymise-reporters":{"enabled":true},"hxl":{"enabled":true},"allowed_privileges":["read","search"]}')},function(e){e.exports=JSON.parse('{"id":"map","url":"http://localhost:8081/api/v2/config/map","clustering":false,"cluster_radius":50,"location_precision":2,"default_view":{"lat":-1.3048035,"lon":36.8473969,"zoom":2,"baselayer":"MapQuest","fit_map_boundaries":true,"icon":"map-marker","color":"blue"},"allowed_privileges":["read","search"]}')},function(e,t,n){"use strict";angular.module("ushahidi.common.adaptive-input",[]).directive("adaptiveForm",function(){return{restrict:"A",controller:["$scope","$element","$attrs",function(e,t,n){this.classAdd=function(e){t.addClass(e)},this.classRemove=function(e){t.removeClass(e)}}]}}).directive("adaptiveInput",function(){return{require:"?^adaptiveForm",restrict:"A",link:function(e,t,n,s){function i(e){e.preventDefault(),s.classAdd("focus")}function a(e){e.preventDefault(),s.classRemove("focus"),t.val()||s.classRemove("value")}t.bind("focus",i),t.bind("blur",a),e.$watch(n.ngModel,function(e){e&&s.classAdd("value")})}}})},function(e,t,n){"use strict";angular.module("ushahidi.common.dropdown",["ui.bootstrap.position"]).constant("dropdownConfig",{openClass:"active",toggleOpenClass:"active",menuOpenClass:"active"}).service("dropdownService",["$document","$rootScope",function(t,s){var i=null;this.open=function(e){i||(t.bind("click",n),t.bind("keydown",a)),i=e},this.close=function(e){i===e&&(i=null,t.unbind("click",n),t.unbind("keydown",a))};var n=function(e){if(i&&(!e||"disabled"!==i.getAutoClose())){var t=i.getToggleElement();if(!(e&&t&&t[0].contains(e.target))){var n=i.getDropdownElement();e&&"outsideClick"===i.getAutoClose()&&n&&n[0].contains(e.target)||(i.isOpen=!1,s.$$phase||i.$apply())}}},a=function(e){27===e.which?(i.focusToggleElement(),n()):i.isKeynavEnabled()&&/(38|40)/.test(e.which)&&i.isOpen&&(e.preventDefault(),e.stopPropagation(),i.focusDropdownEntry(e.which))}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,t,n,e,o,r,l,s,c,d){var u,i,p=this,g=a.$new(),m=e.openClass,h=e.toggleOpenClass,f=e.menuOpenClass,v=angular.noop,b=t.onToggle?n(t.onToggle):angular.noop,y=!1,_=!1;this.init=function(e){p.$element=e,t.isOpen&&(i=n(t.isOpen),v=i.assign,a.$watch(i,function(e){g.isOpen=!!e})),y=angular.isDefined(t.dropdownAppendToBody),_=angular.isDefined(t.keyboardNav),y&&p.dropdownMenu&&(s.find("body").append(p.dropdownMenu),e.on("$destroy",function(){p.dropdownMenu.remove()}))},this.toggle=function(e){return g.isOpen=arguments.length?!!e:!g.isOpen},this.isOpen=function(){return g.isOpen},g.getToggleElement=function(){return p.toggleElement},g.getAutoClose=function(){return t.autoClose||"always"},g.getElement=function(){return p.$element},g.isKeynavEnabled=function(){return _},g.focusDropdownEntry=function(e){var t=p.dropdownMenu?angular.element(p.dropdownMenu).find("a"):angular.element(p.$element).find("ul").eq(0).find("a");switch(e){case 40:angular.isNumber(p.selectedOption)?p.selectedOption=p.selectedOption===t.length-1?p.selectedOption:p.selectedOption+1:p.selectedOption=0;break;case 38:if(!angular.isNumber(p.selectedOption))return;p.selectedOption=0===p.selectedOption?0:p.selectedOption-1}t[p.selectedOption].focus()},g.getDropdownElement=function(){return p.dropdownMenu},g.focusToggleElement=function(){p.toggleElement&&p.toggleElement[0].focus()},g.$watch("isOpen",function(e,t){if(y&&p.dropdownMenu){var n=l.positionElements(p.$element,p.dropdownMenu,"bottom-left",!0),s={top:n.top+"px",display:e?"block":"none"};p.dropdownMenu.hasClass("dropdown-menu-right")?(s.left="auto",s.right=window.innerWidth-(n.left+p.$element.prop("offsetWidth"))+"px"):(s.left=n.left+"px",s.right="auto"),p.dropdownMenu.css(s)}if(r[e?"addClass":"removeClass"](p.$element,m).then(function(){angular.isDefined(e)&&e!==t&&b(a,{open:!!e})}),p.toggleElement&&h&&r[e?"addClass":"removeClass"](p.toggleElement,h),p.dropdownMenu&&f&&r[e?"addClass":"removeClass"](p.dropdownMenu,f),e)p.dropdownMenuTemplateUrl&&d(p.dropdownMenuTemplateUrl).then(function(e){u=g.$new(),c(e.trim())(u,function(e){var t=e;p.dropdownMenu.replaceWith(t),p.dropdownMenu=t})}),g.focusToggleElement(),o.open(g);else{if(p.dropdownMenuTemplateUrl){u&&u.$destroy();var i=angular.element('<ul class="dropdown-menu"></ul>');p.dropdownMenu.replaceWith(i),p.dropdownMenu=i}o.close(g),p.selectedOption=null}v(a,e)}),a.$on("$locationChangeSuccess",function(){"disabled"!==g.getAutoClose()&&(g.isOpen=!1)}),a.$on("$destroy",function(){g.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,s){s.init(t),t.addClass("dropdown")}}}).directive("dropdownMenu",function(){return{restrict:"A",require:"?^dropdown",link:function(e,n,t,s){if(s){var i=t.templateUrl;i&&(s.dropdownMenuTemplateUrl=i),s.dropdownMenu||(s.dropdownMenu=n),t.unpositioned&&e.$watch(function(){return null!==n[0].offsetParent},function(e){if(e){var t={left:n[0].offsetParent.offsetLeft+n[0].parentElement.offsetLeft+"px"};n.css(t)}})}}}}).directive("keyboardNav",function(){return{restrict:"A",require:"?^dropdown",link:function(e,n,t,s){n.bind("keydown",function(e){if(-1!==[38,40].indexOf(e.which)){e.preventDefault(),e.stopPropagation();var t=angular.element(n).find("a");switch(e.keyCode){case 40:angular.isNumber(s.selectedOption)?s.selectedOption=s.selectedOption===t.length-1?s.selectedOption:s.selectedOption+1:s.selectedOption=0;break;case 38:s.selectedOption=0===s.selectedOption?0:s.selectedOption-1}t[s.selectedOption].focus()}})}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(t,n,s,i){if(i){n.addClass("dropdown-toggle"),i.toggleElement=n;var e=function(e){e.preventDefault(),n.hasClass("disabled")||s.disabled||t.$apply(function(){i.toggle()})};n.bind("click",e),n.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(i.isOpen,function(e){n.attr("aria-expanded",!!e)}),t.$on("$destroy",function(){n.unbind("click",e)})}}}})},function(e,t,r){"use strict";angular.module("ushahidi.common.modal",[]).directive("modal",["$translate","$rootScope",function(n,o){return{restrict:"E",transclude:!0,template:r(673),scope:{title:"@?",icon:"=?",visible:"=?",closeOnOverlayClick:"=?",showCloseButton:"=?"},controller:["$scope","$attrs","$parse","$timeout",function(s,e,t,i){s.iconPath=s.icon?"/img/iconic-sprite.svg#"+s.icon:"";var a=null;s.iconPath=r(0)+"#"+s.icon,s.classVisible=!1,s.modalOffset=0,s.title=n.instant(s.title),void 0===s.closeOnOverlayClick&&(s.closeOnOverlayClick=!0),void 0===s.showCloseButton&&(s.showCloseButton=!0),s.$watch("visible",function(e,t){if(!0===e){if(!s.classVisible){s.classVisible=!0,o.toggleModalVisible();var n=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop;s.modalOffset=n+40+"px",a&&i.cancel(a)}}else!1===e&&s.classVisible&&(s.classVisible=!1,o.toggleModalVisible(),a&&i.cancel(a),a=i(function(){s.classDetached=!0},400))}),s.closeModal=function(e){"overlay"===e&&!0!==s.closeOnOverlayClick||(s.visible=!1)},s.$on("$destroy",function(e){a&&i.cancel(a)})}]}}])},function(e,t,n){e.exports='<div ng-show="classVisible" class="modal" style="display: block;">\n <div class="modal-window" ng-style="{ top : modalOffset }">\n <button class="button-beta button-flat modal-trigger modal-trigger-close" ng-show="showCloseButton" ng-click="closeModal()">\n <svg class="iconic">\n \x3c!-- TODO: fix icon to be settable --\x3e\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#x"></use>\n </svg>\n <span class="hidden" translate>modal.button.close</span>\n </button>\n <h3 class="modal-title" ng-if="title">\n <svg class="iconic" ng-if="icon">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{{iconPath}}"></use>\n </svg>\n <span class="label">\n {{ title }}\n </span>\n </h3>\n <ng-transclude></ng-transclude>\n </div>\n <div class="modal-overlay"></div>\n</div>\n'},function(e,t,n){"use strict";angular.module("ushahidi.common.custom-on-change",[]).directive("customOnChange",function(){return{restricet:"A",link:function(e,t,n){var s=e.$eval(n.customOnChange);t.bind("change",s)}}})},function(e,t,n){"use strict";angular.module("ushahidi.user-profile",[]).directive("accountSettings",n(676)).directive("adminUserSetup",n(678)).directive("userProfile",n(680)).directive("notifications",n(682))},function(e,t,s){"use strict";e.exports=["$rootScope","UserEndpoint","ModalService",function(e,t,n){return{restrict:"E",replace:!0,scope:{},template:s(677),link:function(e){e.user=t.getFresh({id:"me"}),e.general=!0,e.notifications=!1,e.showGeneral=function(){e.general=!0,e.notifications=!1},e.showNotifications=function(){e.general=!1,e.notifications=!0},e.$on("event:close",function(){n.close()})}}}]},function(e,t){e.exports='<div>\n <h3 class="modal-title">\n {{user.realname || user.email}} <em translate>user_profile.title</em>\n </h3>\n\n <nav class="tabs-menu init">\n <ul>\n <li ng-class="{\'active\': general}">\n <a ng-click="showGeneral()" translate>\n user_profile.nav.general\n </a>\n </li>\n <li ng-class="{\'active\': notifications}">\n <a ng-click="showNotifications()" translate>\n user_profile.nav.notifications\n </a>\n </li>\n </ul>\n </nav>\n\n <div class="modal-body">\n <user-profile ng-show="general"></user-profile>\n <notifications ng-show="notifications"></notifications>\n </div>\n</div>\n'},function(e,t,s){"use strict";e.exports=["$rootScope","UserEndpoint","ModalService",function(e,t,n){return{restrict:"E",replace:!0,scope:{},template:s(679),link:function(e){e.$on("event:close",function(){n.close()})}}}]},function(e,t){e.exports='<div>\n <div class="modal-body">\n <user-profile admin-user-setup="true"></user-profile>\n </div>\n</div>'},function(e,t,n){"use strict";e.exports=["UserEndpoint","Notify","Session","_","$translate",function(s,i,a,e,t){return{restrict:"E",replace:!0,scope:{adminUserSetup:"="},template:n(681),link:function(n){n.state={success:!1,processing:!1,changingPassword:!1,password:""},n.saveUser=function(e){n.state.success=!1,n.state.processing=!0;var t=angular.copy(e);n.state.changingPassword&&(t.password=n.state.password),s.update({id:"me"},t).$promise.then(function(e){i.notify("user_profile.update_success"),a.setSessionDataEntries({email:e.email,realname:e.realname}),n.state.success=!0,n.state.processing=!1,n.state.changingPassword=!1,n.state.password="",n.user=e,n.$emit("event:close")},function(e){i.apiErrors(e),n.state.processing=!1})},n.cancel=function(){n.$emit("event:close")},n.user=s.getFresh({id:"me"})}}}]},function(e,t){e.exports='<div>\n <p class="alert confirmation" ng-show="state.success" translate>user_profile.update_success</p>\n <form name="form">\n <div class="form-field">\n <label translate="nav.role">Role</label>\n <em>{{user.role}}</em>\n </div> \n <div class="form-field">\n <label class="input-label"\n ng-class="{ \'error\': form.full_name.$invalid && form.full_name.$dirty, \'success\': form.full_name.$valid }"\n for="full_name" translate>user.full_name</label>\n <input id="full_name" name="full_name" type="text"\n ng-class="{ \'error\': form.full_name.$invalid && form.full_name.$dirty }"\n ng-disabled="state.processing"\n placeholder="{{ \'user_create.full_name\'|translate }}"\n ng-maxlength="150"\n ng-model="user.realname"\n required>\n <p ng-repeat="(error, value) in form.full_name.$error"\n ng-show="form.full_name.$dirty"\n class="alert error"\n translate="{{\'user.valid.full_name.\' + error}}"></p>\n </div>\n\n <div class="form-field">\n <label class="input-label"\n ng-class="{ \'error\': form.email.$invalid && form.email.$dirty, \'success\': form.email.$valid }"\n for="email" translate>user.email</label>\n <input id="email" name="email" type="email"\n ng-class="{ \'error\': form.email.$invalid && form.email.$dirty }"\n ng-disabled="state.processing"\n placeholder="{{ \'user_create.email\'|translate }}"\n ng-maxlength="150"\n ng-model="user.email"\n required>\n <p ng-repeat="(error, value) in form.email.$error"\n ng-show="form.email.$dirty||adminUserSetup"\n class="alert error"\n translate="{{\'user.valid.email.\' + error}}"></p>\n </div>\n\n <p ng-hide="state.changingPassword"><a href class="cta change-password" ng-click="state.changingPassword = !state.changingPassword" translate>user_profile.update_password</a></p>\n\n <div ng-if="state.changingPassword">\n <label class="input-label"\n ng-class="{ \'error\': form.password.$invalid && form.password.$dirty, \'success\': form.password.$valid }"\n for="password" translate>user.password</label>\n <input id="password" name="password" type="password"\n ng-class="{ \'error\': form.password.$invalid && form.password.$dirty }"\n ng-disabled="state.processing"\n ng-minlength="7"\n ng-maxlength="72"\n ng-model="state.password"\n required>\n <p ng-repeat="(error, value) in form.password.$error"\n ng-show="form.password.$dirty"\n class="alert error"\n translate="{{\'user.valid.password.\' + error}}"></p>\n </div>\n\n <div class="modal-actions">\n <div class="form-field">\n <button ng-if="!adminUserSetup" type="button" class="button-link" ng-click="cancel()" translate>\n user_profile.button.cancel\n </button>\n\n <button type="submit" class="button button-alpha"\n ng-click="saveUser(user)" ng-disabled="form.$invalid || state.processing">\n <div class="loading" ng-show="saving"><div class="line"></div><div class="line"></div><div class="line"></div></div>\n <span translate>user_profile.button.save</span>\n </button>\n\n </div>\n </div>\n </form>\n</div>\n'},function(e,t,n){"use strict";e.exports=["UserEndpoint","ContactEndpoint","CollectionEndpoint","SavedSearchEndpoint","NotificationEndpoint","Notify","_","$translate","$q",function(e,i,a,o,r,l,c,t,d){return{restrict:"E",replace:!0,scope:{},template:n(683),link:function(s){function t(){r.query({user:"me"}).$promise.then(function(e){c.forEach(e,function(t){a.get({collectionId:t.set.id},function(e){t.name=e.name},function(){o.get({id:t.set.id},function(e){t.name=e.name})})}),s.notifications=e})}function n(){i.queryFresh({user:"me"}).$promise.then(function(t){c.forEach(t,function(e){e.original={contact:e.contact,can_notify:e.can_notify},e.active=!1}),0===t.length&&e.get({id:"me"},function(e){t.push({type:"email",contact:e.email,original:e.email,active:!1,isLoginEmail:!0})}),s.contacts=t})}n(),t(),s.deleteNotification=function(e){l.confirmDelete("notify.notification.delete_confirm").then(function(){r.delete({id:e.id}).$promise.then(function(){l.notify("notify.notification.destroy_success",{name:e.name}),t()},function(){l.error("notification.error_message")})})},s.deleteContact=function(e){l.confirmDelete("notify.contact.delete_confirm").then(function(){i.delete({id:e.id}).$promise.then(function(){l.notify("notify.contact.destroy_success"),n()},function(){l.error("contact.error_message")})})},s.contact={type:"email",active:!1},s.active=!1,s.toggleActive=function(e){e.active=!e.active},s.canUpdate=function(){var e=c.filter(s.contacts,function(e){return!0===e.active});return!c.isEmpty(e)&&c.every(e,function(e){return((t=e).original.contact!==t.contact||t.original.can_notify!==t.can_notify)&&!c.isUndefined(e.contact);var t})},s.canAdd=function(){return s.contact.active?!c.isUndefined(s.contact.contact):c.find(s.contacts,function(e){return!c.isUndefined(e.contact)&&e.isLoginEmail})},s.saveContacts=function(){var e,n=[];s.saving=!0,e=c.filter(s.contacts,function(e){return!c.isUndefined(e.contact)}),c.isUndefined(s.contact.contact)||e.push(s.contact),c.forEach(e,function(e){var t;n.push(((t=e).id||(t.can_notify=!0),i.saveCache(t).$promise))}),d.all(n).then(function(){l.notify("notify.contact.save_success"),s.$emit("event:close")},function(){l.error("contact.error_message")}),s.saving=!1},s.cancel=function(){s.$emit("event:close")}}}}]},function(e,t,n){e.exports='<div class="account-tab">\n <div class="listing">\n\n <h3 class="listing-heading" ng-if="contacts.length !== 0" translate>notification.contacts_heading</h3>\n\n <div class="listing-item"\n ng-repeat="contact in contacts"\n ng-class="{\'active\': contact.active}">\n <div class="listing-item-secondary">\n <button type="button" class="button-link" ng-click="toggleActive(contact)">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="button-label" translate>contact.configure</span>\n </button>\n </div>\n\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n {{contact.contact}}\n <span class="status-indicator" ng-class="{green: contact.can_notify}"></span>\n </h2>\n </div>\n\n \x3c!-- Edit existing contact --\x3e\n <div class="listing-item-body">\n\n <div class="form-field switch">\n <label translate>notification.send_to_address</label>\n <div class="toggle-switch">\n <input class="tgl"\n id="{{contact.id || false}}"\n type="checkbox"\n ng-model="contact.can_notify">\n <label class="tgl-btn" for="{{contact.id || false}}"></label>\n </div>\n </div>\n\n <form name="editContactForm">\n\n <div class="form-field">\n <label ng-if="contact.type === \'email\'"\n class="input-label"\n ng-class="{ \'error\': editContactForm.contact.$invalid && editContactForm.contact.$dirty, \'success\': editContactForm.contact.$valid }"\n for="contact" translate>contact.edit_email_address</label>\n <label ng-if="contact.type === \'phone\'"\n class="input-label"\n for="contact" translate>contact.edit_phone_number</label>\n <p ng-repeat="(error, value) in editContactForm.contact.$error"\n ng-if="contact.type === \'email\'"\n ng-show="editContactForm.contact.$dirty"\n class="alert error"\n translate="{{\'contact.valid.email.\' + error}}"></p>\n <p ng-repeat="(error, value) in editContactForm.contact.$error"\n ng-if="contact.type === \'phone\'"\n ng-show="editContactForm.contact.$dirty"\n class="alert error"\n translate="{{\'contact.valid.phone.\' + error}}"></p>\n\n <input name="contact"\n id="contact"\n ng-if="contact.type === \'email\'"\n type="email"\n ng-class="{ \'error\': editContactForm.contact.$invalid && editContactForm.contact.$dirty }"\n ng-maxlength="150"\n ng-model="contact.contact"\n required>\n <input name="contact"\n id="contact"\n ng-if="contact.type === \'phone\'"\n type="text"\n ng-class="{ \'error\': editContactForm.contact.$invalid && editContactForm.contact.$dirty }"\n ng-maxlength="25"\n ng-model="contact.contact"\n ng-pattern="/^\\+?\\d+$/"\n required>\n </div>\n </form>\n\n <div class="form-field" ng-if="!contact.isLoginEmail">\n <button class="button-destructive" ng-click="deleteContact(contact)" translate>contact.button.delete</button>\n </div>\n\n </div>\n </div>\n\n \x3c!-- Add contact--\x3e\n\n <div class="listing-item"\n ng-class="{\'active\': contact.active}"\n >\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n <a class="button button-flat"\n ng-click="toggleActive(contact)"\n translate>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#plus"></use>\n </svg>\n contact.button.add\n </a>\n </h2>\n </div>\n\n <div class="listing-item-body">\n <form name="addContactForm">\n <div class="form-field">\n <label class="radio-label">\n <input ng-model="contact.type"\n name="email" value="email" id="email" type="radio"\n checked="checked">\n {{\'contact.type.email\' | translate}}\n </label>\n </div>\n\n <div class="form-field">\n <label class="radio-label">\n <input ng-model="contact.type"\n name="phone" value="phone" id="phone" type="radio">\n {{\'contact.type.phone\' | translate}}\n </label>\n </div>\n\n <div class="form-field">\n <label ng-if="contact.type === \'email\'"\n class="input-label"\n ng-class="{ \'error\': addContactForm.contact.$invalid && addContactForm.contact.$dirty, \'success\': addContactForm.contact.$valid }"\n for="contact" translate>contact.add_email_address</label>\n <label ng-if="contact.type === \'phone\'"\n class="input-label"\n for="contact" translate>contact.add_phone_number</label>\n\n <p ng-repeat="(error, value) in addContactForm.contact.$error"\n ng-if="contact.type === \'email\'"\n ng-show="addContactForm.contact.$dirty"\n class="alert error"\n translate="{{\'contact.valid.email.\' + error}}"></p>\n <p ng-repeat="(error, value) in addContactForm.contact.$error"\n ng-if="contact.type === \'phone\'"\n ng-show="addContactForm.contact.$dirty"\n class="alert error"\n translate="{{\'contact.valid.phone.\' + error}}"></p>\n <input name="contact"\n id="contact"\n ng-if="contact.type === \'email\'"\n type="email"\n placeholder="{{\'contact.add_email_address\' | translate}}"\n ng-class="{ \'error\': addContactForm.contact.$invalid && addContactForm.contact.$dirty }"\n ng-maxlength="150"\n ng-model="contact.contact"\n required>\n <input name="contact"\n id="contact"\n ng-if="contact.type === \'phone\'"\n type="text"\n placeholder="{{\'contact.add_phone_number\' | translate}}"\n ng-class="{ \'error\': addContactForm.contact.$invalid && addContactForm.contact.$dirty }"\n ng-maxlength="25"\n ng-model="contact.contact"\n ng-pattern="/^\\d+$/"\n required>\n </div>\n </form>\n </div>\n </div>\n </div>\n\n \x3c!-- Notifications --\x3e\n\n <div class="listing" ng-if="notifications.length !== 0">\n <h3 class="listing-heading" translate>notification.notifications_heading</h3>\n\n <div ng-repeat="notification in notifications"\n class="listing-item">\n <div class="listing-item-secondary">\n <button type="button" class="button-link" ng-click="deleteNotification(notification)">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n <span class="button-label" translate>notification.button.delete</span>\n </button>\n </div>\n\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#star"></use>\n </svg>\n </div>\n\n <h2 class="listing-item-title">{{notification.name}}</h2>\n </div>\n </div>\n\n </div>\n\n <div class="modal-actions">\n <div class="form-field">\n <button type="button" class="button-link" ng-click="cancel()" translate>user_profile.button.cancel</button>\n <button type="button" class="button-alpha"\n ng-disabled="!canAdd() && !canUpdate()"\n ng-click="saveContacts()">\n <div class="loading" ng-show="saving"><div class="line"></div><div class="line"></div><div class="line"></div></div>\n <span translate>user_profile.button.save</span>\n </button>\n\n </div>\n </div>\n</div>\n\n'},function(e,t,n){"use strict";angular.module("ushahidi.main",["ushahidi.posts","ushahidi.activity"]),n(685),n(844)},function(e,t,n){"use strict";angular.module("ushahidi.posts",[]).directive("postActions",n(686)).directive("postMetadata",n(688)).service("PostMetadataService",n(690)).service("PostSurveyService",n(691)).service("PostLockService",n(692)).directive("postLock",n(693)).directive("postMessages",n(695)).directive("postAddForm",n(698)).directive("postValue",n(700)).directive("postMediaValue",n(702)).directive("postVideoView",n(704)).directive("postDetailMap",n(706)).directive("postDetailData",n(708)).service("PostActionsService",n(710)).service("PostEntity",n(711)).service("PostEditService",n(712)).service("MediaEditService",n(713)).directive("postMedia",n(714)).directive("postVideoInput",n(716)).directive("postDatetime",n(720)).directive("postLocation",n(722)).directive("postRelation",n(724)).directive("postEditor",n(726)).directive("postValueEdit",n(728)).directive("postCategoryEditor",n(730)).directive("postTabs",n(732)).directive("postToolbox",n(734)).directive("filterPostSortingOptions",n(736)).directive("filterPostOrderAscDesc",n(738)).directive("filterUnlockedOnTop",n(740)).directive("postDataEditor",n(742)).service("PostViewService",n(744)).directive("postViewMap",n(745)).directive("postViewCreate",n(747)).directive("postCard",n(748)).directive("postPreviewMedia",n(750)).directive("addPostButton",n(752)).directive("addPostSurveyList",n(754)).directive("addPostTextButton",n(756)).directive("modeContext",n(758)).directive("modeContextFormFilter",n(760)).directive("filterBySurvey",n(762)).directive("filterBySurveyDropdown",n(764)).directive("postToolbar",n(765)).directive("filterByDatasource",n(767)).directive("postViewData",n(769)).directive("filterPosts",n(771)).directive("filterCategory",n(773)).directive("filterDate",n(780)).directive("filterForm",n(782)).directive("filterVisibleTo",n(784)).directive("filterStatus",n(786)).directive("filterSource",n(788)).directive("filterLocation",n(790)).directive("filterHasLocation",n(792)).directive("postActiveSearchFilters",n(794)).service("PostFilters",n(796)).service("FilterTransformers",n(797)).directive("filtersDropdown",n(798)).directive("filterSavedSearch",n(800)).directive("sortAndFilterCounter",n(802)).directive("postShare",n(804)).directive("shareMenu",n(806)).directive("shareMenuModal",n(810)).directive("postExport",n(812)).directive("postViewUnavailable",n(814)).directive("savedSearchEditor",n(816)).directive("savedSearchCreate",n(818)).directive("savedSearchUpdate",n(820)).directive("savedSearchModal",n(822)).directive("savedSearchListEditorModal",n(824)).directive("savedSearchModeContext",n(826)).service("CollectionsService",n(828)).directive("collectionModeContext",n(829)).directive("collectionEditor",n(831)).directive("collectionListing",n(833)).directive("collectionToggleButton",n(835)).directive("collectionToggleLink",n(837)).config(n(839)).run(["Leaflet",function(e){e.Icon.Default.imagePath="/img"}])},function(e,t,n){"use strict";function s(s,i,a,e,o,r,l,t){return{restrict:"E",replace:!1,scope:{post:"="},template:n(687),link:function(t){function n(){return!l.isPostLockedForCurrentUser(t.post)}t.deletePost=function(){r.delete(t.post).then(function(){s.$broadcast("event:edit:post:status:data:mode:saveSuccess",{post:t.post,deleted:!0}),o.$current.includes.posts?o.$current.includes["posts.map"]&&o.reload():o.go("posts.data")})},t.updateStatus=function(e){t.post.status=e,i.update(t.post).$promise.then(function(){s.$broadcast("event:edit:post:status:data:mode:saveSuccess",{post:t.post}),a.notify("notify.post.save_success",{name:t.post.title})},function(e){a.apiErrors(e)})},t.openEditMode=function(e){n()?o.go("posts.data.edit",{postId:e}):a.error("post.already_locked")},t.postIsUnlocked=n,t.statuses=r.getStatuses()}}}(e.exports=s).$inject=["$rootScope","PostEndpoint","Notify","$location","$state","PostActionsService","PostLockService","_"]},function(e,t,n){e.exports='<div class="postcard-actions" dropdown >\n <button class="button-gamma button-flat init" data-toggle="dropdown-menu" dropdown-toggle ng-click="$event.stopPropagation()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#ellipses"></use>\n </svg>\n <span class="hidden">More</span>\n </button>\n <div class="dropdown-menu init" dropdown-menu>\n <ul>\n\n\n <li ng-show="(post.allowed_privileges.indexOf(\'update\') !== -1) && postIsUnlocked()">\n <a ng-click="openEditMode(post.id)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#pencil"></use>\n </svg>\n <span class="label" translate="nav.edit">Edit</span>\n </a>\n </li>\n <li>\n \x3c!-- Collection toggle link --\x3e\n <collection-toggle-link post="post"></collection-toggle-link>\n </li>\n <li>\n <post-share post-id="post.id"></post-share>\n </li>\n \x3c!-- <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#task"></use>\n </svg>\n <span class="label">Assign to ...</span>\n </a>\n </li>\n --\x3e\n </ul>\n <div class="divider" ng-show="(post.allowed_privileges.indexOf(\'change_status\') !== -1 || post.allowed_privileges.indexOf(\'update\') !== -1 ) && postIsUnlocked()"></div>\n <ul>\n <li ng-repeat="status in statuses"\n ng-show="post.allowed_privileges.indexOf(\'change_status\') !== -1 && postIsUnlocked()">\n <a ng-click="updateStatus(status)">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#globe" ng-if="status==\'published\'"></use>\n <use xlink:href="'+n(0)+'#box" ng-if="status==\'archived\'"></use>\n <use xlink:href="'+n(0)+'#document" ng-if="status==\'draft\'"></use>\n </svg>\n <span class="label" ng-if="status==\'published\'" translate="post.post_actions.publish">Publish</span>\n <span class="label" ng-if="status==\'draft\'" translate="post.post_actions.put_under_review">Put under </span>\n <span class="label" ng-if="status==\'archived\'" translate="post.post_actions.archive">Archive</span>\n </a>\n </li>\n\n <li ng-show="post.allowed_privileges.indexOf(\'update\') !== -1 && postIsUnlocked()">\n <a ng-click="deletePost()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="label" translate="nav.delete">Delete</span>\n </a>\n </li>\n </ul>\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(e,t,i,a){return{restrict:"E",scope:{post:"=",hideDateThisWeek:"@?"},template:n(689),link:function(n){function s(){var e;n.visibleTo="draft"!==(e=n.post).status?t.isEmpty(e.published_to)?"everyone":e.published_to.join(", "):"draft",n.source=a.formatSource(n.post.source),n.post.user=a.loadUser(n.post),n.post.contact=a.loadContact(n.post),function(){var e=i(n.post.post_date),t=i();t.isSame(e,"day")?n.displayTime=e.fromNow():t.isSame(e,"week")&&n.hideDateThisWeek?n.displayTime=e.format("LT"):n.displayTime=e.format("LL");n.displayTimeFull=e.format("LLL"),n.timeago=e.from(t)}()}n.visibleTo="",n.displayTime="",n.displayTimeFull="",n.timeago="",n.hideDateThisWeek=n.hideDateThisWeek||!1,n.$watch("post.id",function(e,t){e!==t&&s()}),s()}}}(e.exports=s).$inject=["$translate","_","moment","PostMetadataService"]},function(e,t,n){e.exports='<ul class="metadata">\n <div class="listing-item-locked locked" ng-show="$parent.isPostLocked()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#lock-locked"></use>\n </svg>\n </div>\n <li>\n <span class="status-indicator" ng-if="post.status==\'published\'">\n <span class="label" translate="post.status_published" ng-if="post.status==\'published\'">post.status_published</span>\n </span>\n <span class="status-indicator yellow" ng-if="post.status==\'draft\'">\n <span class="label" translate="post.status_review" ng-if="post.status==\'draft\'"></span>\n </span>\n <span class="status-indicator dark" ng-if="post.status==\'archived\'">\n <span class="label" translate="post.status_archived" ng-if="post.status==\'archived\'"></span>\n </span>\n </li>\n\n <li>\n <img src="//www.gravatar.com/avatar/{{ post.user.gravatar || \'00000000000000000000000000000000\' }}?d=retro&s=40" class="avatar">\n <strong class="label" ng-show="post.user && !post.author_realname">{{ post.user.realname }}</strong>\n <strong class="label" ng-show="post.contact && !post.author_realname">{{ post.contact.contact}}</strong>\n <strong class="label" ng-show="post.author_realname">{{ post.author_realname}}</strong>\n <strong class="label" ng-show="!post.author_realname && !post.contact && !post.user" translate="app.anonymous">Anonymous</strong>\n\n </li>\n <li class="tooltip">\n <span class="label">{{timeago}}</span>\n <span class="bug tooltip-visible-el" aria-label="Post added {{ displayTimeFull }}" role="tooltip" title="{{ displayTimeFull }}">{{ displayTimeFull }}</span>\n\n </li>\n <li>\n <span class="label" translate-values="{ source : source }" translate="post.source"></span>\n </li>\n</ul>\n'},function(e,t,n){"use strict";function s(e,t,n,s){var i={formatSource:function(e){return"sms"===e?"SMS":e?e.charAt(0).toUpperCase()+e.slice(1):"Web"},loadUser:function(e){return e.user&&e.user.id&&s.hasPermission("Manage Users")?t.get({id:e.user.id}):e.user},loadContact:function(e){return!e.user&&e.contact&&e.contact.id?n.get({id:e.contact.id,ignore403:!0},function(e){},angular.noop):e.contact}};return e.bindAllFunctionsToSelf(i)}(e.exports=s).$inject=["Util","UserEndpoint","ContactEndpoint","$rootScope"]},function(e,t,n){"use strict";function s(e,n,s,i,a){var t={allowedSurveys:function(){var t=i.defer();return n.query().$promise.then(function(e){s.hasPermission("Manage Posts")?t.resolve(e):t.resolve(a.filter(e,o))}),t.promise},canCreatePostInSurvey:o};function o(e){return!!e&&(!!s.hasPermission("Manage Posts")||(!!e.everyone_can_create||null!==s.currentUser&&!!a.contains(e.can_create,s.currentUser.role)))}return e.bindAllFunctionsToSelf(t)}(e.exports=s).$inject=["Util","FormEndpoint","$rootScope","$q","_"]},function(e,t,n){"use strict";function s(t,e,n,s,i){return{unlock:function(e){n.unlock(e).$promise.then(function(){i.success("post.locking.unlocked")},a)},unlockByPost:function(e){var t=s.defer();return n.unlockByPost({post_id:e.id}).$promise.then(function(){i.success("post.locking.unlocked"),t.resolve()},function(e){a(e),t.reject(e)}),t.promise},getLock:function(e){n.unlock({post_id:e.id}).$promise.then(function(){i.success("post.locking.locked")},a)},isPostLockedForCurrentUser:function(e){if(!t.loggedin)return!1;{if(!e.lock)return!1;if(t.currentUser)return t.currentUser.userId!==parseInt(e.lock.user.id)}return!0},unlockSilent:function(e){n.unlock({post_id:e.id}).$promise.then(function(){})}};function a(e){i.apiErrors(e)}}(e.exports=s).$inject=["$rootScope","_","PostLockEndpoint","$q","Notify"]},function(e,t,i){"use strict";function n(e,n,t,s){return{restrict:"E",replace:!0,scope:{post:"="},template:i(694),link:function(t){t.canUnlock=!1,t.user=void 0,t.unlock=function(){n.unlockByPost(t.post).then(function(){t.post.lock=void 0})},t.showLockMessage=function(){return n.isPostLockedForCurrentUser(t.post)},t.isAdmin=s.isAdmin,t.canUnlock=-1!==t.post.allowed_privileges.indexOf("update"),e.get({id:t.post.lock.user.id}).$promise.then(function(e){t.user=e})}}}(e.exports=n).$inject=["UserEndpoint","PostLockService","Notify","$rootScope"]},function(e,t,n){e.exports='<div class="message message-alt active" ng-show="showLockMessage()">\n <div class="message-image error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#lock-locked"></use>\n </svg>\n </div>\n\n <div class="message-body">\n <p translate-values="{ user: user.realname }" translate="post.locking.locked_message">The post is locked because <strong>Seth Hall</strong> is working on it right now. Try editing a different post.</p>\n\n <div class="button-group" ng-if="isAdmin()">\n <button class="button button-alpha" translate="post.locking.unlock" ng-click="unlock()">Unlock</button>\n </div>\n </div>\n</div>'},function(e,t,p){"use strict";e.exports=["$rootScope","$translate","ContactEndpoint","MessageEndpoint","Notify","UserEndpoint","_","moment","ModalService",function(e,t,a,o,r,l,c,d,u){return{restrict:"E",replace:!0,scope:{post:"="},template:p(696),link:function(s){function n(){s.post.contact&&s.post.contact.id&&(s.messages=[],s.post.contact&&s.post.contact.contact?(s.contact=s.post.contact,t(s.contact)):a.get({id:s.post.contact.id}).$promise.then(function(e){s.contact=e,t(s.contact)}),i())}function t(){s.contact.user&&l.get({id:s.contact.user.id}).$promise.then(function(e){s.contact.user=e})}function i(){s.post.contact.id&&o.allInThread({contact:s.post.contact.id,offset:(s.currentPage-1)*s.itemsPerPage,limit:s.itemsPerPage}).$promise.then(function(e){var n,t=e.results;s.messages=t,c.each(t,function(e,t){e.user&&(e.user=l.get({id:e.user.id})),n=e.updated||e.created,e.displayTime=function(e){var t=d();if(e=d(e),t.isSame(e,"day"))return e.fromNow();return e.format("LLL")}(n)}),s.totalItems=e.total_count,s.showPagination=0<s.totalItems&&1<s.totalItems/s.itemsPerPage})}s.$watch("post.contact.id",function(e,t){e!==t&&n()}),s.currentPage=1,s.itemsPerPage=5,s.totalItems=s.itemsPerPage,s.pageChanged=i,s.showPagination=!1,s.getContactDisplay=function(){if(s.contact.user&&s.contact.user.realname)return s.contact.user.realname;return s.contact.contact},n(),s.sendMessage=function(){u.close();var e={message:s.message.reply_text,direction:"outgoing",contact_id:s.post.contact.id,parent_id:s.messages[s.messages.length-1].id};o.save(e).$promise.then(function(e){i(),r.notify("notify.message.sent_to",{contact:s.contact.contact})},function(e){r.apiErrors(e)})},s.reply=function(){s.message={},u.openTemplate(p(697),"post.messages.send",!1,s,!0,!0)}}}}]},function(e,t,n){e.exports='<div class="listing card">\n <h3 class="listing-heading" translate>post.messages.title</h3>\n\n <div ng-repeat="message in messages track by message.id" class="listing-item">\n <div class="listing-item-primary">\n <div class="listing-item-image" ng-if="message.direction == \'outgoing\'">\n <img src="//www.gravatar.com/avatar/{{ message.user.gravatar || \'00000000000000000000000000000000\' }}?d=retro&s=40" class="avatar">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#arrow-thick-left"></use>\n </svg>\n </div>\n <h2 class="listing-item-title">\n\n <span ng-if="message.direction == \'incoming\'">{{ getContactDisplay() }}</span>\n <span ng-if="message.direction == \'outgoing\' && message.user.realname">{{ message.user.realname }}</span>\n </h2>\n \x3c!--\n <p>{{message.updated || message.created | date:\'mediumDate\'}} at {{message.updated || message.created | date:\'shortTime\'}}</p>\n --\x3e\n <p class="listing-item-secondary">{{message.displayTime}}</p>\n <p>{{ message.message }}</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="totalItems > itemsPerPage">\n <div class="listing-item-primary">\n\n <nav class="pagination" ng-show="showPagination">\n <ul uib-pagination ng-model="currentPage" items-per-page="itemsPerPage" total-items="totalItems" ng-change="pageChanged()" max-size="5" boundary-links="false" rotate="false"></ul>\n </nav>\n\n </div>\n </div>\n\n <div class="listing-item">\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n <a href="" class="button button-flat" ng-click="reply()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n {{ \'post.messages.send\' | translate }}\n </a>\n </h2>\n </div>\n </div>\n\n\n\x3c!--\n <div class="listing-item">\n <div class="listing-item-primary">\n\n <form name="form" ng-submit="sendMessage()">\n <label class="input-label"\n\t ng-class="{ \'error\': form.reply.$invalid && form.reply.$dirty, \'success\': !form.reply.$invalid && form.reply.$dirty }" for="reply"\n\t translate>post.messages.reply</label>\n <div class="form-field" ng-class="{ \'error\': form.reply.$invalid && form.reply.$dirty }">\n\t<textarea id="reply" name="reply" placeholder="Send message to {{ contact.contact }}" ng-model="reply_text" ng-minlength=2 ng-maxlength=140 required></textarea>\n </div>\n <button type="submit" class="button button-flat"\n\t ng-submit="sendMessage()"\n\t ng-disabled="form.reply.$invalid"\n\t translate>post.messages.send</button>\n </form>\n\n <button type="submit" class="button button-flat"\n\t ng-click="reply()"\n\t ng-disabled="form.reply.$invalid"\n\t translate>post.messages.send</button>\n </div>\n </div>\n --\x3e\n</div>\n'},function(e,t){e.exports='<div>\n <form name="form" ng-submit="sendMessage()">\n\n <div class="form-field" ng-class="{ \'error\': form.reply.$invalid && form.reply.$dirty }">\n <textarea id="reply" name="reply" placeholder="Send message to {{ contact.contact }}" ng-model="message.reply_text" ng-minlength=2 ng-maxlength=140 required></textarea>\n </div>\n <div class="form-field">\n <button type="submit" class="button-alpha modal-trigger"\n\t ng-submit="sendMessage()"\n\t ng-disabled="form.reply.$invalid"\n\t translate>post.messages.simple_send</button>\n </div>\n </form>\n</div>\n\n\n'},function(e,t,o){"use strict";e.exports=["FormEndpoint","PostEndpoint","$translate","Notify","$location",function(e,n,s,i,a){return{restrict:"E",replace:!0,scope:{post:"="},template:o(699),link:function(t){s("post.unstructured.add_survey.info",{source:t.post.source}).then(function(e){t.surveyInfo=e}),t.addForm=function(){t.post.form={id:t.selectedSurvey},n.update(t.post).$promise.then(function(e){i.notify("notify.post.save_success",{name:t.post.title}),a.path("/posts/"+t.post.id+"/edit")},function(e){i.apiErrors(e)})},e.query().$promise.then(function(e){0<(t.surveys=e).length&&(t.selectedSurvey=e[0].id)})}}}]},function(e,t,n){e.exports='<div class="form-sheet" ng-show="surveys.length > 0">\n <div class="form-sheet-summary">\n <h3 class="form-sheet-title" translate>post.unstructured.add_survey.title</h3>\n </div>\n\n <div class="form-field">\n <p ng-bind-html="surveyInfo"></p>\n </div>\n\n <form name="form" ng-submit="addForm()">\n <fieldset>\n <legend translate>\n post.unstructured.add_survey.choose\n </legend>\n\n <div class="form-field radio" ng-repeat="survey in surveys">\n <input id="{{survey.id}}" type="radio" ng-model="$parent.selectedSurvey" ng-value="survey.id" />\n <label for="{{survey.id}}">{{survey.name}}</label>\n </div>\n </fieldset>\n\n <div class="form-field">\n <button class="button-alpha" type="submit">\n <span class="button-label" translate>post.unstructured.add_survey.save_and_edit</span>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#arrow-right"></use>\n </svg>\n </button>\n </div>\n </form>\n</div>\n'},function(e,t,s){"use strict";e.exports=["PostEndpoint","moment","_",function(t,n,o){return{restrict:"E",replace:!0,scope:{key:"=",value:"=",attribute:"=",type:"=",tags:"="},template:s(701),link:function(a){a.standardTask="standard"===a.type,a.formatTags=function(s){var i=" ";return o.each(s,function(e,t){var n=o.where(a.tags,{id:parseInt(e)});n[0]&&(e=n[0].tag,t<s.length-1?i+=e+", ":i+=e)}),i},"relation"===a.attribute.type&&(a.value=a.value.map(function(e){return t.get({id:e})})),"tags"===a.attribute.input&&(a.value=a.formatTags(a.value)),"datetime"===a.attribute.type&&("date"===a.attribute.input&&(a.value=a.value.map(function(e){return n(e).format("LL")})),"datetime"===a.attribute.input&&(a.value=a.value.map(function(e){return n(e).format("LLL")})),"time"===a.attribute.input&&(a.value=a.value.map(function(e){return n(e).format("LT")})))}}}]},function(e,t,n){e.exports='<div ng-class="{\'postcard-field\': !standardTask, \'listing-item-primary\': standardTask}">\n\n <div ng-if="attribute.input !== \'video\'">\n <h2 class="form-label">\n <bdi>{{attribute.label}}</bdi>\n </h2>\n\n <div ng-if="attribute.input === \'tags\'">\n <p>\n <svg class="iconic" style="margin-right:4px;">\n <use xlink:href="'+n(0)+'#tag"></use>\n </svg>\n <bdi>{{value}}</bdi>\n </p>\n </div>\n\n <div ng-repeat="entry in value track by $index" ng-if="attribute.type === \'relation\'">\n <a ui-sref="posts.detail.data({postId: entry.id})"><bdi>{{entry.title}}<bdi></a>\n </div>\n <div ng-repeat="entry in value track by $index" ng-if="attribute.type !== \'relation\' && attribute.input !== \'tags\'">\n <p ng-if="attribute.type !== \'markdown\'" linkify><bdi>{{entry}}<bdi></p>\n <p ng-if="attribute.type === \'markdown\'" markdown-to-html="entry"></p>\n </div>\n </div>\n\n <post-video-view\n ng-if="attribute.input === \'video\'"\n label="{{attribute.label}}"\n video-url="value"></post-video-view>\n</div>\n'},function(e,t,n){"use strict";e.exports=["MediaEndpoint","_",function(e,t){return{restrict:"E",replace:!0,scope:{mediaId:"=",label:"@",mediaHasCaption:"="},template:n(703),link:function(t){function n(){t.mediaLoaded=!0,t.mediaId&&0<t.mediaId.length&&(t.mediaLoaded=!1,e.get({id:t.mediaId}).$promise.then(function(e){t.media=e,t.mediaLoaded=!0}))}n(),t.$watch("mediaId",function(e,t){e!==t&&n()})}}}]},function(e,t){e.exports='<div class="postcard-field">\n <h2 class="form-label">\n {{label}}\n </h2>\n <button ng-hide="mediaLoaded" type="button" class="button button-full-width button-beta">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label">Loading</span>\n </button>\n <img ng-show="mediaLoaded" ng-src="{{ media.original_file_url }}" class="postcard-image">\n <p class="small" ng-if="mediaHasCaption"><em>{{ media.caption }}</em></p>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{videoUrl:"=",label:"@"},template:n(705),controller:i}}function i(e,t){e.videoUrl&&0<e.videoUrl.length&&(e.videoUrl=t.trustAsResourceUrl(e.videoUrl[0]))}(e.exports=s).$inject=[],i.$inject=["$scope","$sce"]},function(e,t){e.exports='<div class="postcard-field">\n <h2 class="form-label">\n <bdi>{{label}}</bdi>\n </h2>\n <div class="video_embed-fluid" ng-if="videoUrl">\n <iframe src="{{videoUrl}}" frameborder="0" allowfullscreen></iframe>\n </div>\n</div>\n'},function(e,t,i){"use strict";function n(r,l,e,t,c,d,n,s){return{restrict:"E",scope:{postId:"="},link:function(s,n,e){var i;function a(){s.hideMap=!0;var e=r.geojson({id:s.postId}).$promise,t=l.createMap(n[0].querySelector("#post-map")).then(function(e){i=e});d.all({map:t,geojson:e}).then(o).then(function(e){e.geojson?s.features=e.geojson.features.filter(function(e){return"Point"===e.geometry.type}):s.features=[]}),s.$on("$destroy",function(){i&&(i.remove(),i=null)})}function o(e){var t=e.geojson;if(t.features&&0===t.features.length)return s.hideMap=!0,void(s.emptyGeoJSON=!0);s.hideMap=!1;var n=c.geoJson(t,{pointToLayer:l.pointToLayer});return n.addTo(i),i.fitBounds(n.getBounds()),15<i.getZoom()&&i.setZoom(15),e}s.hideMap=!1,s.emptyGeoJSON=!1,s.geojson=[],a(),s.$watch("postId",function(e,t){e!==t&&(i&&(i.remove(),i=null),a())})},template:i(707)}}(e.exports=n).$inject=["PostEndpoint","Maps","_","PostFilters","Leaflet","$q","$rootScope","$compile"]},function(e,t){e.exports='<div class="postcard-field" ng-style="{\'visibility\': hideMap ? \'hidden\' : \'visible\'}" ng-hide="emptyGeoJSON">\n <h2 class="form-label" translate>post.location</h2>\n <div id="post-map" class="map"></div>\n <p ng-repeat="feature in features track by $index">{{ feature.geometry.coordinates[1] }}, {{ feature.geometry.coordinates[0] }}</p>\n</div>\n'},function(e,t,n){"use strict";var s,i=n(187),w=(s=i)&&s.__esModule?s:{default:s};function a(){return{restrict:"E",replace:!0,scope:{post:"<",$transition$:"<"},controller:o,template:n(709)}}function o(s,e,n,t,i,a,o,r,l,c,d,u,p,g,m,h,f,v,b,y){function _(){s.post.title&&s.post.title.length?s.$emit("setPageTitle",s.post.title):n("post.post_details").then(function(e){s.title=e,s.$emit("setPageTitle",e)}),s.post.form&&s.post.form.id?t.all([p.get({id:s.post.form.id}),u.query({formId:s.post.form.id,postStatus:s.post.status}).$promise,d.query({formId:s.post.form.id}).$promise,c.query().$promise]).then(function(e){s.form=e[0],s.form_name=e[0].name,s.form_description=e[0].description,s.form_color=e[0].color,s.tags=e[3],s.postValues=[],s.post.title||n("post.type_details",{type:e[0].name}).then(function(e){s.$emit("setPageTitle",e)});var t=m.sortBy(e[1],"priority");m.chain(e[2]).sortBy("priority").value().forEach(function(e){s.form_attributes[e.key]=e,s.post.values&&"title"!==e.type&&"description"!==e.type&&void 0!==(0,w.default)(s.post.values[e.key])&&s.postValues.push({key:e.key,value:s.post.values[e.key]})}),!m.isEmpty(t)&&1<t.length&&(s.visibleTask=t[1].id,t[1].hasFileIcon=!0),m.each(t,function(e){"post"===e.type?s.post_task=e:-1!==m.indexOf(s.post.completed_stages,e.id)&&(e.completed=!0)}),t=m.filter(t,function(e){return"post"!==e.type}),s.tasks=t,s.tasks_with_attributes=[],m.each(s.post.values,function(e,t){s.form_attributes[t]&&s.tasks_with_attributes.push(s.form_attributes[t].form_stage_id)}),s.tasks_with_attributes=m.uniq(s.tasks_with_attributes)}):s.tasks=[]}s.$watch("post",function(e){_()}),s.post=s.post,s.post_task={},s.hasPermission=e.hasPermission,s.canCreatePostInSurvey=v.canCreatePostInSurvey,s.mapDataLoaded=!1,s.form_attributes=[],s.postValues=[],s.selectedPost={post:s.post},_(),s.publishedFor=function(){return"draft"===s.post.status?"post.publish_for_you":m.isEmpty(s.post.published_to)?"post.publish_for_everyone":s.post.published_to.join(", ")},s.stageIsComplete=function(e){return m.includes(s.post.completed_stages,e)},s.taskHasValues=function(e){return m.contains(s.tasks_with_attributes,e.id)},s.showTasks=function(){return 1<s.tasks.length},s.isPostValue=function(e){return s.form_attributes[e]&&s.post_task&&s.form_attributes[e].form_stage_id===s.post_task.id},s.showType=function(e){return"point"!==e&&"geometry"!==e},s.activateTaskTab=function(e){s.visibleTask=e},s.publishPostTo=function(e){var t=m.where(s.tasks,{required:!0}),n=[];m.each(t,function(e){-1===m.indexOf(s.post.completed_stages,e.id)&&n.push(i("translate")("post.modify.incomplete_step",{stage:e.label}))}),n.length?h.errorsPretranslated(n):(s.post=e,o.update(s.post).$promise.then(function(){var e="draft"===s.post.status?"notify.post.set_draft":"notify.post.publish_success",t="draft"==e?"draft":m.isEmpty(s.post.published_to)?"everyone":s.post.published_to.join(", ");h.notify(e,{role:t})},function(e){h.apiErrors(e)}))},s.close=function(){var e=s.$transition$.$from().name;"posts.data.detail"===e||""===e||"posts.data.edit"===e?b.go("posts.data"):b.go(e),s.$parent.deselectPost()}}(e.exports=a).$inject=[],o.$inject=["$scope","$rootScope","$translate","$q","$filter","$location","PostEndpoint","CollectionEndpoint","UserEndpoint","TagEndpoint","FormAttributeEndpoint","FormStageEndpoint","FormEndpoint","Maps","_","Notify","moment","PostSurveyService","$state","$window"]},function(e,t,n){e.exports='<div>\n <layout-class layout="d"></layout-class>\n <article class="postcard" role="article">\n <button class="button-beta button-flat postcard-close" ng-click="close()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#x"></use>\n </svg>\n </button>\n <div class="post-band" ng-style="{backgroundColor: form.color}"></div>\n <post-lock ng-if="post.lock" post="post"></post-lock>\n <div class="postcard-body">\n <h1 class="form-sheet-title survey-title" linkify>\n <bdi>{{post.title}}</bdi>\n </h1>\n <div class="postcard-header">\n <post-metadata post="post" hide-date-this-week="true"></post-metadata>\n <post-actions post="post"></post-actions>\n </div>\n <twitter-widget ng-if="post.source===\'twitter\'" twitter-widget-id="post.data_source_message_id">\n </twitter-widget>\n \x3c!-- <div\n ng-repeat="postValue in postValues"\n ng-if="isPostValue(postValue.key) && form_attributes[postValue.key] && showType(form_attributes[postValue.key].type)"\n class="postcard-field"\n >\n <post-media-value\n ng-if="form_attributes[postValue.key].type === \'media\'"\n media-has-caption="form_attributes[postValue.key].config.hasCaption"\n label="{{form_attributes[postValue.key].label}}"\n media-id="postValue.value"></post-media-value>\n </div> --\x3e\n <div\n ng-if="post.content"\n class="postcard-field">\n <p markdown-to-html="post.content"></p>\n </div>\n <span \n ng-repeat="postValue in postValues"\n ng-if="isPostValue(postValue.key) && showType(form_attributes[postValue.key].type)"\n >\n <post-media-value\n ng-if="form_attributes[postValue.key].type === \'media\'"\n media-has-caption="form_attributes[postValue.key].config.hasCaption"\n label="{{form_attributes[postValue.key].label}}"\n media-id="postValue.value"></post-media-value>\n <post-value\n ng-if="form_attributes[postValue.key].type !== \'media\'"\n key="postValue.key"\n value="postValue.value"\n attribute="form_attributes[postValue.key]"\n tags="tags"\n type="\'post\'"></post-value>\n </span>\n <post-detail-map post-id="post.id"></post-detail-map>\n </div>\n </article>\n <div class="listing card init" ng-show="tasks.length">\n <h3 class="listing-heading" translate="app.tasks">Tasks</h3>\n <nav class="tabs-menu" data-tabs="tasks-tabs" data-tabs-hash>\n <ul>\n <li\n ng-repeat="task in tasks"\n ng-class="{\'active\': visibleTask == task.id}">\n <a ng-click="activateTaskTab(task.id)">\n <bdi>{{task.label}}</bdi>\n </a>\n <span class="status" ng-class="{\'completed\': taskIsComplete(visibleTask)}">\n </span>\n </li>\n </ul>\n </nav>\n <div class="listing-item tasks-tabs tabs-target active">\n <div class="alert"\n ng-repeat="task in tasks"\n ng-if="!taskHasValues(task)"\n ng-show="task.id === visibleTask">\n <p translate="post.modify.no_task_values">There are currently no saved values for this task.</p>\n </div>\n <div\n ng-repeat="postValue in postValues"\n ng-if="!isPostValue(postValue.key) && form_attributes[postValue.key] && showType(form_attributes[postValue.key].type)"\n ng-show="form_attributes[postValue.key].form_stage_id === visibleTask"\n ng-class="{\'listing-item-primary\': form_attributes[postValue.key].type === \'media\'}"\n >\n <post-media-value\n ng-if="form_attributes[postValue.key].type === \'media\'"\n label="{{form_attributes[postValue.key].label}}"\n media-id="postValue.value"></post-media-value>\n <post-value\n ng-if="form_attributes[postValue.key].type !== \'media\'"\n tags="tags"\n key="postValue.key"\n value="postValue.value"\n attribute="form_attributes[postValue.key]"\n type="\'standard\'">\n </post-value>\n </div>\n </div>\n </div>\n <post-messages post="post" ng-if="post.contact.id && post.source !== \'twitter\'"></post-messages>\n</div>\n'},function(e,t,n){"use strict";e.exports=["_","Util","$translate","PostEndpoint","Notify","$q",function(i,e,t,n,s,a){var o={delete:function(e){var t=a.defer();return s.confirmDelete("notify.post.destroy_confirm").then(function(){n.delete({id:e.id}).$promise.then(function(){s.notify("notify.post.destroy_success",{name:e.title}),t.resolve()},function(e){s.apiErrors(e),t.reject(e)})}),t.promise},getStatuses:function(){return["published","draft","archived"]},filterPostEditorCategories:function(n,s){return i.chain(n).map(function(e){var t=angular.copy(i.findWhere(s,{id:e}));return t&&0<t.children.length&&(t.children=i.chain(t.children).map(function(t){if(n.find(function(e){return e===t.id}))return i.findWhere(s,{id:t.id})}).filter().value()),t}).filter().value()}};return e.bindAllFunctionsToSelf(o)}]},function(e,t,n){"use strict";e.exports=["CONST",function(t){return function(e){return angular.extend({},{title:"",content:"",locale:t.DEFAULT_LOCALE,values:{},completed_stages:[],published_to:[],post_date:new Date},e)}}]},function(e,t,n){"use strict";e.exports=["_","Util","$translate","Notify",function(a,e,t,n){var s={cleanPostValues:function(n){return a.each(n.values,function(e,t){n.values[t]=a.filter(e),n.values[t].length||delete n.values[t]}),n},validatePost:function(t,s,e){var i=!0,n=[];return a.each(e,function(e){"post"!==e.type&&!a.contains(t.completed_stages,e.id)||n.push(e)}),!!s&&(!!t.form&&(!s.title.$invalid&&(!(!s.content||s.content.$invalid)&&(a.each(n,function(e){var t=a.where(e.attributes,{required:!0});a.each(t,function(t){if("title"!==t.type&&"description"!==t.type)if("checkbox"===t.input){var n=!1;a.each(t.options,function(e){a.isUndefined(s["values_"+t.id+"_"+e])||s["values_"+t.id+"_"+e].$invalid||(n=i)}),i=n}else(a.isUndefined(s["values_"+t.id])||s["values_"+t.id].$invalid)&&(a.isUndefined(s["values_"+t.id])||(s["values_"+t.id].$dirty=!0),i=!1)})}),i))))}};return e.bindAllFunctionsToSelf(s)}]},function(e,t,n){"use strict";e.exports=["$q","$http","_","Util","$translate","MediaEndpoint","Notify",function(i,s,a,o,e,n,r){var l={saveMedia:function(e,n){var t=i.defer(),s=[];return a.each(e,function(e,t){e.changed&&(e.deleted?(l.deleteMedia(e.id),n.values[t][0]=null):e.file?s.push(l.uploadFile(e).then(function(e){n.values[t][0]=e?e.id:null})):(delete e.changed,s.push(l.update(e).then(function(e){n.values[t][0]=e?e.id:null}))))}),i.all(s).then(function(){t.resolve(n)}),t.promise},deleteMedia:function(e){return e?n.delete({id:e}).$promise:i.when()},update:function(e){var t=i.defer();return n.update(e).$promise.then(function(e){t.resolve(e)},function(e){r.apiErrors(e),t.resolve({})}),t.promise},uploadFile:function(t){var n=i.defer();return this.deleteMedia(t.id).then(function(){var e=new FormData;e.append("file",t.file),t.caption&&e.append("caption",t.caption),s.post(o.apiUrl("/media"),e,{headers:{"Content-Type":void 0}}).then(function(e){t.id=e.data.id,n.resolve(t)},function(e){r.apiErrors(e),n.resolve({})})},function(e){r.apiErrors(e),n.resolve({})}),n.promise}};return o.bindAllFunctionsToSelf(l)}]},function(e,t,a){"use strict";e.exports=["$http","MediaEndpoint","MediaEditService","Util","Notify","$q","_",function(e,l,t,n,s,i,c){return{restrict:"E",replace:!0,require:"ngModel",scope:{media:"=",name:"@",mediaHasCaption:"<"},template:a(715),link:function(t,e,n,s){function i(){s.$viewValue&&(t.mediaId=parseInt(s.$viewValue),t.media.id!==t.mediaId&&c.isNumber(t.mediaId)&&l.get({id:t.mediaId}).$promise.then(function(e){t.media=e,t.media.changed=!1}))}function a(e){e&&(s.$setViewValue(t.mediaId),s.$setDirty())}function o(e){"changed"===e&&(s.$setViewValue(t.mediaId),s.$setDirty())}function r(e){e?s.$setViewValue(null):s.$setViewValue(t.mediaId)}t.media={id:null,file:null,caption:"",dataURI:null,changed:!1,deleted:!1},t.mediaId=null,t.showAdd=function(){return!t.media.id&&!t.media.changed||t.media.deleted},t.showReplace=function(){return t.media.dataURI||t.media.id&&!t.media.deleted},t.showDelete=function(){return t.media.id||t.media.changed&&!t.media.deleted},t.deleteMedia=function(e){t.media={id:e,changed:!0,deleted:!0}},i(),t.$watch("media.changed",a),t.$watch("mediaId",o),t.$watch("media.deleted",r),s.$render=i}}}]},function(e,t,n){e.exports='\n<form>\n <div class="form-field file">\n <file-upload id="{{name}}" validation="\'image\'" validation=true container="media" model="mediaId">\n </file-upload>\n\n <label for="{{name}}" class="button button-gamma" ng-show="showAdd()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="button-label" translate="post.media.add_photo"></span>\n </label>\n\n <figure ng-show="showReplace()">\n <img ng-src="{{media.original_file_url}}" ng-show="media.id && !media.dataURI">\n <img ng-src="{{media.dataURI}}" ng-show="media.dataURI">\n\n <div class="form-field">\n <button class="button-destructive" ng-click="deleteMedia(media.id)" ng-show="showDelete()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="hidden" translate="post.media.delete_photo"></span>\n </button>\n\n <file-upload id="{{name}}" validation="\'image\'" container="media" model="mediaId"></file-upload>\n <label for="{{name}}" class="button button-gamma">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#image"></use>\n </svg>\n <span class="button-label" translate="post.media.replace_image"></span>\n </label>\n </div>\n </figure>\n <div ng-hide="!mediaHasCaption">\n <figure>\n <p class="small" translate>post.media.add_caption</p>\n <input\n type="text"\n placeholder="{{ \'post.media.add_caption\' | translate }}"\n ng-model="media.caption">\n </figure>\n </div>\n </div>\n</form>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{videoUrl:"="},template:n(717),controller:i}}function i(n,s,e,t){function i(e){t.error("notify.video.incorrect_url",{url:e})}n.constructIframe=function(e){!function(e){if(e){var t=e.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);n.videoUrl=void 0,t?-1<t[3].indexOf("youtu")?(n.videoUrl="https://www.youtube.com/embed/"+t[6],n.video=s.trustAsResourceUrl(n.videoUrl)):-1<t[3].indexOf("vimeo")?(n.videoUrl="https://player.vimeo.com/video/"+t[6],n.video=s.trustAsResourceUrl(n.videoUrl)):i(e):i(e)}}(e);var t=angular.element(document.getElementById(n.previewId));void 0===n.videoUrl?t.empty():(t.empty(),t.html('<iframe src="'+n.video+'" frameborder="0" allowfullscreen>').wrap('<div class="video_embed-fluid" />'))},n.video=s.trustAsResourceUrl(n.videoUrl),n.previewId=n.videoId?n.videoId:e.simpluUUID()}(e.exports=s).$inject=[],i.$inject=["$scope","$sce","Util","Notify"]},function(e,t,n){e.exports='\n<form>\n <div class="form-field video_embed">\n <label>{{label}}</label>\n <p>\n <span translate="post.video.enter_a">Enter a</span>\n\n <img src="'+n(718)+'" class="wordmark-replace">\n <span translate="post.video.or"> or </span>\n <img src="'+n(719)+'" class="wordmark-replace">\n <span translate="post.video.video_url"> video URL</span>\n </p>\n <input type="text" ng-model="videoUrl" ng-change="constructIframe(videoUrl)" placeholder="https://youtu.be/123456">\n\n <div id="{{previewId}}" class="form-field-preview" ng-show="videoUrl">\n <div class="video_embed-fluid">\n <iframe frameborder="0" ng-src="{{video}}" allowfullscreen></iframe>\n </div>\n </div>\n </div>\n</form>\n'},,,function(e,t,n){"use strict";e.exports=["moment","_",function(a,e){return{restrict:"E",replace:!0,scope:{},require:"ngModel",template:n(721),link:function(e,t,n,s){function i(){s.$setViewValue(e.model)}e.timeOptions={format:"HH:i",interval:15,onClose:i},e.dateOptions={format:"yyyy-mm-dd",onClose:i},e.model=null,s&&(s.$render=function(){e.model=a(s.$viewValue).toDate()})}}}]},function(e,t,n){e.exports='<div>\n <div class="form-field date">\n <div class="input-with-icon">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#calendar"></use>\n </svg>\n <input\n type="text"\n pick-a-date="model"\n pick-a-date-options="dateOptions"\n />\n </div>\n </div>\n <div class="form-field date">\n <div class="input-with-icon">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#clock"></use>\n </svg>\n <input\n type="text"\n pick-a-time="model"\n pick-a-time-options="timeOptions"\n />\n </div>\n </div>\n</div>\n'},function(e,t,s){"use strict";function n(f,e,v,b,y,t,_,n){return{restrict:"E",replace:!0,require:"ngModel",scope:{id:"@",name:"@",required:"="},template:s(723),link:function(i,t,e,n){var s,a,o,r=8;function l(e){t[0].querySelector(".searchbar").contains(e.target)||i.hideSearchResults()}function c(s){i.$apply(function(){var e=s.latlng.wrap(),t=e.lat,n=e.lng;m(t,n),p(t,n)})}function d(){_.error("location.my_location_error")}function u(){n.$viewValue&&void 0!==n.$viewValue.lat&&void 0!==n.$viewValue.lon&&(m(n.$viewValue.lat,n.$viewValue.lon),h(n.$viewValue.lat,n.$viewValue.lon),g(n.$viewValue.lat,n.$viewValue.lon))}function p(e,t){n.$setViewValue({lat:e,lon:t}),g(e,t)}function g(e,t){i.manualModel.lat=e,i.manualModel.lon=t}function m(e,t){o?o.setLatLng([e,t]):((o=v.marker([e,t],{draggable:!0,icon:y.pointIcon()})).addTo(a),o.on("dragend",function(t){i.$apply(function(){var e=t.target.getLatLng();p(e.lat,e.lng)})}))}function h(e,t){a.setView([e,t],r)}i.processing=!1,i.searchLocationTerm="",i.searchLocation=function(){i.processing=!0,b.searchAllInfo(i.searchLocationTerm).then(function(e){i.processing=!1,i.searchResults=e})},i.manualModel={lat:null,lon:null},i.searchTimeout,i.handleActiveSearch=function(e){var t=8===e.keyCode||46===e.keyCode,n=47<e.keyCode&&e.keyCode<58,s=64<e.keyCode&&e.keyCode<91;if((t||n||s)&&(i.processing=!0,i.searchTimeout&&clearTimeout(i.searchTimeout),i.searchTimeout=setTimeout(i.searchLocation,250)),13===e.keyCode)return e.preventDefault(),!1},i.clear=function(){n.$setViewValue(null),o&&(a.removeLayer(o),o=null)},i.showSearchResults=function(){t[0].querySelector("#searchbar-results").classList.add("active")},i.hideSearchResults=function(){t[0].querySelector("#searchbar-results").classList.remove("active")},i.chooseLocation=function(e){i.searchLocationTerm="",p(e.lat,e.lon),m(e.lat,e.lon),h(e.lat,e.lon),i.hideSearchResults()},i.chooseCurrentLocation=function(){s.start(),i.hideSearchResults()},i.searchResults=[],i.showCurrentPositionControl=!1,i.updateMapFromLatLon=function(e,t){m(e,t),h(e,t),p(e,t)},y.createMap(t[0].querySelector(".map")).then(function(e){a=e,u(),n.$render=u,a.on("click",c),a.on("locationfound",c),a.on("locationerror",d),"https:"!==window.location.protocol&&"localhost"!==window.location.hostname||(i.showCurrentPositionControl=!0,s=v.control.locate({locateOptions:{maximumAge:6e4}}).addTo(a))}),f.on("click",l)}}}(e.exports=n).$inject=["$document","$http","Leaflet","Geocoding","Maps","_","Notify","$window"]},function(e,t,n){e.exports='\n<div class="location-wrapper">\n <div id="{{id}}-map" class="map" style="height: 265px; width: 100%;"></div>\n <form class="searchbar">\n <div class="searchbar-input init" role="search">\n <div class="form-field tooltip">\n <input name="{{name}}"\n type="search"\n maxlength="250"\n placeholder="{{\'location.placeholder\' | translate}}"\n ng-model="searchLocationTerm"\n ng-focus="showSearchResults()"\n ng-keydown="handleActiveSearch($event)"\n />\n </div>\n <div id="searchbar-results" class="searchbar-results dropdown-menu init">\n <div class="form-field">\n <button class="button-beta button-plain" ng-click="chooseCurrentLocation()" ng-if="showCurrentPositionControl" >\n <svg class="iconic">\n <use\n xmlns:xlink="http://www.w3.org/1999/xlink"\n xlink:href="'+n(0)+'#location">\n </use>\n </svg>\n <span class="button-label" translate>location.use_current_location</span>\n </button>\n </div>\n <div class="tool">\n <h6 class="tool-heading" translate>location.search_results</h6>\n <dl ng-repeat="result in searchResults" ng-if="!processing && searchResults.length > 0">\n <dt class="list-item" ng-click="chooseLocation(result)">\n <svg class="iconic">\n <use\n xmlns:xlink="http://www.w3.org/1999/xlink"\n xlink:href="'+n(0)+'#map-marker">\n </use>\n </svg>\n <em>{{result.display_name}}</em>\n </dt>\n </dl>\n <dl class="dropdown-menu-body" ng-if="processing">\n <dt class="list-item">\n <div class="loading" style="width: auto;">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </dt>\n </dl>\n <dl class="dropdown-menu-body" ng-if="!processing && !searchResults">\n <dt class="list-item" translate="location.no_matching_locations">\n No matching locations.\n </dt>\n </dl>\n </div>\n </div>\n </div>\n </form>\n <p translate>location.click_map</p>\n <div class="form-field">\n <label>Lat</label>\n <input type="text" ng-model="manualModel.lat">\n </div>\n <div class="form-field">\n <label>Long</label>\n <input type="text" ng-model="manualModel.lon">\n </div>\n <button type="button" class="button-primary" ng-click="updateMapFromLatLon(manualModel.lat, manualModel.lon)">\n <svg class="iconic">\n <use\n xmlns:xlink="http://www.w3.org/1999/xlink"\n xlink:href="'+n(0)+'#location">\n </use>\n </svg>\n <span class="button-label" translate>location.update_map</span>\n </button>\n</div>\n'},function(e,t,n){"use strict";e.exports=["PostEndpoint","_",function(s,e){return{restrict:"E",replace:!0,scope:{id:"@",name:"@",model:"=",required:"=",attribute:"="},template:n(725),link:function(n){n.noResults=!1,n.searching=!1,n.$watch(function(){return n.model},function(e,t){n.selectedPost&&n.selectedPost.id===e||(n.selectedPost=s.get({id:n.model}))}),n.search=function(e){e.preventDefault();var t={q:n.searchTerm};n.attribute.config.input&&n.attribute.config.input.form&&(t.form=n.attribute.config.input.form.join(",")),n.noResults=!1,n.searching=!0,s.query(t).$promise.then(function(e){n.searching=!1,n.results=e.results,e.results.length||(n.noResults=!0)})},n.selectPost=function(e){n.model=e.id,n.selectedPost=e,n.results=null},n.clearPost=function(){n.model=null,n.selectedPost=null}}}}]},function(e,t,n){e.exports='<form class="input-relation">\n\t<p ng-if="model">{{ selectedPost.title }} ({{ model }}) <button class="button-secondary icon-only alt trash" type="button" ng-click="clearPost()" translate></button></p>\n <div class="input-inline">\n <input class="form-control" type="text" placeholder="Search.." ng-model="searchTerm">\n <button type="button" ng-click="search($event)">\n\t\t\t\t\t\t<div class="loading" ng-if="searching">\n\t\t\t\t\t\t\t\t<div class="line"></div>\n\t\t\t\t\t\t\t\t<div class="line"></div>\n\t\t\t\t\t\t\t\t<div class="line"></div>\n\t\t\t\t\t\t </div>\n\t\t\t\t\t\t<span class="button-label" translate="nav.search" ng-if="!searching">Search</span>\n\t\t\t\t\t\t<span class="button-label" translate="app.searching" ng-if="searching">Searching</span>\n\t\t\t\t</button>\n </div>\n\t\t<div class="alert error" ng-if="noResults">\n\t\t\t\t<svg class="iconic">\n\t\t\t\t\t<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n\t\t\t\t</svg>\n\t\t\t\t<p translate="post.no_search_results">Your search didn\'t match any posts</p>\n\t\t</div>\n <ul>\n \t<li ng-repeat="post in results">\n \t\t<button type="button" class="button-secondary icon-only check" ng-click="selectPost(post)" translate></button> {{ post.id }} : {{ post.title }}\n \t</li>\n </ul>\n</form>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{post:"=",form:"="},template:n(727),controller:i}}function i(o,t,e,n,s,i,r,a,l,c,d,u,p,g,m,h,f,v,b,y,_,w){function x(){return d.validatePost(o.post,o.postForm,o.tasks)}o.everyone=e("translate")("post.modify.everyone"),o.isEdit=!!o.post.id,o.validationErrors=[],o.visibleStage=1,o.enableTitle=!0,o.setVisibleStage=function(e){o.visibleStage=e},o.loadData=function(){var e=[g.queryFresh({formId:o.post.form.id}).$promise,m.queryFresh({formId:o.post.form.id}).$promise,f.queryFresh().$promise];o.post.id&&e.push(c.getLock({post_id:o.post.id}).$promise);return t.all(e).then(function(e){o.post.id&&!e[3]&&w.go("postEdit",{id:o.post.id});var t=o.post,n=b.sortBy(e[0],"priority"),s=b.chain(e[1]).sortBy("priority").value(),i=e[2];if(s.map(function(e){"upload"===e.input&&(o.medias[e.key]={}),"tags"===e.input&&(e.options=y.filterPostEditorCategories(e.options,i)),o.post.values[e.key]?"date"===e.input||"datetime"===e.input?o.post.values[e.key][0]&&(o.post.values[e.key][0]=r(o.post.values[e.key][0]).toDate()):"number"===e.input?o.post.values[e.key][0]&&(o.post.values[e.key][0]=parseFloat(o.post.values[e.key][0])):"tags"===e.input&&o.post.values[e.key]&&(o.post.values[e.key]=o.post.values[e.key].map(function(e){return parseInt(e)})):"location"===e.input?o.post.values.message_location?o.post.values[e.key]=angular.copy(o.post.values.message_location):o.post.values[e.key]=[null]:"number"===e.input?o.post.values[e.key]=[parseInt(e.default)]:"date"===e.input||"datetime"===e.input?o.post.values[e.key]=e.default?[new Date(e.default)]:[new Date]:o.post.values[e.key]=[e.default]}),b.each(n,function(t){t.attributes=b.filter(s,function(e){return e.form_stage_id===t.id})}),t.completed_stages.length===n.length-1&&1<n.length)o.setVisibleStage(n[1].id);else{var a=b.filter(n,function(e){return!b.contains(t.completed_stages,e.id)});1<a.length&&o.setVisibleStage(a[1].id)}o.tasks=n})},o.allowedChangeStatus=function(){return o.post.allowed_privileges&&-1!==o.post.allowed_privileges.indexOf("change_status")},o.deletePost=function(e){y.delete(e).then(function(){n.path("/")})},o.canSavePost=x,o.savePost=function(){if(o.saving_post=!0,!o.canSavePost())return v.error("post.valid.validation_fail"),void(o.saving_post=!1);_.saveMedia(o.medias,o.post).then(function(){"message_location"in o.post.values&&(o.post.values.message_location=[]);var e=d.cleanPostValues(angular.copy(o.post));0<o.tagKeys.length&&(e.tags=b.chain(e.values).pick(o.tagKeys).values().flatten().filter().uniq().value()),(e.id?l.update(e):l.save(e)).$promise.then(function(e){var t=e.status&&"published"===e.status?"notify.post.save_success":"notify.post.save_success_review";e.id&&-1!==e.allowed_privileges.indexOf("read")?(o.saving_post=!1,o.post.id=e.id,v.notify(t,{name:o.post.title}),w.go("posts.data.detail",{postId:e.id})):(v.notify(t,{name:o.post.title}),w.go("posts.map.all"))},function(e){var n=[];b.each(e.data.errors,function(e,t){"limit::posts"===e.title?v.limit("limit.post_limit_reached"):n.push(e)}),v.errors(b.pluck(n,"message")),o.saving_post=!1})})},o.cancel=function(){c.unlock(o.post.lock).$promise.then(function(e){o.post.id?w.go("posts.data.detail",{view:"data",postId:o.post.id}):w.go("posts.data")})},o.tagKeys=[],o.save=s.instant("app.save"),o.saving=s.instant("app.saving"),o.submit=s.instant("app.submit"),o.submitting=s.instant("app.submitting"),o.post.form=o.form,o.loadData().then(function(){i(function(){"published"!==o.post.status||x()||v.error("post.valid.invalid_state")})}),o.medias={},o.savingText=s.instant("app.saving"),o.submittingText=s.instant("app.submitting")}(e.exports=s).$inject=[],i.$inject=["$scope","$q","$filter","$location","$translate","$timeout","moment","PostEntity","PostEndpoint","PostLockEndpoint","PostEditService","PostLockService","FormEndpoint","FormStageEndpoint","FormAttributeEndpoint","UserEndpoint","TagEndpoint","Notify","_","PostActionsService","MediaEditService","$state"]},function(e,t,n){e.exports='<form name="postForm" ng-submit="savePost()" novalidate>\n <div class="mode-context init" dropdown>\n <layout-class layout="a"></layout-class>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav"><bdi>{{nav.site.name}}</bdi></a></li>\n </ol>\n\n <h1 class="mode-context-title"><bdi>{{post.form.name}}</bdi></h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate="app.show_more_less">Show more/less</span>\n </span>\n\n <div class="mode-context-body">\n <p markdown-to-html="post.form.description"></p>\n </div>\n </div>\n\n <main role="main">\n <div class="toolbar">\n <div class="button-group" ng-show="post.id">\n <button type="button" class="button-flat" ng-click="cancel()" translate="app.cancel">Cancel</button>\n <button type="submit" class="button-alpha" ng-if="!saving_post">{{save}}</button>\n <button type="submit" class="button-alpha" disabled ng-if="saving_post">{{saving}}\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </button>\n </div>\n <div class="button-group" ng-show="!post.id">\n <post-share button="true" ng-show="!post.id"></post-share>\n <button type="submit" class="button-alpha" ng-if="!saving_post">{{submit}}</button>\n <button type="submit" class="button-alpha" disabled ng-if="saving_post">{{submitting}}\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </button>\n </div>\n\n </div>\n\n <div class="main-col">\n\n <div class="form-sheet">\n <div class="post-band" ng-style="{backgroundColor: form.color}"></div>\n\n \x3c!-- Start Post custom fields --\x3e\n <post-value-edit\n ng-repeat="attribute in tasks[0].attributes | orderBy: \'priority\' as filtered_result track by attribute.id"\n post="post"\n post-field=true\n form="postForm"\n medias="medias"\n attribute="attribute"\n ></post-value-edit>\n \x3c!-- End Post custom fields --\x3e\n \x3c!-- IF: Editing an existing post --\x3e\n\n \x3c!-- ELSE IF: Adding a new post w/o permission to manage who it\'s visible to\n <div class="postcard-metadata">\n <strong>This post will need to be moderated</strong> before it\'s visible to the public.\n </div>\n END: IF --\x3e\n\n\n\n \x3c!-- IF: User has permission to see other \'Tasks\' --\x3e\n\n <post-toolbox form="postForm" post="post"></post-toolbox>\n\n\n </div>\n <post-tabs\n ng-show="tasks.length > 1"\n form="postForm"\n post="post"\n stages="tasks"\n attributes="attributes"\n medias="medias"\n visible-stage="visibleStage">\n </post-tabs>\n\n <post-messages post="post" ng-if="post.contact.id"></post-messages>\n \x3c!-- <div class="form-sheet">\n <div class="form-sheet-actions">\n <div class="form-field" ng-show="!post.id">\n <a href="timeline.html" type="submit" class="button button-alpha" translate="app.submit">Submit</a>\n <a href="post-add.html" class="button button-gamma button-flat" translate"app.submit_antoher">Submit & add another</a>\n </div>\n <div class="form-field" ng-show="post.id">\n <a href="timeline.html" type="submit" class="button button-alpha" translate="app.save">Save</a>\n <a href="post-add.html" class="button button-gamma button-flat" ng-click="cancel()" translate"app.cancel">Cancel</a>\n </div>\n </div>\n </div> --\x3e\n <div class="form-sheet" ng-if="post.id">\n <div class="form-sheet-summary">\n <h3 class="form-sheet-title" translate="post.delete_post">Delete this post</h3>\n </div>\n\n <div class="form-field">\n <p translate="post.delete_post_desc"><strong>If you delete this post</strong>, all of its comments and messages will also be deleted. Proceed with caution.</p>\n\n <button class="button-destructive" ng-click="deletePost(post)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label" translate="post.delete_post">Delete post</span>\n </button>\n </div>\n </div>\n\n <ush-logo></ush-logo>\n </div> \x3c!-- END main column --\x3e\n\n </main>\n</form>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{form:"=",post:"=",attribute:"=",postField:"=",medias:"=",categories:"="},controller:i,template:n(729)}}function i(n,t){var s=["checkbox","radio","tags"];n.isDate=function(e){return"date"===e.input},n.isDateTime=function(e){return"datetime"===e.input},n.isText=function(e){return"text"===e.input},n.isTextarea=function(e){return"textarea"===e.input},n.isCheckbox=function(e){return"checkbox"===e.input},n.dateFormat={format:"yyyy-mm-dd"},n.canAddValue=function(e){return 0===e.cardinality||n.post.values[e.key].length<e.cardinality},n.canRemoveValue=function(e,t){return 1<n.post.values[e.key].length},n.addValue=function(e){n.post.values[e.key].push(null)},n.removeValue=function(e,t){n.post.values[e.key].splice(t,1)},n.taskIsMarkedCompleted=function(){return!t.isUndefined(n.postField)||t.contains(n.post.completed_stages,n.attribute.form_stage_id)},n.isFieldSetStructure=function(e){if(t.contains(s,e.input))return!0;return!1}}(e.exports=s).$inject=[],i.$inject=["$scope","_"]},function(e,t,n){e.exports='<div>\n \x3c!-- Container for form-field structured elements --\x3e\n <div ng-if="attribute.type === \'description\' || attribute.type === \'title\'">\n \x3c!-- Split between Title Desc and other values --\x3e\n <div\n ng-if="attribute.type===\'title\'"\n class="form-field init required"\n adaptive-form\n ng-class="{\n \'error\': form.title.$invalid && form.title.$dirty,\n \'success\': !form.title.$invalid && form.title.$dirty\n }"\n >\n <label>\n <bdi>{{attribute.label}}</bdi>\n </label>\n <p markdown-to-html="attribute.instructions" ng-if="attribute.instructions">\n </p>\n <input id="title"\n name="title" type="text" ng-model="post.title" ng-required="true" ng-minlength=2 ng-maxlength=150 adaptive-input>\n\n <div\n class="alert error"\n ng-show="form.title.$dirty"\n ng-repeat="(error, value) in form.title.$error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <span translate="{{\'post.valid.title.\' + error}}"></span>\n </div>\n </div>\n\n \x3c!-- Post stage default fields --\x3e\n <div\n ng-if="attribute.type===\'description\'"\n class="form-field init required"\n ng-class="{\n \'error\': form.content.$invalid && form.content.$dirty,\n \'success\': !form.content.$invalid && form.content.$dirty\n }"\n adaptive-form\n >\n <label>\n <bdi>{{attribute.label}}</bdi>\n </label>\n <p markdown-to-html="attribute.instructions" ng-if="attribute.instructions">\n </p>\n <textarea id="content" name="content" data-min-rows="1" rows="1"\n ng-model="post.content" ng-required="true" adaptive-input msd-elastic>\n </textarea>\n\n <div class="alert error" ng-show="form.content.$dirty" ng-repeat="(error, value) in form.content.$error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+"#warning\"></use>\n </svg>\n <span translate=\"{{'post.valid.content.' + error}}\"></span>\n </div>\n </div>\n </div>\n <div ng-if=\"attribute.type !== 'description' && attribute.type !== 'title'\">\n <div\n ng-if=\"!isFieldSetStructure(attribute)\"\n class=\"form-field init\"\n adaptive-form\n ng-class=\"{\n 'error': form['values_' + attribute.key].$invalid && form['values_' + attribute.key].$dirty,\n 'success': ! form['values_' + attribute.key].$invalid && form['values_' + attribute.key].$dirty,\n 'required': attribute.required,\n 'date' : isDate(attribute) || isDateTime(attribute),\n 'location' : attribute.input === 'location'\n }\"\n >\n \x3c!-- Attribute Label --\x3e\n <label for=\"values[{{attribute.key}}][0]\">\n <svg ng-show=\"attribute.response_private\" class=\"iconic\">\n <use xlink:href=\""+n(0)+'#lock-locked"></use>\n </svg>\n <bdi>{{attribute.label}}</bdi>\n </label>\n \x3c!-- Attribute Instructions --\x3e\n <p markdown-to-html="attribute.instructions" ng-if="attribute.instructions"></p>\n \x3c!-- attributes which use the form-field structure --\x3e\n <div ng-repeat="(key, value) in post.values[attribute.key] track by key">\n <div ng-switch="attribute.input">\n \x3c!-- Standard fields --\x3e\n \x3c!-- type: date --\x3e\n <div ng-switch-when="date" >\n \x3c!-- Date icon --\x3e\n <div class="input-with-icon">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#calendar"></use>\n </svg>\n <input\n type="date"\n pick-a-date="date"\n pick-a-date-options="dateFormat"\n\n name="values_{{attribute.id}}"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n />\n </div>\n </div>\n \x3c!-- type: datetime --\x3e\n <div ng-switch-when="datetime" class="input-with-icon">\n <post-datetime\n id="values[{{attribute.key}}][{{key}}]"\n name="values_{{attribute.id}}"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n ></post-datetime>\n </div>\n \x3c!-- type: select --\x3e\n <select\n ng-switch-when="select"\n id="values[{{attribute.key}}][{{key}}]"\n name="values_{{attribute.id}}"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n >\n <option ng-repeat="opt in attribute.options" value="{{opt}}"><bdi>{{opt}}</bdi></option>\n </select>\n \x3c!-- type: number --\x3e\n <input\n ng-switch-when="number"\n id="values[{{attribute.key}}][{{key}}]"\n name="values_{{attribute.id}}"\n type="number"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n >\n \x3c!-- type: text --\x3e\n <input\n ng-switch-when="text"\n id="values[{{attribute.key}}][{{key}}]"\n name="values_{{attribute.id}}"\n type="text"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n adaptive-input\n >\n \x3c!-- type: textarea --\x3e\n <textarea\n ng-switch-when="textarea"\n data-min-rows="1"\n rows="1"\n class="adapt-field"\n style="overflow-x: hidden; word-wrap: break-word; height: 55px;"\n id="values[{{attribute.key}}][{{key}}]"\n name="values_{{attribute.id}}"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n adaptive-input\n msd-elastic>\n </textarea>\n\n \x3c!-- Non standard fields --\x3e\n \x3c!-- type: textarea --\x3e\n <textarea\n ng-switch-when="markdown"\n data-min-rows="1"\n rows="1"\n class="adapt-field"\n style="overflow-x: hidden; word-wrap: break-word; height: 55px;"\n id="values[{{attribute.key}}][{{key}}]"\n name="values_{{attribute.id}}"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n adaptive-input\n msd-elastic>\n </textarea>\n \x3c!-- type: relation --\x3e\n <post-relation\n attribute="attribute"\n key="key"\n id="values[{{attribute.key}}][{{key}}]"\n name="values_{{attribute.id}}"\n model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n ng-switch-when="relation"></post-relation>\n \x3c!-- type: location --\x3e\n <post-location\n attribute="attribute"\n key="key"\n id="values[{{attribute.key}}][{{key}}]"\n name="values_{{attribute.id}}"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n ng-switch-when="location"></post-location>\n \x3c!-- type: upload --\x3e\n <post-media\n ng-switch-when="upload"\n name="values_{{attribute.id}}"\n media-has-caption="attribute.config.hasCaption"\n media="medias[attribute.key]"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n ></post-media>\n \x3c!-- type: upload --\x3e\n <post-video-input\n ng-switch-when="video"\n name="values_{{attribute.id}}"\n video-url="post.values[attribute.key][key]"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n ></post-video-input>\n </div>\n </div>\n <div class="alert error" ng-show="form[\'values_\' + attribute.id].$dirty && taskIsMarkedCompleted()" ng-repeat="(error, value) in form[\'values_\' + attribute.id].$error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+"#warning\"></use>\n </svg>\n <span translate=\"{{'post.valid.values.' + error}}\" translate-values=\"{ label : attribute.label }\"></span>\n </div>\n </div>\n \x3c!-- Container for fieldset structured elements --\x3e\n <fieldset ng-if=\"isFieldSetStructure(attribute) && attribute.options.length > 0\">\n \x3c!-- Attribute Label --\x3e\n <label ng-class=\"{\n 'error': form['values_' + attribute.key].$invalid && form['values_' + attribute.key].$dirty,\n 'success': ! form['values_' + attribute.key].$invalid && form['values_' + attribute.key].$dirty,\n 'required': attribute.required\n }\">\n <svg ng-show=\"attribute.response_private\" class=\"iconic\">\n <use xlink:href=\""+n(0)+'#lock-locked"></use>\n </svg>\n <bdi>{{attribute.label}}<bdi>\n \n </label>\n \x3c!-- Attribute Instructions --\x3e\n <p markdown-to-html="attribute.instructions" ng-if="attribute.instructions"></p>\n\n \x3c!-- attributes which use the form-field structure --\x3e\n <div ng-switch="attribute.input">\n \x3c!-- type: radio --\x3e\n <div ng-switch-when="radio">\n <div ng-repeat="(key, value) in post.values[attribute.key] track by key">\n <div class="form-field radio" ng-repeat="option in attribute.options">\n <label>\n <input\n name="values_{{attribute.id}}"\n type="radio"\n ng-model="post.values[attribute.key][key]"\n ng-required="attribute.required"\n value="{{option}}"\n >\n <bdi>{{option}}</bdi>\n </label>\n </div>\n </div>\n </div>\n \x3c!-- type: checkbox --\x3e\n <div ng-switch-when="checkbox">\n <div class="form-field checkbox" ng-repeat="option in attribute.options">\n <label>\n <input\n type="checkbox"\n checklist-model="post.values[attribute.key]"\n ng-required="attribute.required"\n name="values_{{attribute.id}}_{{option}}"\n checklist-value="option"\n value="option"\n >\n <bdi>{{option}}</bdi>\n </label>\n </div>\n </div>\n \x3c!-- type: categories --\x3e\n <div ng-switch-when="tags">\n <post-category-editor\n available="attribute.options"\n selected="post.values[attribute.key]"\n form="form"\n form-id="post.form.id"\n attribute="attribute"\n post-value="post.values[attribute.key]"\n ></post-category-editor>\n </div>\n <div class="alert error" ng-show="form[\'values_\' + attribute.id].$dirty && taskIsMarkedCompleted()" ng-repeat="(error, value) in form[\'values_\' + attribute.id].$error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <span translate="{{\'post.valid.values.\' + error}}" translate-values="{ label : attribute.label }"></span>\n </div>\n </div>\n </fieldset>\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{formId:"=",attribute:"=",postValue:"=",available:"=",selected:"=",form:"="},controller:i,template:n(731)}}function i(e,t,n,s,i,a){}(e.exports=s).$inject=[],i.$inject=["$rootScope","$scope","TagEndpoint","FormAttributeEndpoint","Notify","_"]},function(e,t){e.exports='<category-selector\n enable-parents="false"\n selected="selected"\n form="form"\n available="available"\n></category-selector>\n<add-category\n form-id="formId"\n attribute="attribute"\n post-value="postValue"\n available="available"\n></add-category>'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{form:"=",post:"=",stages:"=",attributes:"=",visibleStage:"=",medias:"="},template:n(733),controller:i}}function i(t,e,n,s,i,a){t.setVisibleStage=function(e){t.visibleStage=e},t.stageIsComplete=function(e){return-1<t.post.completed_stages.indexOf(e)},t.toggleStageCompletion=function(e){e=parseInt(e),a.includes(t.post.completed_stages,e)?t.post.completed_stages=a.without(t.post.completed_stages,e):t.post.completed_stages.push(e)},t.setVisibleStage(t.visibleStage)}(e.exports=s).$inject=[],i.$inject=["$scope","FormEndpoint","FormStageEndpoint","FormAttributeEndpoint","PostEditService","_"]},function(e,t){e.exports='<div class="form-sheet" ng-repeat="stage in stages | limitTo: 1 - stages.length">\n <header class="form-sheet-summary">\n <h1 class="form-sheet-title section-title">{{stage.label}}</h1>\n </header>\n <div ng-show="stage.show_when_published" class="alert">\n <p translate="survey.task_visible_when_published">This task will be visible when post is published</p>\n </div>\n \x3c!-- Handle stage completion --\x3e\n <div ng-show="stage.task_is_internal_only" class="alert">\n <p>This task is marked for internal use only. It is not seen by users when they create a post.</p>\n </div>\n <div class="form-field switch">\n <label translate="post.task_completed" ng-class="{\'required\': stage.required}">Task completed</label>\n <div class="toggle-switch">\n <input\n class="tgl"\n ng-attr-id="{{ \'toggle-complete-\' + stage.id }}"\n type="checkbox"\n ng-checked="stageIsComplete(stage.id)"\n ng-click="toggleStageCompletion(stage.id)">\n <label class="tgl-btn" for="toggle-complete-{{stage.id}}" ng-attr-id="{{ \'toggle-complete-label-\' + stage.id }}"></label>\n\n </div>\n </div>\n <post-value-edit\n ng-repeat="attribute in stage.attributes | orderBy: \'priority\' as filtered_result track by attribute.id"\n post="post"\n form="form"\n medias="medias"\n attribute="attribute"\n ></post-value-edit>\n</div>\n'},function(e,t,i){"use strict";function n(e,n,s,t){return{restrict:"E",scope:{post:"=",form:"="},template:i(735),link:function(t){t.changeStatus=function(e){t.post.status=e,t.form.status.$setDirty()},t.allowedChangeStatus=function(){return t.post.allowed_privileges&&-1!==t.post.allowed_privileges.indexOf("change_status")},t.allowedChangeOwner=function(){return!1},t.editAuthor=function(){t.showEditAuthorButton=!1,t.showEditAuthorForm=!0},t.showUserRealname=function(){return!t.showEditAuthorForm&&!t.post.author_realname&&t.post.user},t.showAuthorRealname=function(){return!t.showEditAuthorForm&&t.post.author_realname},t.loadAuthorFormDefaults=function(){t.post.author_realname||t.post.user?(t.showEditAuthorButton=!0,t.showEditAuthorForm=!1):(t.showEditAuthorButton=!1,t.showEditAuthorForm=!0)},t.source=n.formatSource(t.post.source),t.post.user=n.loadUser(t.post),t.statuses=e.getStatuses(),t.displayCreated=s(t.post.created).format("LLL"),t.post.updated&&(t.displayUpdated=s(t.post.updated).format("LLL"))}}}(e.exports=n).$inject=["PostActionsService","PostMetadataService","moment","$rootScope"]},function(e,t,n){e.exports='<div class="toolbox" ng-if="post.id">\n \x3c!-- IF: User has permission to manage post status --\x3e\n <div class="tool" ng-if="allowedChangeStatus()" dropdown>\n <fieldset class="custom-fieldset init">\n <legend class="dropdown-trigger init" data-toggle="dropdown-menu" dropdown-toggle>\n <span class="legend-label">\n <span class="custom-fieldset-value">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#globe" ng-if="post.status==\'published\'"></use>\n <use xlink:href="'+n(0)+'#document" ng-if="post.status==\'draft\'"></use>\n <use xlink:href="'+n(0)+'#box" ng-if="post.status==\'archived\'"></use>\n </svg>\n <span translate="post.published" ng-if="post.status == \'published\'">Published</span>\n <span translate="post.draft" ng-if="post.status == \'draft\'">Under review</span>\n <span translate="post.archived" ng-if="post.status == \'archived\'">Archived</span>\n\n </span>\n </span>\n <svg class="iconic chevron">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio icon-input"\n name="status"\n ng-model="post.status"\n ng-repeat="status in statuses"\n ng-class="{\'checked\' : status == post.status}"\n ng-click="changeStatus(status)"\n >\n <label for="{{status}}">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#globe" ng-if="status==\'published\'"></use>\n <use xlink:href="'+n(0)+'#document" ng-if="status==\'draft\'"></use>\n <use xlink:href="'+n(0)+'#box" ng-if="status==\'archived\'"></use>\n </svg>\n <input type="radio" id="{{status}}" />\n <span translate="post.published" ng-if="status == \'published\'">Published</span>\n <span translate="post.draft" ng-if="status == \'draft\'">Under review</span>\n <span translate="post.archived" ng-if="status == \'archived\'">Archived</span>\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n \x3c!-- END: IF --\x3e\n\n \x3c!--// IF: User has permission to change the author & post timestamp //--\x3e\n <div class="tool" dropdown auto-close="disabled" ng-if="allowedChangeOwner()">\n <h6 class="tool-heading" translate="post.author">Author</h6>\n\n <span class="tool-trigger init" data-toggle="dropdown-menu" dropdown-toggle ng-click="loadAuthorFormDefaults()">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden">Show/hide</span>\n </span>\n\n <div class="toggle-content init" dropdown-menu>\n <div class="listing-item">\n <div class="listing-item-primary" ng-if="showUserRealname()">\n <div class="listing-item-image">\n <img src="//www.gravatar.com/avatar/{{ post.user.gravatar || \'00000000000000000000000000000000\' }}?d=retro&s=40" class="avatar">\n </div>\n <h2 class="listing-item-title">{{ post.user.realname }}</h2>\n <p class="listing-item-secondary"></p>\n </div>\n <div class="listing-item-primary" ng-if="showAuthorRealname()">\n <h2 class="listing-item-title">{{ post.author_realname }}</h2>\n <p class="listing-item-secondary"></p>\n </div>\n <div class="listing-item-primary" ng-if="showEditAuthorForm">\n <div class="form-field init">\n <input type="text" class="adapt-field" ng-model="post.author_realname" focus="showEditAuthorForm">\n </div>\n </div>\n </div>\n <button type="button" class="button-gamma button-flat" data-modal="edit-author" ng-click="editAuthor()" ng-if="showEditAuthorButton" translate="post.change_author">Change author</button>\n </div>\n </div>\n\n <div class="tool" dropdown auto-close="disabled">\n <h6 class="tool-heading" translate="post.post_date">Post date</h6>\n\n <span class="tool-trigger init" data-toggle="dropdown-menu" dropdown-toggle>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden">Show/hide</span>\n </span>\n\n <div class="toggle-content init" dropdown-menu>\n <fieldset>\n <post-datetime ng-model="post.post_date"></post-datetime>\n <ul class="metadata">\n <li><span translate="post.created_at"></span> {{displayCreated}} <span translate-values="{ source : source }" translate="post.source"></span></li>\n <li ng-if="post.updated"><span translate="post.updated_at"></span> {{displayUpdated}}</li>\n </ul>\n </fieldset>\n </div>\n </div>\n\n \x3c!-- END: IF --\x3e\n</div>\n'},function(e,t,n){"use strict";function s(e,t,o){return{restrict:"E",require:"ngModel",scope:{},template:n(737),link:function(e,t,n,s){function i(){e.orderValue={value:s.$viewValue,labelTranslateKey:"global_filter.sort.orderby."+s.$viewValue}}function a(e){o.isUndefined(e.value)&&(e={value:e}),s.$setViewValue(angular.copy(e.value))}e.orderValue={value:"created",labelTranslateKey:"global_filter.sort.orderby.created"},e.orderByOptions={value:"created",labelTranslateKey:"global_filter.sort.orderby.filter_type_tag",options:[{value:"post_date",labelTranslateKey:"global_filter.sort.orderby.post_date"},{value:"updated",labelTranslateKey:"global_filter.sort.orderby.updated"},{value:"created",labelTranslateKey:"global_filter.sort.orderby.created"}]},s.$render=i,e.$watch("orderValue",a,!0)}}}(e.exports=s).$inject=["moment","$rootScope","_"]},function(e,t){e.exports='<fieldset>\n <div class="toggle-content init active">\n <div class="custom-select">\n <select\n name="orderByOptions"\n id="order"\n ng-options="option.labelTranslateKey | translate for option in orderByOptions.options track by option.value"\n ng-model="orderValue">\n </select>\n </div>\n </div>\n</fieldset>\n'},function(e,t,s){"use strict";function n(e,t,n){return{restrict:"E",require:"ngModel",scope:{},template:s(739),link:function(e,t,n,s){function i(){e.selectedValue={value:s.$viewValue,labelTranslateKey:"global_filter.sort.order."+s.$viewValue}}function a(e){s.$setViewValue(angular.copy(e?e.value.toString():""),"radio")}e.selectedValue={value:"desc",labelTranslateKey:"global_filter.sort.order.desc"},e.activeOrderOptions={labelTranslateKey:"global_filter.sort.order.filter_type_tag",options:[{value:"desc",labelTranslateKey:"global_filter.sort.order.desc"},{value:"asc",labelTranslateKey:"global_filter.sort.order.asc"}]},s.$render=i,e.$watch("selectedValue",a,!0)}}}(e.exports=n).$inject=["moment","$rootScope","_"]},function(e,t){e.exports='<div class="form-field radio" ng-repeat="orderOption in activeOrderOptions.options">\n <label>\n <input type="radio" id="{{orderOption.value}}" value="{{orderOption.value}}" name="order" ng-model="selectedValue.value" />\n <span>{{orderOption.labelTranslateKey|translate}}</span>\n </label>\n</div>\n'},function(e,t,n){"use strict";function s(e){return{restrict:"E",require:"ngModel",template:n(741),scope:{},link:function(e,t,n,s){function i(){e.unlockedOnTop={value:s.$viewValue,labelTranslateKey:"global_filter.sort.unlockedOnTop.filter_type_tag"}}function a(e){s.$setViewValue(angular.copy(e?e.value.toString():""))}e.unlockedOnTop={value:"true",labelTranslateKey:"global_filter.sort.unlockedOnTop.filter_type_tag"},s.$render=i,e.$watch("unlockedOnTop",a,!0)}}}(e.exports=s).$inject=["_"]},function(e,t){e.exports='<div class="form-field checkbox" ng-model-options="{ updateOn: \'default\' }">\n <label>\n <input type="checkbox" id="unlockedOnTop" value="unlockedOnTop"\n name="unlockedOnTop" ng-model="unlockedOnTop.value"\n ng-true-value="\'true\'" ng-false-value="\'false\'"\n ng-model-options="{updateOn: \'default\'}">\n {{unlockedOnTop.labelTranslateKey|translate}}\n </label>\n</div>'},function(e,t,n){"use strict";var s,i=n(197),P=(s=i)&&s.__esModule?s:{default:s};function a(){return{restrict:"E",scope:{post:"<"},template:n(743),controller:o}}function o(o,s,t,e,n,i,a,r,l,c,d,u,p,g,m,h,f,v,b,y,_,w,x,k,S){o.everyone=e("translate")("post.modify.everyone"),o.validationErrors=[],o.visibleStage=1,o.enableTitle=!0,o.setVisibleStage=function(e){o.visibleStage=e},o.loadData=function(){var e=[m.queryFresh({formId:o.post.form.id}).$promise,h.queryFresh({formId:o.post.form.id}).$promise,v.queryFresh().$promise];o.post.id&&e.push(d.getLock({post_id:o.post.id}).$promise);return t.all(e).then(function(e){if(!o.post.id||e[3]){var t=o.post,n=y.sortBy(e[0],"priority"),s=y.chain(e[1]).sortBy("priority").value(),i=e[2];if(o.post.lock=e[3],s.map(function(e){"upload"===e.input&&(o.medias[e.key]={}),"tags"===e.input&&(e.options=_.filterPostEditorCategories(e.options,i)),o.post.values[e.key]?"date"===e.input||"datetime"===e.input?o.post.values[e.key][0]&&(o.post.values[e.key][0]=r(o.post.values[e.key][0]).toDate()):"number"===e.input?o.post.values[e.key][0]&&(o.post.values[e.key][0]=parseFloat(o.post.values[e.key][0])):"tags"===e.input&&o.post.values[e.key]&&(o.post.values[e.key]=o.post.values[e.key].map(function(e){return parseInt(e)})):"location"===e.input?o.post.values.message_location?o.post.values[e.key]=angular.copy(o.post.values.message_location):o.post.values[e.key]=[null]:"number"===e.input?o.post.values[e.key]=[parseInt(e.default)]:"date"===e.input||"datetime"===e.input?o.post.values[e.key]=e.default?[new Date(e.default)]:[new Date]:o.post.values[e.key]=[e.default]}),y.each(n,function(t){t.attributes=y.filter(s,function(e){return e.form_stage_id===t.id})}),t.completed_stages.length===n.length-1&&1<n.length)o.setVisibleStage(n[1].id);else{var a=y.filter(n,function(e){return!y.contains(t.completed_stages,e.id)});1<a.length&&o.setVisibleStage(a[1].id)}o.tasks=n}else x.go("posts.data.detail",{view:"data",postId:o.post.id})})},o.allowedChangeStatus=function(){return o.post.allowed_privileges&&-1!==o.post.allowed_privileges.indexOf("change_status")},o.deletePost=function(e){_.delete(e).then(function(){n.path("/")})},o.canSavePost=T,o.savePost=function(){if(o.editForm&&!o.editForm.$dirty)return b.infoModal("post.valid.no_changes"),void s.$broadcast("event:edit:post:data:mode:saveError");if(!o.canSavePost())return b.error("post.valid.validation_fail"),void s.$broadcast("event:edit:post:data:mode:saveError");w.saveMedia(o.medias,o.post).then(function(){"message_location"in o.post.values&&(o.post.values.message_location=[]);var e=p.cleanPostValues(angular.copy(o.post));0<o.tagKeys.length&&(e.tags=y.chain(e.values).pick(o.tagKeys).values().flatten().filter().uniq().value()),(e.id?c.update(e):c.save(e)).$promise.then(function(e){var t=e.status&&"published"===e.status?"notify.post.save_success":"notify.post.save_success_review";o.editForm.$dirty=!1,$=!0,x.go("posts.data.detail",{view:"data",postId:e.id}),e.id&&-1!==e.allowed_privileges.indexOf("read")&&(o.post.id=e.id),b.notify(t,{name:o.post.title}),s.$broadcast("event:edit:post:data:mode:saveSuccess",{post:e})},function(e){var n=[];y.each(e.data.errors,function(e,t){"limit::posts"===e.title?b.limit("limit.post_limit_reached"):n.push(e)}),b.errors(y.pluck(n,"message")),s.$broadcast("event:edit:post:data:mode:saveError")})})},o.tagKeys=[],o.save=i.instant("app.save"),o.saving=i.instant("app.saving"),o.cancel=function(){x.go("posts.data.detail",{postId:o.post.id})},o.submit=i.instant("app.submit"),o.submitting=i.instant("app.submitting"),o.hasPermission=s.hasPermission("Manage Posts"),o.selectForm=function(){o.form=o.post.form,o.loadData().then(function(){a(function(){"published"!==o.post.status||T()||b.error("post.valid.invalid_state")})})},o.isSaving=S.getSavingState;var $=!1;o.$on("event:edit:post:reactivate",function(){A()}),o.$on("event:edit:post:data:mode:save",function(){o.savePost()});var C=k.onStart({},function(e){return!(!$&&"posts.data.edit"===e.from().name)||new P.default(function(e,t){!o.editForm||o.editForm&&!o.editForm.$dirty?E().then(e,e):b.confirmLeave("notify.post.leave_without_save").then(function(){E().then(e,e)},function(){t()})})});function E(){return new P.default(function(e,t){if(!o.post.lock)return t();d.unlock({post_id:o.post.id}).$promise.then(e,t)})}function A(){o.post.form?o.selectForm():g.queryFresh().$promise.then(function(e){o.forms=e}),o.medias={},o.savingText=i.instant("app.saving"),o.submittingText=i.instant("app.submitting")}function T(){return p.validatePost(o.post,o.editForm,o.tasks)}o.$on("$destroy",function(){C()}),A()}(e.exports=a).$inject=[],o.$inject=["$scope","$rootScope","$q","$filter","$location","$translate","$timeout","moment","PostEntity","PostEndpoint","PostLockEndpoint","PostLockService","PostEditService","FormEndpoint","FormStageEndpoint","FormAttributeEndpoint","UserEndpoint","TagEndpoint","Notify","_","PostActionsService","MediaEditService","$state","$transitions","LoadingProgress"]},function(e,t,n){e.exports='<form name="editForm" novalidate>\n <div class="form-sheet" role="article">\n <div class="post-band" ng-style="{backgroundColor: form.color}"></div>\n \x3c!-- End post stage default fields --\x3e\n <div class="form-field">\n <twitter-widget ng-if="post.data_source_message_id" twitter-widget-id="post.data_source_message_id" twitter-widget-options="{\'align\': \'left\'}">\n </twitter-widget>\n </div>\n\n <div\n ng-if="!form"\n class="form-field init required"\n ng-class="{\'error\': editForm.form.$invalid && editForm.form.$dirty, \'success\': !editForm.form.$invalid && editForm.form.$dirty}"\n >\n\n <p translate="post.unstructured.add_survey.info" translate-values="{source:post.source}"></p>\n <label translate>post.unstructured.add_survey.title</label>\n <select\n class="custom-select"\n ng-change="selectForm(form)"\n ng-model="post.form"\n >\n <option selected disabled translate>post.unstructured.add_survey.choose</option>\n <option ng-repeat="form in forms" ng-value="form">{{form.name}}</option>\n </select>\n <div class="alert error" ng-show="editForm.form.$dirty" ng-repeat="(error, value) in editForm.form.$error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'post.valid.content.\' + error}}"></p>\n </div>\n </div>\n\n \x3c!-- Start Post custom fields --\x3e\n\n <post-value-edit\n ng-repeat="attribute in tasks[0].attributes | orderBy: \'priority\' as filtered_result track by attribute.id"\n post="post"\n post-field=true\n form="editForm"\n medias="medias"\n attribute="attribute"\n ng-if="form"\n ></post-value-edit>\n </div>\n \x3c!-- End Post custom fields --\x3e\n \x3c!-- IF: Editing an existing post --\x3e\n\n \x3c!-- ELSE IF: Adding a new post w/o permission to manage who it\'s visible to\n <div class="postcard-metadata">\n <strong>This post will need to be moderated</strong> before it\'s visible to the public.\n </div>\n END: IF --\x3e\n \x3c!-- IF: User has permission to see other \'Tasks\' --\x3e\n\n <post-toolbox form="editForm" post="post" ng-if="form"></post-toolbox>\n <post-tabs\n ng-show="tasks.length > 1"\n form="editForm"\n post="post"\n stages="tasks"\n attributes="attributes"\n medias="medias"\n visible-stage="visibleStage"\n ng-if="form"\n >\n </post-tabs>\n <post-messages post="post" ng-if="post.contact.id && post.source !== \'twitter\'"></post-messages>\n <div class="toolbar toolbar-secondary">\n <div class="button-group">\n\n <button class="button-flat" ng-click="cancel()" translate>app.cancel</button>\n <button class="button button-alpha" ng-click="savePost()" ng-if="!isSaving()" translate="">app.save</button>\n <loading-dots button-class="\'button-alpha\'" ng-if="isSaving()" disabled=true label="\'app.saving\'"></loading-dots>\n </div>\n </div>\n </form>\n'},function(e,t,n){"use strict";e.exports=["_","Util","$translate","$rootScope","SliderService",function(e,t,n,s,i){var a,o={showNoPostsSlider:function(){var t=function(){a&&a.$destroy();return a=s.$new()}();n(["post.there_are_no_posts","post.in_this_deployment"]).then(function(e){t.noPostText=e,i.openTemplate('<p><strong>{{noPostText["post.there_are_no_posts"]}}</strong>{{noPostText["post.in_this_deployment"]}}</p><add-post-text-button></add-post-text-button><button class="button-flat message-trigger" ng-click="close()">Dismiss</button>',"file",!1,t,!1,!1,!0)})}};return t.bindAllFunctionsToSelf(o)}]},function(e,t,n){"use strict";function s(f,v,b,y,_,w,x,k,e,S,$,C){return{restrict:"E",replace:!0,scope:{noui:"@",$transition$:"<",filters:"<"},template:n(746),link:function(a,s,e,t){var i,o,r=[],l=200,c=5,d=0,u=[];function p(e){var t=_.geoJson(e,{pointToLayer:v.pointToLayer,onEachFeature:n});i.options.clustering?(o=o||_.markerClusterGroup(),angular.forEach(t.getLayers(),function(e){o.addLayer(e)})):o=t,o.addTo(i),r.push(o),0<e.features.length&&i.fitBounds(t.getBounds()),15<i.getZoom()&&i.setZoom(15),S(function(){i.invalidateSize()},1)}function g(){a.$watch(function(){return a.filters},function(e,s){var t,n=b.omit(e,function(e,t,n){return b.isEqual(s[t],e)});0<b.keys(n).length&&(b.each(u,function(e){e.$cancelRequest()}),u=[],0<r.length&&(angular.forEach(r,function(e){e.clearLayers()}),o=void 0,r=[]),m(t).then(p))},!0)}function m(n,s,i){s=s||0,i=i||1,n=n||y.getQueryParams(a.filters);var e=b.extend(n,{limit:l,offset:s,has_location:"mapped"}),t=f.geojson(e);return u.push(t),t.$promise.then(function(e){if(0===s&&e.total>l&&(d=Math.floor((e.total-l)/l),d+=0<(e.total-l)%l?1:0),0<d&&1===i){var t=c<d?c:d;for(d-=c;0<t;)m(n,s+=l,--t).then(p)}return e})}function h(e){$.go("posts.data.detail",{postId:e.id},{reload:!0})}function n(n,e){e.on("click",function(e){var t,s=e.layer;s instanceof _.FeatureGroup&&(s=s.getLayers()[0]),s.getPopup()?s.openPopup():(t=n,f.get({id:t.properties.id}).$promise.then(function(e){var t=x.$new();t.post=e,t.goToPost=h,t.selectedPost={post:e};var n=k('<post-card selected-post="selectedPost" post="post" short-content="true" click-action="goToPost"></post-card>')(t);s.bindPopup(n[0],{minWidth:"300",maxWidth:"300",className:"pl-popup"}),s.openPopup()}))})}!function(){C("post.posts").then(function(e){a.title=e,a.$emit("setPageTitle",e)});var e=m(),t=a.noui?"#map-noui":"#map-full-size",n=v.createMap(s[0].querySelector(t)).then(function(e){i=e});w.all({map:n,posts:e}).then(function(e){return p(e.posts),e}).then(g),a.$watch(function(){return y.getModeId()},function(e){"savedsearch"===y.getMode()?$.go("posts.map.savedsearch",{savedSearchId:y.getModeId()}):"collection"===y.getMode()?$.go("posts.map.collection",{collectionId:y.getModeId()}):$.go("posts.map.all")}),a.$on("$destroy",function(){i&&i.remove()})}()}}}(e.exports=s).$inject=["PostEndpoint","Maps","_","PostFilters","Leaflet","$q","$rootScope","$compile","$location","$timeout","$state","$translate"]},function(e,t){e.exports='<div>\n <layout-class layout="a"></layout-class>\n <div ui-view="mode-context" noanimation="true" filters="filters"></div>\n <main role="main">\n\t\t<post-toolbar is-loading="isLoading" filters="filters" edit-mode="{ editing: false }"></post-toolbar>\n \t<div class="map-view">\n\t\t <div id="map-full-size" class="map full-size" ng-show="!noui"></div>\n\t\t <div id="map-noui" class="map map-only" ng-show="noui"></div>\n\t\t</div>\n\t</main>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",replace:!0,scope:{},controller:i}}function i(e,t,n,s,i,a){e.$on("mainsheet:statechange",function(){s.getState()&&"/views/create"===i.path()&&i.path("/views/map")}),n.allowedSurveys().then(function(e){0<(t.forms=e).length&&(t.disabled=!1),1===t.forms.length?i.path("/posts/create/"+t.forms[0].id):s.openTemplate("<add-post-survey-list></add-post-survey-list>","app.submit_response",t)},function(e){a.apiErrors(e)})}(e.exports=s).$inject=[],i.$inject=["$rootScope","$scope","PostSurveyService","MainsheetService","$location","Notify"]},function(e,t,s){"use strict";function n(t,e,n){return{restrict:"E",replace:!0,scope:{post:"=",canSelect:"=",selectedPosts:"=",shortContent:"@",externalClickAction:"=clickAction",selectedPost:"="},template:s(749),link:function(n,s){n.isPostLocked=function(){return e.isPostLockedForCurrentUser(n.post)},n.clickAction=function(e){var t=s.find("post-actions")[0];if(e&&s&&t.contains(e.target))return;n.externalClickAction(n.post)},function(e){e&&t.get({id:e.id},function(e){n.post.form=e})}(n.post.form),n.stopClickPropagation=function(e){e.stopPropagation()}}}}(e.exports=n).$inject=["FormEndpoint","PostLockService","$rootScope"]},function(e,t){e.exports='<article ng-class="[\'postcard\', {selected: post.id === selectedPost.post.id}]" >\n <div class="post-band" ng-style="{backgroundColor: post.form.color}"></div>\n <div class="listing-item-select">\n <input ng-show="canSelect" type="checkbox" checklist-value="post.id" checklist-model="selectedPosts" ng-click="stopClickPropagation($event)">\n </div>\n <div class="postcard-body" ng-click="clickAction($event)">\n <header class="postcard-header">\n\n <post-metadata post="post" hide-date-this-week="true"></post-metadata>\n \x3c!-- this is used in the map view card and the sidebar card in the data view--\x3e\n <post-actions post="post"></post-actions>\n </header>\n <div class="postcard-overflow">\n <div class="postcard-title">\n <div class="postcard-field">\n <div class="tweet-container">\n <twitter-widget ng-if="post.data_source_message_id && post.source === \'twitter\'" twitter-widget-id="post.data_source_message_id">\n </twitter-widget>\n </div>\n\n <bdi>{{ post.title || post.content | stripHtml | limitTo:150 }}{{ !post.title && post.content.length > 150 ? \' ...\' : \'\'}}</bdi>\n </div>\n </div>\n\n\n <post-preview-media post="post"></post-preview-media>\n \x3c!-- <img src="http://lorempixel.com/400/300/" class="postcard-image"> --\x3e\n\n <div ng-if="!shortContent" class="postcard-field">\n <bdi>{{ post.content | stripHtml }}</bdi>\n </div>\n <div ng-if="shortContent" class="postcard-field">\n <bdi>{{ post.content | stripHtml | limitTo:150 }}{{ post.content.length > 150 ? \' ...\' : \'\'}}</bdi>\n </div>\n </div>\n </div> \x3c!-- /postcard-body --\x3e\n</article>\n'},function(e,t,n){"use strict";e.exports=["FormAttributeEndpoint","MediaEndpoint","_",function(e,s,i){return{restrict:"E",replace:!0,scope:{post:"="},template:n(751),link:function(n){n.post.form&&e.query({formId:n.post.form.id}).$promise.then(function(e){var t=i.find(e,function(e){return"media"===e.type});!t||i.isUndefined(n.post.values[t.key])||i.isNumber(n.post.values[t.key])||s.get({id:n.post.values[t.key]}).$promise.then(function(e){n.media=e,n.hasCaption=!t.config||t.config.hasCaption})})}}}]},function(e,t){e.exports='<div class="postcard-field" ng-show="media">\n\t<img ng-if="hasCaption" ng-src="{{ media.original_file_url }}" alt="{{ media.caption }}" class="postcard-image">\n\t<img ng-if="!hasCaption" ng-src="{{ media.original_file_url }}" class="postcard-image">\n</div>\n\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:!0,replace:!0,controller:i,template:n(753)}}function i(t,n,e,s,i,a){t.forms=[],t.disabled=!0,t.handleClick=function(){1===t.forms.length?i.path("/posts/create/"+t.forms[0].id):e.openTemplate("<add-post-survey-list></add-post-survey-list>","app.submit_response",t)},t.upgradeButton=a.demoBarVisible&&a.loggedin,s.allowedSurveys().then(function(e){0<(t.forms=e).length&&(t.disabled=!1)},function(e){n.apiErrors(e)})}(e.exports=s).$inject=[],i.$inject=["$scope","Notify","MainsheetService","PostSurveyService","$location","$rootScope"]},function(e,t,n){e.exports='<div class="fab" ng-class="{\'upgrade-button\': upgradeButton}" data-message="add-post">\n <button type="button" class="button-alpha button-fab" ng-click="handleClick()" ng-disabled="disabled" ng-class="{\'disabled\': $parent.$parent.bulkActionsSelected}">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#plus"></use>\n <foreignObject>\n <img class="icon" src="'+n(207)+'">\n </foreignObject>\n </svg>\n <span class="hidden">Add</span>\n </button>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:!0,controller:i,template:n(755)}}function i(t,n){t.handleClick=function(e){t.closeMainsheet(),n.path("posts/create/"+e.id)}}(e.exports=s).$inject=[],i.$inject=["$scope","$location"]},function(e,t){e.exports='<ul>\n <li ng-repeat="form in forms" ng-show="!form.targeted_survey">\n <a ng-click="handleClick(form)">\n <span class="post-band" ng-style="{backgroundColor: form.color}"></span>\n <bdi>{{form.name}}</bdi>\n </a>\n </li>\n</ul>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:!0,controller:i,template:n(757)}}function i(t,e,n,s){function i(e){n.close(),s.path("/posts/create/"+e)}t.forms=[],t.buttonToggle=!1,t.buttonOptionsStyle={opacity:0,display:"none"},t.toggleButton=function(){1===t.forms.length?i(t.forms[0].id):(t.buttonToggle=!t.buttonToggle,t.buttonToggle?t.buttonOptionsStyle={opacity:1,display:"flex"}:t.buttonOptionsStyle={opacity:0,display:"none"})},t.createPost=i,t.disabled=!1,e.allowedSurveys().then(function(e){0<(t.forms=e).length&&(t.disabled=!1)})}(e.exports=s).$inject=[],i.$inject=["$scope","PostSurveyService","SliderService","$location"]},function(e,t,n){e.exports='<button type="button" class="button-alpha button-dropdown init" ng-click="toggleButton()" ng-class="{ \'active\': buttonToggle }">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#plus"></use>\n <foreignObject>\n <img class="icon" src="'+n(207)+'">\n </foreignObject>\n </svg>\n <span class="button-label" translate="nav.add_post">Add post</span>\n</button>\n\n<ul class="dropdown-menu init" ng-show="buttonToggle" ng-class="{ \'active\': buttonToggle }">\n <li ng-repeat="form in forms">\n <a ng-click="createPost(form.id)">\n <span class="post-band">\n </span>\n {{form.name}}\n </a>\n </li>\n</ul>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"="},controller:i,template:n(759)}}function i(e){}(e.exports=s).$inject=[],i.$inject=["$scope"]},function(e,t,n){e.exports='<div class="mode-context init" ng-controller="navigation as nav" dropdown auto-close="disabled" filter-by-survey-dropdown is-open="filtersMenuOpen">\n <header class="mode-context-header" ng-class="{ \'has-logo\' : nav.site.image_header }">\n <h1 class="mode-context-title"><a href="/" ng-bind="nav.site.name"></a></h1>\n <img ng-if="nav.site.image_header" ng-src="{{ nav.site.image_header }}" class="deployment-logo" />\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n\n <div class="mode-context-body">\n <p markdown-to-html="nav.site.description"></p>\n\n \x3c!-- <saved-search-create></saved-search-create> --\x3e\n <mode-context-form-filter></mode-context-form-filter>\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:!0,controller:i,template:n(761)}}function i(a,t,s,n,o,e,i,r,l,c){function d(e){var t=r.getQueryParams(e),n=o.extend({},t,{group_by:"form",include_unmapped:!0});return n.form&&delete n.form,n.source&&delete n.source,s.stats(n)}function u(n){var s,i;a.sourceStats=(s=n,i=[],o.each(["email","sms","twitter","web"],function(n){var e=o.filter(s.totals[0].values,function(e){var t=null===e.id?"none":e.id;return e.type===n&&o.contains(a.filters.form,t)});if(e&&0<e.length){var t={total:0};t.total=o.reduce(e,function(e,t){return t.total?e+t.total:e},t.total),t.type=n,i.push(t)}}),i),a.unmapped=n.unmapped?n.unmapped:0,o.each(a.forms,function(t){var e=o.filter(n.totals[0].values,function(e){return e.id===t.id&&o.contains(a.filters.source,e.type)});t.post_count=0,e&&(t.post_count=o.reduce(e,function(e,t){return t.total?e+t.total:0},t.post_count))})}a.forms=[],a.showOnly=function(e){a.filters.form.splice(0,a.filters.form.length,e)},a.hide=function(e){var t=a.filters.form.indexOf(e);-1!==t&&a.filters.form.splice(t,1)},a.hasManageSettingsPermission=e.hasManageSettingsPermission,a.canAddToSurvey=i.canCreatePostInSurvey,a.showLanguage=!1,a.languageToggle=function(){a.showLanguage=!a.showLanguage},a.unmapped=0,a.location=c,a.goToUnmapped=function(){var e=r.getDefaults();e.form.push("none"),e.has_location="unmapped",r.setFilters(e),c.path("/views/data")},a.unknown=[],function(){a.forms=t.query();var e=d(a.filters);n.all([a.forms.$promise,e.$promise]).then(function(e){e[1]&&e[1].totals&&e[1].totals[0]&&u(e[1])})}(),a.$watch(function(){return a.filters},function(e,s){var t=o.omit(e,function(e,t,n){return o.isEqual(s[t],e)});0<o.keys(t).length&&d(r.getFilters()).$promise.then(u)},!0)}(e.exports=s).$inject=[],i.$inject=["$scope","FormEndpoint","PostEndpoint","$q","_","$rootScope","PostSurveyService","PostFilters","$timeout","$location"]},function(e,t,n){e.exports='<form class="survey-filter">\n\n <div class="survey-filter-checkbox init" ng-class="{ checked : (filters.form.indexOf(form.id) !== -1) }" ng-repeat="form in forms" dropdown>\n <div class="survey-filter-parent">\n <div class="survey-filter-label">\n <span class="post-band" ng-style="{backgroundColor: form.color}"></span>\n <label class="checked">\n <input type="checkbox" checklist-value="form.id" checklist-model="filters.form">\n <bdi>{{ ::form.name }}</bdi>\n </label>\n </div>\n <span class="survey-filter-total init" data-toggle="dropdown-menu" dropdown-toggle>\n \x3c!-- todo! show count --\x3e\n {{ form.post_count }}\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </span>\n <ul class="dropdown-menu init" dropdown-menu>\n <li ng-show="canAddToSurvey(form)">\n <a ui-sref="postCreate({id: form.id })">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="label" translate="post.add_to_form" translate-values="{ form: form.name }">Add to</span>\n </a>\n </li>\n <div class="divider"></div>\n <li><a translate="post.show_only_form" translate-values="{ form: form.name }" ng-click="showOnly(form.id)">Show only </a></li>\n <li><a translate="post.hide_form" translate-values="{ form: form.name }" ng-click="hide(form.id)">Hide</a></li>\n <div class="divider"></div>\n <li ng-show="hasManageSettingsPermission()">\n <a ui-sref="settings.surveys.id({id: form.id, action: \'edit\'})">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#cog"></use>\n </svg>\n <span class="label" translate="nav.survey_settings">Survey settings</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n</form>\n<div class="tool" ng-show="unmapped > 0">\n <p>\n <span ng-show="unmapped < 2" translate="global_filter.unmapped_start_one"></span>\n <span ng-show="unmapped > 1" translate="global_filter.unmapped_start_many"></span>\n <a ng-click="goToUnmapped()" ng-show="unmapped < 2" translate="global_filter.unmapped_one" translate-values="{\'post_nb\': unmapped}">\n <a ng-click="goToUnmapped()" ng-show="unmapped > 1" translate="global_filter.unmapped_many" translate-values="{\'post_nb\': unmapped}">\n <strong>global_filter.unmapped_one</strong></a> <span translate="global_filter.unmapped_end"></span></p>\n</div>\n<div class="form-field" ng-show="hasManageSettingsPermission()">\n <a ui-sref="settings.surveys.create" class="button button-link">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="button-label" translate="app.create_new_survey">Create new survey</span>\n </a>\n</div>\n<div class="tool">\n <h6 class="tool-heading" translate="app.data_sources"></h6>\n <filter-by-datasource post-stats="sourceStats" filters="filters"></filter-by-datasource>\n</div>\n<div class="tool">\n <h6 class="tool-heading" translate="app.language">Language</h6>\n <span class="tool-trigger init" ng-class="{\'active\': showLanguage}">\n </span>\n <language-switch></language-switch>\n <div class="toggle-content" ng-class="{\'active\': showLanguage}">\n\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"="},replace:!0,controller:i,template:n(763)}}function i(e,t){e.openFilters=function(){t.$emit("filters:open:dropdown")}}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope"]},function(e,t){e.exports='<div class="embed-survey-filter" embed-only="true" class="toolbox hide-when-medium">\n <button ng-click="openFilters()" class="button-beta button-plain mode-context-trigger" translate="app.filter_by_survey">Filter by survey</button>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"A",replace:!0,controller:i}}function i(e,t){e.filtersMenuOpen=!1,t.$on("filters:open:dropdown",function(){e.filtersMenuOpen=!0})}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope"]},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"=",selectedPost:"="},controller:i,template:n(766)}}function i(e,t,n,s,i,a){function o(){return!(!e.selectedPost||!e.hasPermission)&&(!!e.selectedPost&&!s.isPostLockedForCurrentUser(e.selectedPost))}e.setEditMode=function(){o()&&i.go("posts.data.edit",{postId:e.selectedPost.id})},e.savePost=function(){t.$broadcast("event:edit:post:data:mode:save")},e.hasPermission=t.hasPermission("Manage Posts"),e.editEnabled=o,e.isLoading=a.getLoadingState,e.isSaving=a.getSavingState,e.editMode=function(){return"posts.data.edit"===i.$current.name},e.cancel=function(){i.go("posts.data.detail",{postId:e.selectedPost.id})},e.hideOtherActions=function(){e.filtersActive=!0},e.showOtherActions=function(){e.filtersActive=!1},e.filtersActive=!1}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope","Notify","PostLockService","$state","LoadingProgress"]},function(e,t){e.exports='<div class="toolbar">\n \x3c!-- toolbar --\x3e\n\n \x3c!-- floating action button --\x3e\n <add-post-button></add-post-button>\n\n <filter-posts filters="filters" embed-only="false" on-open="hideOtherActions()" on-close="showOtherActions()"></filter-posts>\n\n <div class="button-group" embed-only="false" ng-hide="filtersActive">\n <div ng-if="!editMode()">\n <post-share filters="filters" button="true"></post-share>\n <button ng-if="editEnabled()" class="button button-alpha" ng-click="setEditMode()" translate>app.edit</button>\n </div>\n\n <div ng-if="editMode()">\n <button ng-if="hasPermission" class="button" ng-click="cancel()" translate>app.cancel</button>\n <button ng-if="hasPermission && !isSaving()" ng-click="savePost()" class=" button button-alpha" translate>app.save</button>\n <loading-dots button-class="\'button-alpha\'" disabled=true label="\'app.saving\'" ng-if="isSaving()"></loading-dots>\n </div>\n </div>\n\n <div embed-only="true" class="hide-until-medium">\n <filter-posts filters="filters" on-open="hideOtherActions()" on-close="showOtherActions()"></filter-posts>\n <div class="button-group">\n <div ng-hide="filtersActive">\n <div ng-if="!editMode()">\n <post-share filters="filters" button="true"></post-share>\n <button ng-if="editEnabled()" class="button button-alpha" ng-click="setEditMode()" translate>app.edit</button>\n </div>\n\n <div ng-if="editMode()">\n <button ng-if="hasPermission" class="button" ng-click="cancel()" translate>app.cancel</button>\n <button ng-if="hasPermission && !isSaving()" ng-click="savePost()" class=" button button-alpha" translate>app.save</button>\n </div>\n </div>\n </div>\n <loading-dots button-class="\'button-alpha\'" disabled=true label="\'app.saving\'" ng-if="isSaving()"></loading-dots>\n </div>\n\n \x3c!-- toolbar --\x3e\n <div class="progress-bar" ng-show="isLoading()">\n <span>\n ..\n </span>\n </div>\n</div>'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"=",postStats:"="},replace:!0,controller:i,template:n(768)}}function i(a,e,t,o,n){function s(){if(a.providers=o.map(a.postStats,function(e){var t={};return t.label="sms"===e.type?"SMS":e.type.substr(0,1).toUpperCase()+e.type.substr(1),t.heading=l(t.label),t.total=r(e.type),t}),a.providers=o.chain(a.providers).compact().uniq().value(),a.dataSources){var i=["nexmo","twilio","frontlinesms","smssync"];o.each(a.dataSources,function(e,t){if(e){var n=o.contains(i,t)?"SMS":t.substr(0,1).toUpperCase()+t.substr(1);if(o.filter(a.providers,{label:n}).length<1){var s={};s.label=n,s.heading=l(s.label),s.total=r(t),a.providers.push(s)}}})}a.providers=o.sortBy(a.providers,"label")}function r(e){var t=o.findWhere(a.postStats,{type:e.toLowerCase()});return t&&t.total?t.total:0}function l(e){switch(e){case"Twitter":return"Tweets";case"SMS":return"SMS";case"Email":return"Emails";case"Web":return"Web";default:return" "}}a.dataSources=[],a.providers=[],a.formatHeading=l,a.showOnly=function(e){a.filters.form.indexOf("none")<0&&a.filters.form.push("none");a.filters.source=[e.toLowerCase()]},a.hide=function(t){-1!==a.filters.source.indexOf(t.toLowerCase())&&(a.filters.source=[],o.each(a.providers,function(e){e.label!==t&&a.filters.source.push(e.label.toLowerCase())}))},a.featureEnabled=function(){return e.isAdmin()},a.showOnlyIncoming=function(e){a.filters.form=["none"],a.filters.source=[e.toLowerCase()],n.path("/views/data")},a.assignStatsToProviders=s,a.getTotals=r,a.toggleFilters=function(e){var t=a.filters.source.indexOf(e);-1!==t?a.filters.source.splice(t,1):a.filters.source.push(e)},a.$watch("postStats",function(e){s()}),a.featureEnabled()&&t.get({id:"data-provider"}).$promise.then(function(e){a.dataSources=e.providers,s()})}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope","ConfigEndpoint","_","$location"]},function(e,t,n){e.exports='<form class="survey-filter">\n <div \n class="survey-filter-checkbox init"\n ng-class="{checked: (filters.source.indexOf(provider.label.toLowerCase()) !== -1)}"\n ng-repeat="provider in providers"\n dropdown\n >\n <div class="survey-filter-parent">\n <div class="survey-filter-label">\n <span class="post-band" ng-style="{backgroundColor: \'#00aced\'}"></span>\n <label>\n <input \n type="checkbox"\n ng-checked="filters.source.indexOf(provider.label.toLowerCase()) !== -1"\n translate\n ng-click="toggleFilters(provider.label.toLowerCase())"\n />\n {{provider.label}}\n </label>\n </div>\n <span class="survey-filter-total init" data-toggle="dropdown-menu" dropdown-toggle>\n {{provider.total}}\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </span>\n <div class="dropdown-menu init" dropdown-menu>\n <span class="post-band" ng-style="{backgroundColor: \'#00aced\'}"></span>\n <p>\n <em translate="post.messages.imported_by" translate-values="{messages: provider.heading}"></em>\n </p>\n <div class="divider"></div>\n <ul>\n <li>\n <a\n translate="post.show_only_form" \n translate-values="{form: provider.label}"\n ng-click="showOnly(provider.label)"\n ></a>\n </li>\n <li>\n <a\n translate="post.hide_form"\n translate-values="{form: provider.label}"\n ng-click="hide(provider.label)"\n ></a>\n </li>\n <li ng-if="featureEnabled()">\n <a\n translate="post.messages.show_only_incoming"\n translate-values="{provider: provider.heading.toLowerCase()}"\n ng-click="showOnlyIncoming(provider.label)"\n\n ></a>\n </li>\n <div class="divider"></div>\n <li ng-if="featureEnabled()">\n <div>\n <a href="/settings/datasources">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#pencil"></use>\n </svg>\n <span class="label">Edit {{provider.label}}</span>\n </a>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</form>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{post:"<",collection:"<",savedSearch:"<"},controller:i,template:n(770)}}function i(a,t,o,r,l,c,i,d,u,e,n,s,p,g,m,h,f){a.currentPage=1,a.selectedPosts=[],a.itemsPerPageOptions=[10,20,50],a.itemsPerPage=a.itemsPerPageOptions[1],a.totalItems=0,a.posts=[],a.groupedPosts={},a.deletePosts=function(){p.confirmDelete("notify.post.bulk_destroy_confirm",{count:a.selectedPosts.length}).then(function(){var e=r.map(a.selectedPosts,function(e){return a.selectedPosts=r.without(a.selectedPosts,e),l.delete({id:e}).$promise});u.all(e).then(function(e){p.notify("notify.post.destroy_success_bulk");var n=r.pluck(e,"id");a.totalItems=a.totalItems-n.length,angular.forEach(a.groupedPosts,function(e,t){a.groupedPosts[t]=r.reject(e,function(e){return r.contains(n,e.id)})}),a.posts=r.reject(a.posts,function(e){return r.contains(n,e.id)}),E(),a.posts.length||$(!1,!1,!0)},function(e){p.apiErrors(e)})})},a.hasFilters=function(){return o.hasFilters(a.filters)},a.userHasBulkActionPermissions=function(){return r.any(a.posts,function(e){return 0<r.intersection(e.allowed_privileges,["update","delete","change_status"]).length})},a.statuses=e.getStatuses(),a.changeStatus=function(t){var e=r.filter(a.posts,function(e){return r.contains(a.selectedPosts,e.id)}),n=a.selectedPosts.length,s=r.map(e,function(e){return e.status=t,l.update(e).$promise});u.all(s).then(function(){p.notify("notify.post.update_status_success_bulk",{count:n}),e.forEach(function(e){S(e)||k(e)}),E()},function(e){p.apiErrors(e)})},a.showPost=function(e,t){return function(){var t=u.defer();"posts.data.edit"!==m.$current.name||a.formData.form&&!a.formData.form.$dirty?t.resolve():p.confirmLeave("notify.post.leave_without_save").then(function(){t.resolve()},function(e){t.reject()});return t.promise}().then(function(){a.selectedPost.post=e,m.go("posts.data.detail",{postId:e.id})},function(){})},a.loadMore=function(){a.currentPage++,$(!1,!0,!1)},a.isLoading=h.getLoadingState,a.clearSelectedPosts=E,a.newPostsCount=0;var v,b=[];a.addNewestPosts=function(){Array.prototype.unshift.apply(a.posts,b),C(b),a.totalItems=a.totalItems+a.newPostsCount,b=[],a.newPostsCount=0,g.document.getElementById("post-data-view-top").scrollTop=0},a.selectBulkActions=function(){a.bulkActionsSelected=!0},a.bulkActionsSelected="",a.closeBulkActions=function(){a.bulkActionsSelected=""},a.selectedPost={post:a.post,next:{}},a.formData={form:{}},a.getPosts=$,a.shouldWeRunCheckForNewPosts=!0,a.activeCol=m.params.activeCol,a.deselectPost=function(){a.selectedPost={post:null,next:{}}},a.removePostThatDoesntMatchFilters=function(t){x(t).then(function(e){e&&k(t)})};var y=i().utc(),_=[];function w(){a.selectedPost.post&&a.posts[0]&&x(a.selectedPost.post).then(function(e){e&&(a.selectedPost.post=a.posts[0],m.go("posts.data.detail",{view:"data",postId:a.posts[0].id}))})}function x(e){var t=u.defer();if(a.hasFilters()){var n=o.getQueryParams(a.filters),s=r.extend({},n,{post_id:e.id});l.query(s).$promise.then(function(e){0===e.count?t.resolve(!0):t.reject(!1)})}else t.reject(!1);return t.promise}function k(s){a.posts.forEach(function(e,t){if(e.id===s.id){var n=a.posts[t+1];a.posts.splice(t,1),a.posts.length?(C(a.posts),a.selectedPost.post&&(a.selectedPost.post=n,m.go("posts.data.detail",{view:"data",postId:a.selectedPost.post.id}))):$(!(a.selectedPost={post:null,next:{}}),!1)}})}function S(t){var e=a.hasFilters()?a.filters.status:o.getDefaults().status,n=!1;return e.forEach(function(e){t.status===e&&(n=!0)}),n}function $(e,t,n,s){e=e||o.getQueryParams(a.filters);var i=r.extend({},e,{limit:a.itemsPerPage});!0===t&&(i.offset=(a.currentPage-1)*a.itemsPerPage),l.query(i).$promise.then(function(e){n&&(a.posts=[],a.groupedPosts={},a.totalItems=0,a.currentPage=1,a.selectedPosts=[],b=[],a.newPostsCount=0),!a.posts.length&&a.selectedPost.post&&(e.results.find(function(e){return e.id===a.selectedPost.post.id})||(a.selectedPost.post=e.results[0],m.go("posts.data.detail",{view:"data",postId:a.selectedPost.post.id})));Array.prototype.push.apply(a.posts,e.results),C(e.results),a.totalItems=e.total_count,0!==a.posts.count||o.hasFilters(a.filters)||c.showNoPostsSlider(),s&&s()})}function C(e){var t,n,s;angular.forEach((t=e,n=i(),s=i().subtract(1,"days"),r.groupBy(t,function(e){var t=i(e.post_date);return n.isSame(t,"d")?d.instant("nav.today"):s.isSame(t,"d")?d.instant("nav.yesterday"):t.fromNow()})),function(e,t){angular.isArray(a.groupedPosts[t])?Array.prototype.unshift.apply(a.groupedPosts[t],e):a.groupedPosts[t]=e})}function E(){a.selectedPosts.splice(0)}function A(){var e=o.getQueryParams(a.filters),t=i(e.date_before).utc();if(y.isSameOrBefore(t)&&"desc"===e.order&&"created"===e.orderby){var n=void 0;n=a.posts?r.extend({},e,{order:a.filters.order,orderby:a.filters.orderby,created_after_by_id:a.posts[0].id}):r.extend({},e,{order:a.filters.order,orderby:a.filters.orderby,created_after:y.format()}),l.query(n).$promise.then(function(e){var t,n;Array.prototype.unshift.apply(b,e.results),n="id",b=(t=b).map(function(e){return e[n]}).map(function(e,t,n){return n.indexOf(e)===t&&t}).filter(function(e){return t[e]}).map(function(e){return t[e]}),a.newPostsCount=e.count})}}function T(e){a.posts.length&&A(),v=n(T,e,!0,e)}_.push(a.$on("event:edit:post:data:mode:saveSuccess",function(e,t){var n=t.post;a.removePostThatDoesntMatchFilters(n)})),_.push(a.$on("event:edit:post:status:data:mode:saveSuccess",function(e,t){var n=t.post;!t.deleted&&S(n)||k(n)})),_.push(f.onSuccess({to:"posts.data.**"},function(){a.activeCol=m.params.activeCol})),_.push(f.onSuccess({to:"posts.data.*"},function(){a.selectedPost.post=r.findWhere(a.posts,{id:parseInt(m.params.postId,10)})})),a.$on("$destroy",function(){_.forEach(Function.prototype.call,Function.prototype.call)}),function(){if(d("post.posts").then(function(e){a.title=e,a.$emit("setPageTitle",e)}),a.filters=o.getFilters(),a.selectedPost.post){var e=o.getQueryParams(a.filters);e.created_before_by_id=a.selectedPost.post.id,$(e,!1),a.shouldWeRunCheckForNewPosts=!1}else $(!1,!1);a.$watch(function(){return o.reactiveFilters},function(){!0===o.reactiveFilters&&(a.filters.reactToFilters=!a.filters.reactToFilters||!a.filters.reactToFilters)},!0),a.$watch(function(){return a.filters},function(e,t){!0===o.reactiveFilters&&e!==t&&($(!1,!1,!0,w),o.reactiveFilters=!1)},!0),a.$watch("selectedPosts.length",function(){a.$emit("post:list:selected",a.selectedPosts)}),a.$on("$destroy",function(e){n.cancel(v)}),a.$on("event:edit:leave:form:complete",function(){r.isEmpty(a.selectedPost.next)||(a.selectedPost.post=a.selectedPost.next,a.selectedPost.next={},t.$broadcast("event:edit:post:reactivate"))}),a.$on("event:edit:post:data:mode:saveSuccess",function(e,t){var n,s;t.post&&(n=t.post,s=r.findIndex(a.posts,function(e){return e.id===n.id}),a.posts.splice(s,1,n))}),a.shouldWeRunCheckForNewPosts&&T(6e4)}()}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope","PostFilters","_","PostEndpoint","PostViewService","moment","$translate","$q","PostActionsService","$timeout","$location","Notify","$window","$state","LoadingProgress","$transitions"]},function(e,t,n){e.exports='\x3c!-- Below code is used to get the header to embeds --\x3e\n<div class="mode-context init" embed-only="true" ng-controller="navigation as nav" dropdown>\n <header class="mode-context-header" ng-class="{ \'has-logo\' : nav.site.image_header }">\n <h1 class="mode-context-title"><a href="/" ng-bind="nav.site.name"></a></h1>\n <img ng-if="nav.site.image_header" ng-src="{{ nav.site.image_header }}" class="deployment-logo" />\n </header>\n</div>\n<main role="main">\n\n<div class="flex-container">\n <layout-class layout="d"></layout-class>\n <post-toolbar selected-post="selectedPost.post" filters="filters"></post-toolbar>\n <div id="post-data-view-top" class="timeline-col" ng-class="{\'toolbar-active\': bulkActionsSelected, \'active\' : activeCol === \'timeline\' }">\n <div class="load-more" ng-show="newPostsCount > 0">\n <button class="button-flat button-gamma full-width" ng-click="addNewestPosts()">\n <span ng-switch on="newPostsCount">\n <span ng-switch-default translate="post.see_more_plural" translate-values="{ newPostsCount }">See new posts</span>\n <span ng-switch-when="1" translate="post.see_more_singular" translate-values="{ newPostsCount }">See new post</span>\n </span>\n </button>\n </div>\n <listing-toolbar\n entities="posts"\n selected-set="selectedPosts"\n >\n \x3c!-- status bulk actions --\x3e\n <span dropdown ng-if="userHasBulkActionPermissions()">\n <button class="button-beta init" data-toggle="toggle-content" dropdown-toggle>\n <span class="button-label" translate="app.mark_as">Mark as</span>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </button>\n <ul class="dropdown-menu toggle-content init" dropdown-menu unpositioned="true">\n <li ng-repeat="status in statuses">\n <a ng-click="changeStatus(status)">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#globe" ng-if="status==\'published\'"></use>\n <use xlink:href="'+n(0)+'#document" ng-if="status==\'draft\'"></use>\n <use xlink:href="'+n(0)+'#box" ng-if="status==\'archived\'"></use>\n </svg>\n <span class="label" translate="post.published" ng-if="status == \'published\'">Published</span>\n <span class="label" translate="post.draft" ng-if="status == \'draft\'">Under review</span>\n <span class="label" translate="post.archived" ng-if="status == \'archived\'">Archive</span>\n </a>\n </li>\n </ul>\n </span>\n\n <collection-toggle-button selected-posts="selectedPosts" posts="posts" on-done="clearSelectedPosts()"></collection-toggle-button>\n <button type="button" class="button-destructive" ng-click="deletePosts()" ng-if="userHasBulkActionPermissions()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label hidden">nav.delete</span>\n </button>\n\n <button href="" ng-click="closeBulkActions()" class="button-link toolbar-close-button">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#x"></use>\n </svg>\n <span class="hidden">Close</span>\n </button>\n\n </listing-toolbar>\n <div class="listing timeline init">\n\n <div class="bulk-action" ng-if="posts.length > 0 || !isLoading()">\n <div class="bulk-action-primary" translate="post.posts_total" translate-values="{\'posts\': posts.length, \'total_nb\': totalItems }"></div>\n <button id="bulk-action" ng-disabled="{{!totalItems}}" class="button-link bulk-action-secondary" ng-click="selectBulkActions()" ng-if="$root.loggedin" translate="post.modify.bulk_actions">Bulk Actions</button>\n </div>\n <post-card\n ng-repeat="post in posts"\n can-select="bulkActionsSelected"\n post="post"\n selected-posts="selectedPosts"\n click-action="showPost"\n selected-post="selectedPost"\n >\n </post-card>\n <div class="listing-item" ng-if="posts.length == 0 && hasFilters() && !isLoading()">\n <h4 translate>post.no_search_results</h4>\n </div>\n\n <div class="listing-item" ng-if="posts.length == 0 && !hasFilters() && !isLoading()">\n <h4 translate>post.no_posts_yet</h4>\n </div>\n\n <div class="listing-item" ng-if="posts.length > 0 || isLoading()">\n\n <div class="listing-item-primary">\n <button ng-disabled="isLoading()" ng-hide="( isLoading() || posts.length >= totalItems)" class="button-gamma button-flat" ng-click="loadMore()" translate="app.load_more">Load more\n </button>\n <loading-dots button-class="\'button-gamma button-flat\'" label="\'app.loading\'" ng-show="isLoading()"></loading-dots>\n </div>\n </div>\n </div>\n </div>\n <div class="post-col" ng-class="{\'active\' : activeCol === \'post\' }">\n \x3c!-- Verify if we need all these bindings ie. parentForm savingPost --\x3e\n <div ui-view filters="filters" is-loading="isLoading" saving-post="savingPost"></post-detail-data>\n </div>\n</div>\n<ush-logo></ush-logo>\n</main>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"=",onOpen:"&",onClose:"&"},replace:!0,controller:i,template:n(772)}}function i(t,e,n,s,i){function a(){t.status.isopen=!1}function o(e){e&&i&&i[0].contains(e.target)||t.$apply(a)}t.searchSavedToggle=!1,t.status={isopen:!1},t.hideDropdown=a,t.showDropdown=function(){t.status.isopen=!0},t.removeQueryFilter=function(){e.clearFilter("q","")},t.applyFilters=function(){e.reactiveFilters=!0,t.status.isopen=!1},e.reactiveFilters=!1,s.on("click",o),t.$on("$destroy",function(){s.off("click",o)}),t.$watch("status.isopen",function(e){e?t.onOpen():t.onClose()})}(e.exports=s).$inject=[],i.$inject=["$scope","PostFilters","$state","$document","$element"]},function(e,t,n){e.exports='<form name="postFiltersFormOpen"\n uib-dropdown\n is-open="status.isopen"\n role="search"\n class="searchbar"\n auto-close="disabled"\n ng-submit="applyFilters()"\n ng-model-options="{ updateOn : \'submit default\' }"\n data-message="search"\n ng-class="{ active: status.isopen }"\n>\n\n <div class="searchbar-input">\n \x3c!-- Search input --\x3e\n <div class="form-field">\n <label class="hidden" translate="toolbar.searchbar.search_entity">Search</label>\n <div class="input-with-icon">\n <input name="q" type="search" autocomplete="off"\n placeholder="{{ \'toolbar.searchbar.search_entity\' | translate }}"\n ng-model="filters.q" ng-model-options="{ debounce: 300 }" ng-click = "showDropdown()" ng-keyup="($event.keyCode === 27) ? hideDropdown(): showDropdown()" ng-keypress="($event.keyCode === 27) ? hideDropdown(): showDropdown()">\n <svg class="iconic" ng-show="!postFiltersFormOpen.q.$viewValue.length">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#magnifying-glass"></use>\n </svg>\n <svg class="iconic" ng-click="removeQueryFilter()" ng-show="postFiltersFormOpen.q.$viewValue.length">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n </div>\n </div>\n </div>\n\n\n \x3c!-- Toggle Filters show/hide --\x3e\n <div uib-dropdown-toggle class="searchbar-options">\n <a type="button" class="searchbar-options-filter button">\n <sort-and-filter-counter></sort-and-filter-counter>\n </a>\n </div>\n\n <filters-dropdown uib-dropdown-menu class="dropdown-menu" dropdown-status="status" filters="filters"></filters-dropdown>\n</form>\n'},function(e,t,n){"use strict";var s,i=n(774),p=(s=i)&&s.__esModule?s:{default:s};function a(r,d,u){return{restrict:"E",replace:!0,scope:{},require:"ngModel",link:function(a,e,t,n){if(!n)return;function s(){n.$viewValue&&Array.prototype.splice.apply(a.selectedCategories,[0,a.selectedCategories.length].concat(n.$viewValue))}function i(o,e){var t=o===e,n=!0===u.filtersInternalChange;if(n&&(u.filtersInternalChange=!1),t||!0==n)return o;var r=o,s=d.difference(o,e),i=d.difference(e,o),l=0<s.length,c=l?s[0]:i[0];return d.each(a.parents,function(t){if(0<t.children.length){var e=d.map(t.children,function(e){return e.id}),n=c===t.id;if(!(n=n||!!d.find(e,function(e){return e===c})))return;var s=d.find(o,function(e){return e===t.id}),i=d.every(e,function(t){return d.find(o,function(e){return e===t})}),a=d.every(e,function(t){return!d.find(o,function(e){return e===t})});!s&&i?(r=l?d.uniq(o.concat(t.id)):d.without.apply(d,[o].concat((0,p.default)(e))),u.filtersInternalChange=!0):(s&&a||s)&&(r=l?d.uniq(o.concat(e)):d.without(o,t.id),u.filtersInternalChange=!0)}}),r}function o(e,t){e=i(e,t),n.$setViewValue(angular.copy(e),n.$viewValue)}a.handleParents=i,a.categories=[],a.parents=[],a.selectedCategories=[],r.query().$promise.then(function(e){a.categories=e,d.each(a.categories,function(e){if(e.children){var n=[];d.each(e.children,function(t){d.each(a.categories,function(e){e.id===parseInt(t.id)&&n.push(e)}),e.children=n})}}),a.parents=d.filter(a.categories,function(e){if(null===e.parent_id)return e}),a.selectedCategories&&0!==a.selectedCategories.length||(a.selectedCategories=d.pluck(a.categories,"id"))}),a.$watch("selectedCategories",o,!0),a.$watch(function(){return n.$viewValue},s,!0),n.$render=s},template:n(779)}}(e.exports=a).$inject=["TagEndpoint","_","PostFilters"]},,,,,,function(e,t){e.exports='<fieldset ng-show="categories.length" ng-model-options="{ updateOn: \'default\' }">\n <label translate="nav.categories">Categories</label>\n <div class="form-field checkbox" ng-repeat="(index, category) in categories" ng-if="category.parent_id === null">\n <label>\n <input\n type="checkbox"\n checklist-value="category.id"\n value="category.id"\n checklist-model="selectedCategories"\n >\n <bdi>{{ ::category.tag }}</bdi>\n </label>\n <div\n class="form-field checkbox"\n ng-repeat="child in category.children"\n >\n <label>\n <input\n type="checkbox"\n checklist-model="selectedCategories"\n checklist-value="child.id"\n value="child.id"\n ng-selected="selectedCategories.indexOf(category.id) >-1"\n >\n <bdi>{{ ::child.tag }}</bdi>\n </label>\n </div>\n </div>\n</fieldset>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{dateBeforeModel:"=",dateAfterModel:"="},controller:i,template:n(781)}}function i(e){e.options={format:"yyyy-mm-dd"}}(e.exports=s).$inject=[],i.$inject=["$scope"]},function(e,t,n){e.exports='<fieldset>\n <label translate>global_filter.date_range</label>\n <div class="form-field date">\n <label class="hidden" translate="global_filter.filter_tabs.created_after">Start date</label>\n <div class="input-with-icon">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#calendar"></use>\n </svg>\n <input type="date" pick-a-date="dateAfter" pick-a-date-options="options" placeholder="{{ \'global_filter.filter_tabs.created_after\' | translate }}" ng-model="dateAfterModel" />\n </div>\n </div>\n <span class="date-joiner">to</span>\n\n\n <div class="form-field date">\n <label class="hidden" translate="global_filter.filter_tabs.created_before">End date</label>\n <div class="input-with-icon">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#calendar"></use>\n </svg>\n <input type="date" pick-a-date="dateBefore" pick-a-date-options="options" placeholder="{{ \'global_filter.filter_tabs.created_before\' | translate }}" ng-model="dateBeforeModel">\n </div>\n</div>\n\n\n</fieldset>\n'},function(e,t,n){"use strict";function s(o){return{restrict:"E",replace:!0,scope:{},require:"ngModel",link:function(e,t,n,s){if(!s)return;function i(){Array.prototype.splice.apply(e.selectedForms,[0,e.selectedForms.length].concat(s.$viewValue))}function a(e){s.$setViewValue(angular.copy(e))}e.forms=[],e.selectedForms=[],e.forms=o.query(),e.$watch("selectedForms",a,!0),e.$watch(function(){return s.$viewValue},i,!0),s.$render=i},template:n(783)}}(e.exports=s).$inject=["FormEndpoint"]},function(e,t){e.exports='<fieldset overflow-toggle has-overflow="forms.length > 1" ng-model-options="{ updateOn: \'default\' }">\n <label translate="app.surveys">Survey</label>\n\n <div class="form-field checkbox" ng-repeat="(index, form) in forms">\n <label>\n <input checklist-value="form.id" checklist-model="selectedForms" type="checkbox" name="selectedForms"> <bdi>{{ ::form.name }}</bdi>\n </label>\n </div>\n <div class="form-field checkbox">\n <label>\n <input checklist-value="\'none\'" checklist-model="selectedForms" type="checkbox" name="selectedForms" > <span translate="nav.unknown">Unknown</span>\n </label>\n </div>\n</fieldset>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",replace:!0,scope:{statusModel:"=",publishedToModel:"="},controller:i,template:n(785)}}function i(e,t,n){function s(){"draft"===e.statusModel?e.visible_to="draft":"all"!==e.statusModel&&("published"!==e.statusModel||e.publishedToModel)?e.visible_to=e.publishedToModel:e.visible_to="everyone"}e.roles=[],e.visible_to="",e.hasPermission=n.hasPermission,e.roles=t.query(),e.$watch("statusModel",s),e.$watch("publishedToModel",s),e.$watch("visible_to",function(){"everyone"===e.visible_to?(e.statusModel="all",e.publishedToModel=""):"draft"===e.visible_to?(e.statusModel="draft",e.publishedToModel=""):(e.statusModel="published",e.publishedToModel=e.visible_to)})}(e.exports=s).$inject=[],i.$inject=["$scope","RoleEndpoint","$rootScope"]},function(e,t,n){e.exports='<fieldset overflow-toggle has-overflow="roles.length">\n <legend translate="global_filter.who_its_visible_to">Who it\'s visible to</legend>\n\n <div class="form-field radio">\n <label>\n <input type="radio" name="visible_to" ng-model="visible_to" value="everyone"> <span translate="nav.everyone">Everyone</span>\n </label>\n </div>\n\n <div class="form-field radio" ng-repeat="role in roles" ng-class="{ overflow : ($index > 0) }">\n <label>\n <input type="radio" name="visible_to" ng-model="$parent.visible_to" value="{{ role.name }}"> {{ ::role.display_name }}\n </label>\n </div>\n <div class="form-field radio" ng-class="{ overflow : (roles.length > 0) }">\n <label>\n <input type="radio" name="visible_to" ng-model="visible_to" value="draft">\n <span translate="nav.only_you" ng-hide="hasPermission(\'Manage Posts\')">Only you</span>\n <span translate="nav.only_author" ng-show="hasPermission(\'Manage Posts\')">Only the author (draft)</span>\n </label>\n </div>\n <span class="form-field-toggle">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span translate="nav.more">More</span>\n </span>\n</fieldset>\n'},function(e,t,n){"use strict";function s(o,r){return{restrict:"E",replace:!0,scope:{},require:"ngModel",link:function(e,t,n,s){function i(){Array.prototype.splice.apply(e.selectedStatuses,[0,e.selectedStatuses.length].concat(s.$viewValue))}function a(e){s.$setViewValue(angular.copy(e))}e.statuses=o.getStatuses(),e.selectedStatuses=[],e.hasPermission=r.hasPermission,e.$watch("selectedStatuses",a,!0),e.$watch(function(){return s.$viewValue},i,!0),s.$render=i},template:n(787)}}(e.exports=s).$inject=["PostActionsService","$rootScope"]},function(e,t,n){e.exports='<fieldset ng-model-options="{ updateOn: \'default\' }" ng-show="hasPermission(\'Manage Posts\')">\n <label translate="global_filter.status">Status</label>\n\n <div class="form-field checkbox icon-input" ng-repeat="(index, status) in statuses">\n\n <label>\n <svg class="iconic" ng-if="status == \'published\'">\n <use xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <svg class="iconic" ng-if="status == \'draft\'">\n <use xlink:href="'+n(0)+'#document"></use>\n </svg>\n <svg class="iconic" ng-if="status == \'archived\'">\n <use xlink:href="'+n(0)+'#box"></use>\n </svg>\n\n <input type="checkbox" ng-model="status" checklist-model="selectedStatuses" checklist-value="status" name="selectedStatuses">\n <span translate="post.published" ng-if="status == \'published\'">Published</span>\n <span translate="post.draft" ng-if="status == \'draft\'">Under review</span>\n <span translate="post.archived" ng-if="status == \'archived\'">Archive</span>\n\n </label>\n </div>\n</fieldset>\n'},function(e,t,n){"use strict";function s(o){return{restrict:"E",replace:!0,scope:{},require:"ngModel",link:function(e,t,n,s){function i(){Array.prototype.splice.apply(e.selectedSources,[0,e.selectedSources.length].concat(s.$viewValue))}function a(e){s.$setViewValue(angular.copy(e))}e.selectedSources=[],e.hasPermission=o.hasPermission,e.$watch("selectedSources",a,!0),e.$watch(function(){return s.$viewValue},i,!0),s.$render=i},template:n(789)}}(e.exports=s).$inject=["$rootScope"]},function(e,t,n){e.exports='<fieldset overflow-toggle has-overflow="false" ng-model-options="{ updateOn: \'default\' }">\n <label translate="global_filter.source">Source</label>\n\n <div class="form-field checkbox icon-input">\n <label>\n <input type="checkbox" ng-model="source" checklist-model="selectedSources" checklist-value="\'email\'" name="selectedSources">\n <span>Email</span>\n </label>\n </div>\n <div class="form-field checkbox icon-input">\n <label>\n <input type="checkbox" ng-model="source" checklist-model="selectedSources" checklist-value="\'sms\'" name="selectedSources">\n <span>SMS</span>\n </label>\n </div>\n <div class="form-field checkbox icon-input">\n <label>\n <input type="checkbox" ng-model="source" checklist-model="selectedSources" checklist-value="\'twitter\'" name="selectedSources">\n <span>Twitter</span>\n </label>\n </div>\n <div class="form-field checkbox icon-input">\n <label>\n <input type="checkbox" ng-model="source" checklist-model="selectedSources" checklist-value="\'web\'" name="selectedSources">\n <span>Web</span>\n </label>\n </div>\n\n <span class="form-field-toggle">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span translate="nav.more">More</span>\n </span>\n</fieldset>\n'},function(e,t,n){"use strict";function s(s,i){return{restrict:"E",replace:!0,scope:{centerPointModel:"=",withinKmModel:"="},link:function(n,e,t){n.geocoding=!1,n.locationSearchText="",n.$watch("centerPointModel",function(e,t){n.locationSearchText||(n.locationSearchText=n.centerPointModel)}),n.$watch("locationSearchText",function(){n.locationSearchText?function(e){var t=i.defer();if(!e)return;/\-?[0-9]+(\.[0-9]+)?\s*,\s*\-?[0-9]+(\.[0-9]+)?/.test(e)?t.resolve(e):(n.geocoding=!0,s.searchCoordinates(e).then(function(e){e?(n.geocoding=!1,t.resolve(e[0]+","+e[1])):t.reject()}));return t.promise}(n.locationSearchText).then(function(e){n.centerPointModel=e}):n.centerPointModel=""})},template:n(791)}}(e.exports=s).$inject=["Geocoding","$q"]},function(e,t,n){e.exports='<fieldset>\n <legend translate="global_filter.location">Location</legend>\n\n <div class="form-field">\n <div class="input-with-icon">\n <input type="text" style="padding-left: 24px;" placeholder="{{ \'global_filter.location_placeholder\' | translate }}" ng-model="locationSearchText">\n <svg class="iconic" style="left: 8px;">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#location"></use>\n </svg>\n </div>\n </div>\n\n <div class="form-field">\n <select ng-model="withinKmModel" convert-to-number>\n <option value="1" translate>global_filter.option_1</option>\n <option value="10" translate>global_filter.option_2</option>\n <option value="50" translate>global_filter.option_3</option>\n <option value="100" translate>global_filter.option_4</option>\n <option value="500" translate>global_filter.option_5</option>\n </select>\n </div>\n\n</fieldset>\n\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",replace:!0,scope:{hasLocation:"="},require:"ngModel",link:i,template:n(793)}}function i(e,t,n,s){function i(e){s.$setViewValue(angular.copy(e))}e.$watch("hasLocation",i,!0)}(e.exports=s).$inject=[]},function(e,t){e.exports='<fieldset>\n <legend translate="global_filter.filter_tabs.has_location"></legend>\n <div class="form-field radio">\n <label translate="global_filter.filter_tabs.all_posts"> </label>\n <input \n ng-value=\'all\'\n ng-checked="hasLocation === \'all\'"\n ng-model="hasLocation"\n type="radio" \n name="hasLocation"\n > \n </div>\n <div class="form-field radio">\n <label translate="global_filter.filter_tabs.unmapped"></label>\n <input\n value=\'unmapped\' \n ng-model="hasLocation"\n type="radio"\n name="hasLocation"\n ng-checked="hasLocation === \'unmapped\'"\n > \n </div>\n <div class="form-field radio">\n <label translate="global_filter.filter_tabs.mapped"></label>\n <input\n value=\'mapped\'\n ng-model="hasLocation"\n ng-checked= "hasLocation === \'mapped\'"\n type="radio"\n name="hasLocation"\n >\n </div>\n</fieldset>\n'},function(e,t,s){"use strict";function n(e,t,d,u,p,n){return{restrict:"E",scope:!0,require:"ngModel",template:s(795),link:function(r,e){var l;function t(e,t,n){var s=angular.copy(d.getUIActiveFilters(e));if(p.rawFilters=angular.copy(e),"savedsearch"===d.getMode()?!0!==n&&r.savedSearch&&l.id===d.getModeId()||(r.collection=null,l=angular.copy(d.getModeEntity("savedsearch")),r.savedSearch=d.getModeEntity("savedsearch")):(r.savedSearch=null,l=null),r.userCanUpdateSavedSearch=!1,r.uiFilters=s,r.savedSearch){var i=d.getUIActiveFilters(l.filter);r.savedSearch.filter=function(e,t,n,s){e=d.getUIActiveFilters(e),e=d.cleanRemovedValuesFromObject(s,e);var i=d.getUIActiveFilters(e),a=d.getUIActiveFilters(t),o=d.getUIActiveFilters(n),r=d.addIfCurrentObjectMatchesOriginal(i,a,o);return d.getUIActiveFilters(r)}(r.savedSearch.filter,i,r.uiFilters,e);var a=c(i,r.savedSearch.filter),o=c(e,r.savedSearch.filter);r.userCanUpdateSavedSearch=u.contains(r.savedSearch.allowed_privileges,"update")&&(a||o),r.uiFilters=d.cleanUIFilters(r.uiFilters,r.savedSearch.filter)}}function c(e,n){return 0<u.filter(e,function(e,t){return u.isArray(e)?0!==u.difference(n[t],e).length||0!==u.difference(e,n[t]).length:n[t]!==e}).length}r.uiFilters={},r.savedSearch=null,r.collection=d.getModeEntity("collection"),r.removeFilter=function(e,t,n,s){s.preventDefault(),s.stopPropagation(),n?(n.filter=d.clearFilterFromArray(e,t,n.filter),d.clearFilter(e,t),r.savedSearch=n):d.clearFilter(e,t)},r.transformFilterValue=function(e,t){return p.transformers[t]?p.transformers[t](e):e},r.removeSavedSearch=function(e,t){t.preventDefault(),t.stopPropagation(),l=null,r.savedSearch=null,d.setMode("all",null),u.each(e.filter,function(e,n){u.isArray(e)?u.each(e,function(e,t){d.clearFilter(n,e)}):d.clearFilter(n,e)})},r.removeCollection=function(e,t){t.preventDefault(),t.stopPropagation(),r.collection=null,d.setMode("all",null),d.setFilter("status",d.getDefaults().status)},r.showSaveSavedSearchButton=function(){return!r.collection&&!u.isEmpty(r.uiFilters)&&!r.savedSearch&&n.loggedin},r.userCanUpdateSavedSearch=!1,r.$on("savedSearch:update",function(){t(d.getActiveFilters(d.getFilters()),0,!0)}),r.$on("collection:update",function(){t(d.getActiveFilters(d.getFilters()),0,!0)}),r.$watch(function(){return d.getModeId()},function(e,t){e!==t&&"collection"===d.getMode()&&(r.collection=d.getModeEntity("collection"),r.savedSearch=null,l=null)},!0),p.requestsFiltersData().then(function(e){r.$watch(function(){return d.getActiveFilters(d.getFilters())},t,!0)}),r.isArray=angular.isArray}}}(e.exports=n).$inject=["$translate","$filter","PostFilters","_","FilterTransformers","$rootScope"]},function(e,t,n){e.exports='<div class="form-field saved-search" ng-show="collection">\n <span class="bug">\n <svg class="iconic" ng-click="removeCollection(collection, $event)">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n <span><em><translate translate="app.collection"></translate>: </em><bdi>{{collection.name}}<bdi></span>\n </span>\n</div>\n<div class="form-field saved-search" ng-show="savedSearch">\n <span class="bug">\n <svg class="iconic" ng-click="removeSavedSearch(savedSearch, $event)">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n <span><em><translate translate="app.saved_search"></translate>: </em><bdi>{{savedSearch.name | translate}}</bdi></span>\n </span>\n <div ng-repeat="(key, values) in savedSearch.filter">\n <span ng-if="isArray(values)">\n <span class="bug saved-search-filter" ng-repeat="value in values track by $index ">\n <svg class="iconic" ng-click="removeFilter(key, value, savedSearch, $event)">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n <span><em><translate translate="global_filter.filter_tabs.{{key}}"></translate>:</em> <bdi>{{ transformFilterValue(value, key) }}</bdi></span>\n </span>\n </span>\n <span ng-if="!isArray(values)">\n <span class="bug saved-search-filter">\n <svg class="iconic" ng-click="removeFilter(key, values, savedSearch, $event)">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n <span><em><translate translate="global_filter.filter_tabs.{{key}}"></translate>:</em> <bdi>{{ transformFilterValue(values, key) }}</bdi></span>\n </span>\n </span>\n </div>\n</div>\n<div class="form-field">\n <div ng-repeat="(key, values) in uiFilters" class="inline-filters">\n <span ng-if="isArray(values)">\n <span class="bug" ng-repeat="value in values track by $index" >\n <svg class="iconic" ng-click="removeFilter(key, value, false, $event)">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n <span><em><translate translate="global_filter.filter_tabs.{{key}}"></translate>:</em> <bdi>{{ transformFilterValue(value, key) }}</bdi></span>\n </span>\n </span>\n <span ng-if="!isArray(values)">\n <span class="bug">\n <svg class="iconic" ng-click="removeFilter(key, values, false, $event)">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#circle-x"></use>\n </svg>\n <span><em><translate translate="global_filter.filter_tabs.{{key}}"></translate>:</em> <bdi>{{ transformFilterValue(values, key) }}</bdi></span>\n </span>\n </span>\n </div>\n</div>\n\n<div class="form-field" ng-show="showSaveSavedSearchButton()">\n <button type="button" class="button button-alpha right" ng-click="saveSavedSearchModal()" translate="set.save_savedsearch">Save search</button>\n</div>\n<div class="form-field" ng-show="userCanUpdateSavedSearch">\n <button type="button" class="button button-alpha right" ng-click="$parent.editSavedSearchModal(\'update\')" translate="set.update_savedsearch">Edit Saved search</button>\n</div>\n'},function(e,t,n){"use strict";function s(a,e,t,n){var s=window.filterState=d(),i=[],o=[],r="all",l=null;return c(),{resetDefaults:function(){var e=this;return c().then(function(){e.clearFilters()})},getDefaults:d,getQueryParams:function(e){var s=d(),t=a.omit(e,function(e,t,n){return"saved_search"===t||("reactiveFilters"===t||!a.isDate(e)&&(!("tags"!==t&&"form"!==t||!a.isArray(s[t])||0!==a.difference(e,s[t]).length||0!==a.difference(s[t],e).length)||(a.isObject(e)||a.isArray(e)?a.isEmpty(e):!e)))});e.center_point?(t.center_point=e.center_point,t.within_km=e.within_km||10):delete t.within_km;"collection"===r&&(t.set=[g()].concat(t.set));return t},getFilters:function(){return s},setFilters:function(e){"all"===e.status&&(e.status=["published","draft","archived"]);return angular.extend(s,d(),e)},setFilter:function(e,t){return s[e]=t,s},clearFilters:function(){return this.filtersInternalChange=!1,angular.copy(d(),s),this.reactiveFilters=!0,s},clearFilter:function(e,t){s=this.clearFilterFromArray(e,t,s)},clearFilterFromArray:function(e,t,n){this.filtersInternalChange=!1,Array.isArray(n[e])&&1<n[e].length?n[e].splice(n[e].indexOf(t),1):n[e]=d()[e];return n},hasFilters:function(e){return!a.isEmpty(u(e))},getActiveFilters:u,getUIActiveFilters:function(e){var s=d();return a.omit(e,function(e,t,n){return s[t]===e||("saved_search"===t||("within_km"===t||(!!a.isEqual(s[t],e)||(!(!a.isArray(s[t])||0!==a.difference(e,s[t]).length||0!==a.difference(s[t],e).length)||a.isEmpty(e)&&!a.isDate(e)))))})},setMode:function(e,t){e!==r&&"collection"===(r=e)&&this.clearFilters();l=t},getMode:p,getModeId:g,getModeEntity:function(e){return p()!==e?null:l},countFilters:function(){var e=a.keys(this.getActiveFilters(this.getFilters())).length;"collection"===r&&e++;return e},cleanUIFilters:function(s,i){return a.each(s,function(e,t){if(!a.isArray(s[t])&&s.hasOwnProperty(t)&&!a.isEmpty(i[t])||!a.isArray(s[t])&&s[t]===d()[t])delete s[t];else if(a.isArray(s[t])){var n=a.difference(e,i[t]);0===n.length?delete s[t]:s[t]=n}}),s},cleanRemovedValuesFromObject:function(n,s){var e=a.pick(s,a.without(a.keys(n),a.keys(s)));return e=a.mapObject(e,function(e,t){return a.isArray(s[t])?a.filter(s[t],function(e){return-1<n[t].indexOf(e)}):n[t]})},addIfCurrentObjectMatchesOriginal:function(n,s,i){return a.mapObject(s,function(e,t){return a.isArray(e)?a.every(s[t],function(e){return a.contains(i[t],e)})?a.intersection(s[t],i[t]):a.intersection(n[t],i[t]):i[t]})},reactiveFilters:!0,filtersInternalChange:!0};function c(){return n.all([t.query().$promise,e.query().$promise]).then(function(e){o=a.pluck(e[0],"id"),(i=e[1]).push({id:"none"}),s.form=s.form||[],0===s.form.length&&Array.prototype.splice.apply(s.form,[0,0].concat(a.pluck(i,"id")))})}function d(){return{q:"",date_after:"",date_before:"",status:"collection"===r?["published","draft","archived"]:["published","draft"],published_to:"",center_point:"",has_location:"all",within_km:"1",current_stage:[],tags:o,saved_search:"",orderby:"created",order:"desc",order_unlocked_on_top:"true",form:a.pluck(i,"id"),set:[],user:!1,source:["sms","twitter","web","email"]}}function u(e){var s=d();return a.omit(e,function(e,t,n){return"reactiveFilters"===t||("saved_search"===t||("within_km"===t||(!!a.isEqual(s[t],e)||(!(!a.isArray(s[t])||0!==a.difference(e,s[t]).length||0!==a.difference(s[t],e).length)||a.isEmpty(e)&&!a.isDate(e)))))})}function p(){return r}function g(){return l?l.id:null}}(e.exports=s).$inject=["_","FormEndpoint","TagEndpoint","$q"]},function(e,t,n){"use strict";function s(t,e,n,s,i,a,o,r,l,c,d){var u,p,g,m,h=[],f=this;return this.rawFilters={},this.requestsFiltersData=function(){return d.all([s.query().$promise,i.query().$promise,n.query().$promise,e.query().$promise,a.query({}).$promise,o.query({}).$promise]).then(function(e){t.indexBy(e[0],"name"),u=t.indexBy(e[1],"id"),p=t.indexBy(e[2],"id"),g=t.indexBy(e[3],"id"),m=t.indexBy(e[4],"id"),h=t.indexBy(e[5],"id")})},this.transformers={order_unlocked_on_top:function(e){var t="true"===e?"yes":"no";return l.instant("global_filter.filter_tabs.order_group.unlocked_on_top_"+t)},order:function(e){return l.instant("global_filter.filter_tabs.order_group.order."+e.toLowerCase())},orderby:function(e){return l.instant("global_filter.filter_tabs.order_group.orderby."+e)},tags:function(e){return p[e]?p[e].tag:e},user:function(e){return u[e]?u[e].realname:e},saved_search:function(e){return e?m[e.id].name:""},set:function(e){return e?h[e.id].name:""},center_point:function(e){return l.instant("global_filter.filter_tabs.location_value",{value:f.rawFilters.location_text?this.rawFilters.location_text:e,km:f.rawFilters.within_km})},created_before:function(e){return c("date","longdate")(e)},created_after:function(e){return c("date","longdate")(e)},date_before:function(e){return c("date","longdate")(e)},date_after:function(e){return c("date","longdate")(e)},status:function(e){return l.instant("post."+e)},source:function(e){return r.formatSource(e)},form:function(e){return g[e]?g[e].name:e}},f}(e.exports=s).$inject=["_","FormEndpoint","TagEndpoint","RoleEndpoint","UserEndpoint","SavedSearchEndpoint","CollectionEndpoint","PostMetadataService","$translate","$filter","$q"]},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{dropdownStatus:"=",filters:"="},controller:i,template:n(799)}}function i(s,e,i,n,a,o){s.canUpdateSavedSearch=!1,s.$watch(i.getModeId,function(e,t){var n;t===e&&void 0!==s.canUpdateSavedSearch||(n=i.getModeEntity("savedsearch"),s.canUpdateSavedSearch=n&&o.contains(n.allowed_privileges,"update"))}),s.savedSearch={view:"map",role:[]},s.clearFilters=function(){o.contains(["savedsearch","collection"],i.getMode())&&i.getModeId()&&(i.setMode("all"),e.$current.includes["posts.map"]?e.go("posts.map.all"):e.go("posts.data")),s.filters=i.clearFilters(),s.dropdownStatus.isopen=!s.dropdownStatus.isopen,s.canUpdateSavedSearch=!1},s.saveSavedSearchModal=function(){s.savedSearch.filter=s.filters,s.savedSearch.user_id=a.currentUser?a.currentUser.userId:null,n.openTemplate('<saved-search-editor saved-search="savedSearch"></saved-search-editor>',"set.create_savedsearch","star",s,!1,!1)},s.editSavedSearchModal=function(e){var t="edit"===e?"set.edit_savedsearch":"set.update_savedsearch";s.savedSearch=i.getModeEntity("savedsearch"),s.savedSearch.filter=i.getActiveFilters(s.filters),s.savedSearch.user_id=a.currentUser?a.currentUser.userId:null,n.openTemplate('<saved-search-editor saved-search="savedSearch"></saved-search-editor>',t,"star",s,!1,!1)},s.disableApplyButton=function(){return!!e.$current.includes["posts.map"]}}(e.exports=s).$inject=[],i.$inject=["$scope","$state","PostFilters","ModalService","$rootScope","_"]},function(e,t){e.exports='<div class="dropdown-menu-body">\n <div class="form-field filter-buttons">\n <post-active-search-filters ng-model="filters" filters-var="filters"></post-active-search-filters>\n </div>\n <div class="divider"></div>\n \x3c!-- sorting options --\x3e\n <h4 class="dropdown-menu-title" translate="app.sort_by"></h4>\n\n <filter-post-sorting-options ng-model="filters.orderby"></filter-post-sorting-options>\n <fieldset>\n <filter-post-order-asc-desc ng-model="filters.order"></filter-post-order-asc-desc>\n <filter-unlocked-on-top ng-model="filters.order_unlocked_on_top"></filter-unlocked-on-top>\n </fieldset>\n \x3c!-- end: sorting options --\x3e\n\n \x3c!-- filter options --\x3e\n <h4 class="dropdown-menu-title" translate="app.filter_by"></h4>\n <filter-saved-search ng-model="filters.saved_search"></filter-saved-search>\n <filter-status ng-model="filters.status"></filter-status>\n <filter-category ng-model="filters.tags"></filter-category>\n <filter-form ng-model="filters.form"></filter-form>\n <filter-source ng-model="filters.source"></filter-source>\n <filter-date date-after-model="filters.date_after" date-before-model="filters.date_before"></filter-date>\n <filter-location center-point-model="filters.center_point" within-km-model="filters.within_km"></filter-location>\n \x3c!-- end: filter options --\x3e\n</div>\n<div class="form-field filter-actions">\n <button type="button" class="button-link" ng-click="clearFilters()" translate>global_filter.restore_defaults</button>\n <button type="submit" class="button-alpha" ng-disabled="disableApplyButton()" translate>app.apply_filters</button>\n</div>\n'},function(e,t,n){"use strict";function s(r,l,c,e,d){return{restrict:"E",require:"ngModel",scope:{},link:function(n,e,t,s){function i(e){var t=d.getModeEntity("savedsearch"),n=!!t&&e.id===t.id;e&&e.hasOwnProperty("filter")&&!n?(d.setFilters(e.filter),d.setMode("savedsearch",e)):null===e&&null!==d.getModeId()&&d.setMode("all"),s.$setViewValue(e)}function a(e,t){e!==t&&(null==e?n.selectedSavedSearch=null:0<n.searchesLength&&(n.selectedSavedSearch=n.searches[e]))}function o(){return n.loading=!0,r.query({}).$promise.then(function(e){var t=l.filter(e,function(e){var t=!0===(e.user&&e.user.id===l.result(c.currentUser,"userId"));return e.featured||t});n.searches=l.indexBy(t,"id"),n.searchesLength=l.keys(n.searches).length,n.loading=!1})}n.selectedSavedSearch=null,n.searches=[],n.searchesLength=0,n.loading=!1,o().then(function(){s.$viewValue?n.selectedSavedSearch=n.searches[s.$viewValue.id]:d.getModeId()&&(n.selectedSavedSearch=n.searches[d.getModeId()]),n.$watch("selectedSavedSearch",i,!0)}),n.$on("savedSearch:update",o),n.$watch(d.getModeId,a)},template:n(801)}}(e.exports=s).$inject=["SavedSearchEndpoint","_","$rootScope","ModalService","PostFilters"]},function(e,t){e.exports='<fieldset ng-show="searchesLength > 0 && !loading">\n<label translate="app.saved_search"></label>\n <div class="custom-select" ng-model-options="{ updateOn: \'default\' }">\n <select\n ng-model="selectedSavedSearch"\n ng-options="search.name | translate\n for\n search in searches\n track by search.id"\n >\n <option value="" translate="app.select_one">Select one</option>\n </select>\n </div>\n <a class="button button-beta" ng-show="selectedSavedSearch" ng-click="$parent.editSavedSearchModal(\'edit\')">Edit</a>\n</fieldset>\n<fieldset ng-show="loading">\n <label translate="app.saved_search"></label>\n <button ng-show="loading" type="button" class="button button-full-width button-beta">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label" translate="app.loading_saved_searches">Loading saved searches</span>\n </button>\n</fieldset>\n'},function(e,t,n){"use strict";function s(i){return{restrict:"E",scope:{},link:function(e,t,n,s){e.$watch(function(){return i.countFilters()},function(){e.filtersCount=i.countFilters()},!0)},template:n(803)}}(e.exports=s).$inject=["PostFilters"]},function(e,t,n){e.exports='<span class="button-label-d">\n <span class="badge iconic">{{filtersCount}}</span>\n <span translate>app.sort_filter</span>\n</span>\n<svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n</svg>'},function(e,t,n){"use strict";function s(){return{restrict:"E",replace:!0,scope:{filters:"=",button:"=?",postId:"=?"},controller:i,template:n(805)}}function i(t,e,n){t.loading=!1,t.openShareMenu=function(){var e='<share-menu-modal filters="filters" post-id="'+t.postId+'"></share-menu-modal>';n.openTemplate(e,"app.share","share",t,!0,!0)},t.isButton=function(){return t.button},t.isAdd=function(){if(0<e.location.href.indexOf("post"))return!0;return!1}}(e.exports=s).$inject=[],i.$inject=["$scope","$window","ModalService"]},function(e,t,n){e.exports='<a ng-class="{ \'button\' : isButton(), \'button-flat\': isAdd()}" ng-click="openShareMenu()">\n\t\t<div class="loading" ng-if="loading">\n\t\t\t<div class="line"></div>\n\t\t\t<div class="line"></div>\n\t\t\t<div class="line"></div>\n\t\t</div>\n <svg class="iconic" ng-hide="loading">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#share"></use>\n </svg>\n\t<span ng-class="{\'button-label\': isButton(), \'label\': !isButton()}" translate="app.share">\n\t\t\tShare {{isButton()}}\n\t</span>\n</a>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"=",surveyId:"=",postId:"="},replace:!0,controller:i,template:n(807)}}function i(e,t,n,s){e.loading=!1,e.shareUrl=n.currentUrl(),e.isExportable=function(){return!0},e.hasPermission=t.hasPermission("Bulk Data Import and Export")||t.hasPermission("Bulk Data Import"),function(){e.postId&&(e.shareUrl=s.location.origin+"/posts/"+e.postId);e.surveyId&&(e.shareUrl=s.location.origin+"/posts/create/"+e.surveyId);e.shareUrlEncoded=encodeURIComponent(e.shareUrl)}()}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope","Util","$window"]},function(e,t,n){e.exports='<form class="panel-body" name="form" ng-submit="submit()">\n <div class="form-field" ng-show="surveyId">\n <label translate="app.survey_web_address">Your survey\'s web address</label>\n <input type="url" value="{{shareUrl}}" readonly="">\n </div>\n <div class="listing init">\n\n <div class="listing-item">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <img class="icon" src="'+n(808)+'" alt="">\n </div>\n <h2 class="listing-item-title">\n <div class="fb-share-button"\n data-href="{{shareUrl}}"\n data-layout="button_count"\n data-size="large"\n data-mobile-iframe="true">\n <a class="fb-xfbml-parse-ignore"\n target="_blank"\n ng-href="https://www.facebook.com/sharer/sharer.php?u={{shareUrlEncoded}}&src=sdkpreparse">\n Facebook\n </a>\n </div>\n </h2>\n </div>\n </div>\n\n <div class="listing-item">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <img class="icon" src="'+n(809)+'" alt="">\n </div>\n <h2 class="listing-item-title"><a target="_blank" ng-href="https://twitter.com/intent/tweet?url={{shareUrlEncoded}}">Twitter</a></h2>\n </div>\n </div>\n\n <div class="listing-item" dropdown auto-close="disabled">\n <div dropdown-toggle>\n <div class="listing-item-secondary">\n <button type="button" class="button-link listing-item-toggle">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="button-label">Configure</span>\n </button>\n </div>\n\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#code"></use>\n </svg>\n </div>\n <h2 class="listing-item-title listing-item-toggle">Embed</h2>\n </div>\n </div>\n\n <div class="listing-item-body" dropdown-menu>\n <div class="form-field">\n <label>HTML</label>\n <textarea><iframe width="560" height="315" src="{{shareUrl}}" frameborder="0" allowfullscreen></iframe></textarea>\n </div>\n </div>\n </div>\n\n <div class="listing-item" ng-show="isExportable() && hasPermission">\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n </div>\n <h2 class="listing-item-title">\n <post-export filters="filters"></post-export>\n </h2>\n </div>\n </div>\n </div>\n</form>\n'},,,function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{surveyId:"=",postId:"=",filters:"="},replace:!0,controller:i,template:n(811)}}function i(e,t,n){}(e.exports=s).$inject=[],i.$inject=["$scope","Util","$window"]},function(e,t){e.exports='<div class="modal-body">\n <share-menu post-id="postId" filters="filters"></share-menu>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"="},controller:i,template:n(813)}}function i(e,t,n,s,i){function a(){return e.filters&&!s.isEmpty(e.filters)||(e.filters=n.getDefaults()),{filters:n.getQueryParams(e.filters),send_to_hdx:!1,include_hxl:!1,send_to_browser:!0}}e.getQuery=a,e.exportPostsConfirmation=function(){t.confirm("notify.post.export").then(function(e){i.startExport(a())})}}(e.exports=s).$inject=[],i.$inject=["$scope","Notify","PostFilters","_","DataExport"]},function(e,t){e.exports='<a ng-click="exportPostsConfirmation()" translate="app.export_to_csv">Export filtered data</a>\n'},function(e,t,n){"use strict";e.exports=[function(){return{restrict:"E",replace:!0,scope:{view:"="},template:n(815)}}]},function(e,t){e.exports='<div class="main-col">\n <span translate translate-values="{value: \'{{view}}\'}">\n feature_limits.view_unavailable\n </span>\n <p><a class="button" href="/settings/plan" translate>limit.upgrade</a></p>\n</div>\n'},function(e,t,u){"use strict";e.exports=["$q","$filter","$location","$rootScope","$translate","SavedSearchEndpoint","_","Notify","ViewHelper","RoleEndpoint","PostFilters",function(e,n,t,s,i,a,o,r,l,c,d){return{restrict:"E",replace:!0,template:u(817),scope:{savedSearch:"="},link:function(t){if(!t.savedSearch)throw{message:"savedsearchEditor must be passed a saved-search parameter"};t.featuredEnabled=function(){return s.hasPermission("Manage Posts")},t.isAdmin=s.isAdmin,t.views=l.views(),t.cpySavedSearch=o.clone(t.savedSearch),t.cpySavedSearch.description=n("translate")(t.cpySavedSearch.description),t.cpySavedSearch.name=n("translate")(t.cpySavedSearch.name),t.save=function(e){t.isSaving=!0,(e.id?a.update:a.save)(e).$promise.then(function(e){t.savedSearch=o.clone(e),t.$parent.closeModal(),d.setMode("savedsearch",e),s.$broadcast("savedSearch:update"),r.notify("notify.savedsearch.savedsearch_saved",{savedsearch:e.name}),t.isSaving=!1},function(e){r.apiErrors(e),t.isSaving=!1})},t.cancel=t.$parent.closeModal}}}]},function(e,t,n){e.exports='<div class="modal-body savedsearch-editor">\n\n <div class="form-field title">\n <label translate>set.name_savedsearch</label>\n <input type="text" placeholder="Name your Saved Search..." ng-model="cpySavedSearch.name" translate/>\n </div>\n\n <div class="form-field">\n <label class="input-label" translate>set.description</label>\n <textarea ng-model="cpySavedSearch.description" />\n </div>\n\n \x3c!-- Who can see? --\x3e\n <role-selector model="savedSearch" title="\'app.who_can_see_this\'"></role-selector>\n <div class="modal-actions">\n <div class="form-field">\n <button type="button" class="button-link modal-trigger" ng-click="cancel()" translate>app.cancel</button>\n <button type="button" class="button-alpha modal-trigger" ng-show="!isSaving" ng-click="save(cpySavedSearch)" translate>app.save_and_close</button>\n <button ng-click="saveSearch()" ng-show="isSaving" disabled class="button-beta" type="button">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label" translate="app.saving">Saving</span>\n </button>\n </div>\n </div>\n\n <div class="form-field switch" ng-if="featuredEnabled()">\n <label for="saved-search-featured">\n <translate translate="saved_search.featured">Featured</translate>\n <span class="tooltip">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#question-mark"></use>\n </svg>\n <span class="bug" translate="saved_search.featured_tooltip">Featured searches appear to all users in <br>the "Saved Searches" menu</span>\n </span>\n </label>\n <div class="toggle-switch">\n <input class="tgl" id="saved-search-featured" type="checkbox" ng-model="cpySavedSearch.featured">\n <label class="tgl-btn" for="saved-search-featured" value="1"></label>\n </div>\n </div>\n\n <div class="form-field">\n <label class="input-label" translate="set.default_viewing_mode">Default viewing mode</label>\n <div class="custom-select">\n <select ng-options="view.name as view.display_name for view in views" ng-model="cpySavedSearch.view">\n </select>\n </div>\n </div>\n</div>\n'},function(e,t,i){"use strict";e.exports=["$rootScope","ModalService","PostFilters",function(t,n,s){return{restrict:"E",template:i(819),link:function(e){e.savedSearch={view:"map",role:[]},e.hasFilters=function(){return s.hasFilters(e.filters)},e.saveSearch=function(){e.savedSearch.filter=e.filters,e.savedSearch.user_id=t.currentUser?t.currentUser.userId:null,n.openTemplate('<saved-search-editor saved-search="savedSearch"></saved-search-editor>',"set.create_savedsearch","star",e,!1,!1)},e.clearFilters=function(){s.clearFilters()}}}}]},function(e,t){e.exports='<div class="savedsearch-create form-field" ng-show="hasFilters()">\n <button ng-click="saveSearch()" ng-show="$root.loggedin" class="button-alpha" type="button" translate>\n set.save_savedsearch\n </button>\n <button ng-click="saveSearch()" ng-show="isSaving" disabled class="button-beta" type="button">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label" translate="app.saving">Saving</span>\n <button ng-click="clearFilters()" class="button-link" type="button" translate>\n set.clear_search\n </button>\n\n</div>\n\n'},function(e,t,o){"use strict";e.exports=["$q","$rootScope","SavedSearchEndpoint","_","Notify","PostFilters",function(e,t,n,s,i,a){return{restrict:"E",template:o(821),link:function(t){if(!t.savedSearch)throw{message:"savedsearchEditor must be passed a saved-search parameter"};t.filtersChanged=function(){return!angular.equals(t.filters,t.savedSearch.filter)},t.saveSearch=function(){t.savedSearch.filter=a.getQueryParams(t.filters),t.isSaving=!0,n.update(t.savedSearch).$promise.then(function(e){t.isSaving=!1,i.notify("notify.savedsearch.savedsearch_updated",{savedsearch:e.name}),t.resetSearch()},function(e){t.isSaving=!1,i.apiErrors(e)})},t.resetSearch=function(){a.setFilters(t.savedSearch.filter),t.savedSearch.filter=angular.copy(a.getFilters())}}}}]},function(e,t){e.exports='<div class="savedsearch-update form-field" ng-show="filtersChanged()">\n <button ng-click="saveSearch()" ng-show="canEdit && !isSaving" class="button-alpha" type="button" translate>\n set.update_savedsearch\n </button>\n\n <button ng-click="saveSearch()" ng-show="canEdit && isSaving" disabled class="button-beta" type="button">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label" translate="app.updating">Updating</span>\n </button>\n\n <button ng-click="resetSearch()" class="button-link" type="button" translate>\n set.reset_savedsearch\n </button>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:!0,controller:i,template:n(823)}}function i(n,e,t,s,i,a,o,r,l,c){function d(e){n.searches=[],e=e||{},o.query(e).$promise.then(function(e){n.searches=r.filter(e,function(e){var t=!0===(e.user&&e.user.id===r.result(s.currentUser,"userId"));return e.featured||t}),n.loading=!1},function(e){n.loading=!1})}n.searchSearches=function(e){d({q:e})},n.createNewSearch=function(){l.openTemplate('<saved-search-editor saved-search="savedSearch"></saved-search-editor>',"set.create_savedsearch","star",n,!1,!1)},n.goToSearch=function(e){l.close(),n.$parent.closeModal();var t=e.view;"list"===t||"data"===t?c.go("posts.data.savedsearch",{savedSearchId:e.id},{reload:!0}):c.go("posts.map.savedsearch",{savedSearchId:e.id},{reload:!0})},n.loading=!1,n.loading=!0,d(),n.$on("event:authentication:logout:succeeded",d),n.$on("event:authentication:login:succeeded",d),n.$on("savedSearch:update",d)}(e.exports=s).$inject=[],i.$inject=["$scope","$element","$attrs","$rootScope","$location","UserEndpoint","SavedSearchEndpoint","_","ModalService","$state"]},function(e,t,n){e.exports='<div class="form-field">\n <label class="hidden" translate="set.find_a_saved_search">Find a saved search</label>\n <div class="input-with-icon">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#magnifying-glass"></use>\n </svg>\n <input\n type="search"\n ng-model="savedSearchQuery"\n placeholder="{{ \'set.find_a_saved_search\' | translate }}" ng-keydown="searchSearches(savedSearchQuery)"\n >\n </div>\n</div>\n<div class="modal-body">\n\n <button ng-show="loading" type="button" class="button button-full-width button-beta">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label" translate="app.loading">Loading</span>\n </button>\n\n <div ng-show="!loading" class="listing">\n <div class="listing-item" ng-repeat="search in searches">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a href="#" ng-click="goToSearch(search)">{{search.name}}</a></h2>\n </div>\n </div>\n </div>\n <div ng-show="!loading && searches.length === 0">\n <span translate="app.no_results"> </span>\n </div>\n \x3c!-- <div class="modal-actions">\n <div class="form-field">\n <button type="button"\n class="button-beta"\n ng-click="createNewSearch()">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="button-label" translate="app.create_new">Create new</span>\n </button>\n </div>\n </div> --\x3e\n</div>\n\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{searches:"="},controller:i,template:n(825)}}function i(s,e,t,i,n,a,o,r,l,c,d){s.selectedSavedSearches=[],s.processing=!1,s.close=function(){d.close()},s.delete=function(){if(!c.isEmpty(s.selectedSavedSearches)){s.processing=!0;var t=c.map(s.selectedSavedSearches,function(e){return l.delete({id:e}).$promise});a.all(t).then(function(e){i.$broadcast("savedSearch:update"),c.forEach(s.selectedSavedSearches,function(e){delete s.searches[e]}),1<t.length?o.notify("notify.savedsearch.delete_savedsearch_plural_success"):o.notify("notify.savedsearch.delete_savedsearch_success"),n()},function(e){o.apiErrors(e),n()});var n=function(){s.processing=!1,d.close()}}}}(e.exports=s).$inject=[],i.$inject=["$scope","$element","$attrs","$rootScope","$location","$q","Notify","UserEndpoint","SavedSearchEndpoint","_","ModalService"]},function(e,t){e.exports='<div class="form-field">\n <label class="hidden" translate="set.delete_saved_searches">Delete Saved Searches</label>\n</div>\n<div class="modal-body">\n <div class="listing">\n <div class="listing-item" ng-repeat="savedSearch in searches">\n <div class="listing-item-primary">\n <div class="form-field checkbox">\n <label>\n <input type="checkbox" ng-model="savedSearch" checklist-model="selectedSavedSearches" checklist-value="savedSearch.id" name="selectedSavedSearches">\n {{savedSearch.name | translate}}\n </label>\n </div>\n </div>\n </div>\n </div>\n <div class="modal-actions">\n <div class="form-field">\n <button type="button" class="button-link" ng-click="close()" translate>modal.button.close</button>\n <button type="button" class="button-alpha" ng-show="processing">\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span class="button-label" translate="app.saving">Saving</span>\n </button>\n <button type="submit" class="button-alpha" ng-class="{disabled: selectedSavedSearches.length < 1}" translate ng-click="delete()" ng-show="!processing">app.delete</button>\n </div>\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"=",savedSearch:"="},controller:i,template:n(827)}}function i(n,e,t,s,i,a,o,r,l,c){n.showNotificationLink=!0,n.canEdit=!1,n.notification=!1,n.collectionView="map",n.saveNotification=function(t){var e={set:t.id};i.save(e).$promise.then(function(e){n.showNotificationLink=!1,n.notification=e,o.notify("notify.notification.add",{set:t.name})})},n.removeNotification=function(){o.confirm("notify.notification.delete_confirm").then(function(){i.delete(n.notification).$promise.then(function(e){n.showNotificationLink=!0,o.notify("notify.notification.destroy_notification_success",{name:e.name})})})},n.editSavedSearch=function(){l.openTemplate('<saved-search-editor saved-search="savedSearch"></saved-search-editor>',"set.edit_search_settings","star",n,!1,!1)},n.deleteSavedSearch=function(){o.confirm("notify.savedsearch.delete_savedsearch_confirm").then(function(){a.delete({id:n.savedSearch.id}).$promise.then(function(){t.go("posts.map.all"),s.$broadcast("savedSearch:update")},function(e){o.apiErrors(e)})})},n.clearFilters=function(){c.clearFilters(),c.setMode("all")},n.canEdit=function(e){return e&&r.contains(e.allowed_privileges,"update")}(n.savedSearch),i.query({set:n.savedSearch.id,ignore403:!0,user:"me"},function(e){n.showNotificationLink=0===e.length,e.length&&(n.notification=e[0])},angular.noop)}(e.exports=s).$inject=[],i.$inject=["$scope","$translate","$state","$rootScope","NotificationEndpoint","SavedSearchEndpoint","Notify","_","ModalService","PostFilters"]},function(e,t,n){e.exports='<div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs" ng-controller="navigation as nav">\n <li><a href="/">{{nav.site.name}}</a></li>\n </ol>\n <h1 class="mode-context-title">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#star"></use>\n </svg>\n {{savedSearch.name}}\n </h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n\n <div class="mode-context-body">\n \x3c!--// IF: Saved Search has description //--\x3e\n <p ng-if="savedSearch.description">{{savedSearch.description}}</p>\n \x3c!--// END IF //--\x3e\n\n <ul class="metadata">\n <li>\n <span class="status-indicator public tooltip" ng-if="!savedSearch.role">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <span class="bug" translate="saved_search.visible_to_public">This saved search is visible to the public</span>\n </span>\n <span class="status-indicator yellow tooltip" ng-if="savedSearch.role">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <span class="bug" translate="saved_search.visible_to_roles" translate-values="{ roles: savedSearch.role.join(\', \') }">This saved search is visible to ...</span>\n </span>\n </li>\n <li>\n <span ng-if="savedSearch.user">\n <span translate=\'app.created_by\' translate-values="{ author : savedSearch.user.realname }">Created by</span>\n </span>\n </li>\n </ul>\n\n \x3c!--// IF: User has permission to edit the Saved Search //--\x3e\n <div class="form-field" ng-if="canEdit" dropdown>\n <button type="button" data-modal="edit-savedSearch" ng-click="editSavedSearch()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#pencil"></use>\n </svg>\n <span class="button-label" translate>app.edit</span>\n </button>\n\n <button type="button" data-toggle="dropdown-menu" class="init" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#ellipses"></use>\n </svg>\n <span class="button-label hidden" translate>app.more</span>\n </button>\n <ul class="dropdown-menu init" dropdown-menu>\n <li ng-if="showNotificationLink">\n <a ng-click="saveNotification(savedSearch)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#bell"></use>\n </svg>\n <span class="label" ng-click="saveNotification(savedSearch)" translate="app.get_notifications">Get notifications</span>\n </a>\n </li>\n <li ng-if="!showNotificationLink">\n <a ng-click="removeNotification(savedSearch)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#bell"></use>\n </svg>\n <span class="label" translate="app.turn_off_notifications">Turn off notifications</span>\n </a>\n </li>\n <li>\n <a ng-click="deleteSavedSearch()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="label" translate="app.delete"></span>\n </a>\n </li>\n </ul>\n </div>\n \x3c!--// END IF //--\x3e\n\n \x3c!--// IF: User does not have permission to edit the Saved Search //--\x3e\n <div class="form-field" ng-if="!canEdit && $root.loggedin">\n \x3c!-- // IF: User is not yet getting notifications about this Saved Search //--\x3e\n <button type="button" ng-if="showNotificationLink" ng-click="saveNotification(savedSearch)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#bell"></use>\n </svg>\n <span class="button-label" translate="app.get_notifications">Get notifications</span>\n </button>\n\n \x3c!--// ELSE //--\x3e\n\n <button type="button" ng-if="!showNotificationLink" class="button-flat">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#bell"></use>\n </svg>\n <span class="button-label" translate="app.turn_off_notifications">Turn off notifications</span>\n </button>\n \x3c!--// END IF //--\x3e\n </div>\n \x3c!--// END IF //--\x3e\n <div class="form-field">\n \x3c!-- mode context is only available in the map so we are always sending you back to it in the return to all posts feature --\x3e\n <a ng-click="clearFilters()" type="button" class="button-link">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#arrow-left"></use>\n </svg>\n <span class="button-label" translate="app.return_to_all_posts">Return to all posts</span>\n </a>\n </div>\n\n <mode-context-form-filter></mode-context-form-filter>\n \x3c!-- <saved-search-update></saved-search-update> --\x3e\n\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(n,t,s,i){return{showCollectionList:function(){n.openTemplate('<collection-listing toggle-mode="false"></collection-listing>',"app.collections","grid-three-up",!1,!0,!0)},showAddToCollection:function(e){var t={posts:e};n.openTemplate('<collection-listing toggle-mode="true" posts="posts"></collection-listing>',"app.edit_collection","grid-three-up",t,!0,!0)},editCollection:function(e){var t={collection:e};n.openTemplate('<collection-editor collection="collection"></collection-editor>',"app.edit_collection","grid-three-up",t,!1,!1)},createCollection:function(e){var t={posts:e};n.openTemplate('<collection-editor posts="posts"></collection-editor>',"app.create_collection","grid-three-up",t,!1,!1)},deleteCollection:function(e){t.confirm("notify.collection.delete_collection_confirm").then(function(){i.delete({collectionId:e.id}).$promise.then(function(){s.url("/")},function(e){t.apiErrors(e)})})}}}(e.exports=s).$inject=["ModalService","Notify","$location","CollectionEndpoint"]},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{filters:"=",collection:"="},controller:i,template:n(830)}}function i(n,e,t,s,i,a,o,r,l,c){n.editCollection=function(){l.editCollection(n.collection)},n.deleteCollection=function(){l.deleteCollection(n.collection)},n.saveNotification=function(t){var e={set:t.id};i.save(e).$promise.then(function(e){n.showNotificationLink=!1,n.notification=e,o.notify("notify.notification.add",{set:t.name})})},n.removeNotification=function(){o.confirm("notify.notification.delete_confirm").then(function(){i.delete(n.notification).$promise.then(function(e){n.showNotificationLink=!0,o.notify("notify.notification.destroy_notification_success",{name:e.name})})})},n.clearFilters=function(){c.clearFilters(),c.setMode("all")},n.showNotificationLink=!0,n.canEdit=!1,n.notification=!1,n.canEdit=function(e){return e&&r.contains(e.allowed_privileges,"update")}(n.collection),i.query({set:n.collection.id,ignore403:!0,user:"me"},function(e){n.showNotificationLink=0===e.length,e.length&&(n.notification=e[0])},angular.noop)}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope","$translate","$state","NotificationEndpoint","CollectionEndpoint","Notify","_","CollectionsService","PostFilters"]},function(e,t,n){e.exports='<div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs" ng-controller="navigation as nav">\n <li><a href="/">{{ nav.site.name }}</a></li>\n </ol>\n <h1 class="mode-context-title">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#grid-three-up"></use>\n </svg>\n {{collection.name}}\n </h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n\n <div class="mode-context-body">\n \x3c!--// IF: Saved Search has description //--\x3e\n <p ng-if="collection.description">{{collection.description}}</p>\n \x3c!--// END IF //--\x3e\n\n <ul class="metadata">\n <li>\n <span class="status-indicator public tooltip" ng-if="!collection.role || collection.role.length == 0">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <span class="bug" translate="collection.visible_to_public">This Collection is visible to the public</span>\n </span>\n <span class="status-indicator yellow tooltip" ng-if="collection.role.length > 0">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <span class="bug" translate="collection.visible_to_roles" translate-values="{ roles: collection.role.join(\', \') }">This Collection is visible to ...</span>\n </span>\n </li>\n <li>\n <span ng-if="collection.user">\n <span translate=\'app.created_by\' translate-values="{ author : collection.user.realname }">Created by</span>\n </span>\n </li>\n </ul>\n\n \x3c!--// IF: User has permission to edit the Saved Search //--\x3e\n <div class="form-field" ng-if="canEdit" dropdown>\n <button type="button" data-modal="edit-collection" ng-click="editCollection()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#pencil"></use>\n </svg>\n <span class="button-label" translate>app.edit</span>\n </button>\n\n <button type="button" data-toggle="dropdown-menu" class="init" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#ellipses"></use>\n </svg>\n <span class="button-label hidden" translate>app.more</span>\n </button>\n <ul class="dropdown-menu init" dropdown-menu>\n <li ng-if="showNotificationLink">\n <a ng-click="saveNotification(collection)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#bell"></use>\n </svg>\n <span class="label" ng-click="saveNotification(collection)" translate="app.get_notifications">Get notifications</span>\n </a>\n </li>\n <li ng-if="!showNotificationLink">\n <a ng-click="removeNotification(collection)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#bell"></use>\n </svg>\n <span class="label" translate="app.turn_off_notifications">Turn off notifications</span>\n </a>\n </li>\n <li>\n <a ng-click="deleteCollection()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="label" translate="app.delete"></span>\n </a>\n </li>\n </ul>\n </div>\n \x3c!--// END IF //--\x3e\n\n \x3c!--// IF: User does not have permission to edit the Saved Search //--\x3e\n <div class="form-field" ng-if="!canEdit && $root.loggedin">\n \x3c!-- // IF: User is not yet getting notifications about this Saved Search //--\x3e\n <button type="button" ng-if="showNotificationLink" ng-click="saveNotification(collection)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#bell"></use>\n </svg>\n <span class="button-label" translate="app.get_notifications">Get notifications</span>\n </button>\n\n \x3c!--// ELSE //--\x3e\n\n <button type="button" ng-if="!showNotificationLink" class="button-flat">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#bell"></use>\n </svg>\n <span class="button-label" translate="app.turn_off_notifications">Turn off notifications</span>\n </button>\n \x3c!--// END IF //--\x3e\n </div>\n \x3c!--// END IF //--\x3e\n <div class="form-field">\n \x3c!-- mode context bar is only available in the map so it should take you back there --\x3e\n <a ng-click="clearFilters()" type="button" class="button-link">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#arrow-left"></use>\n </svg>\n <span class="button-label" translate="app.return_to_all_posts">Return to all posts</span>\n </a>\n </div>\n\n <mode-context-form-filter></mode-context-form-filter>\n\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{collection:"<",posts:"="},controller:i,template:n(832)}}function i(n,e,t,s,i,a,o,r,l,c,d){n.isAdmin=i.isAdmin,n.views=l.views(),n.featuredEnabled=function(){return i.hasPermission("Manage Posts")},n.cancel=function(){n.$parent.closeModal()},n.saveCollection=function(t){var e=t.id?a.update:a.save;t.id||(t.user_id=i.currentUser?i.currentUser.userId:null);t.collectionId=t.id,e(t).$promise.then(function(e){n.collection=angular.copy(e),n.$parent.closeModal(),n.posts?d.showAddToCollection(n.posts):i.$broadcast("collection:update",e),r.notify(t.id?"notify.collection.updated_collection":"notify.collection.created_collection",{collection:e.name})},function(e){r.apiErrors(e)})},function(){n.collection?n.cpyCollection=angular.copy(n.collection):(n.cpyCollection={},n.cpyCollection.view="map",n.cpyCollection.role=[]);c.query().$promise.then(function(e){n.roles=e})}()}(e.exports=s).$inject=[],i.$inject=["$scope","$q","$location","$translate","$rootScope","CollectionEndpoint","_","Notify","ViewHelper","RoleEndpoint","CollectionsService"]},function(e,t,n){e.exports='<div class="modal-body">\n <div class="form-field title">\n <label translate>set.collection_name</label>\n <input type="text" ng-model="cpyCollection.name" placeholder="{{\'set.name_your_collection\'|translate}}">\n </div>\n\n <div class="form-field">\n <label translate>\n set.description\n </label>\n <textarea ng-model="cpyCollection.description"></textarea>\n </div>\n\n <div class="form-field switch" ng-if="featuredEnabled()">\n <label>\n <span translate>\n set.featured\n </span>\n <span class="tooltip">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#question-mark"></use>\n </svg>\n <span class="bug" translate>set.featured_collection_tooltip</span>\n </span>\n </label>\n <div class="toggle-switch">\n <input class="tgl" id="switch1" type="checkbox" ng-model="cpyCollection.featured">\n <label class="tgl-btn" for="switch1"></label>\n </div>\n </div>\n\n <div class="form-field">\n <label translate>set.default_viewing_mode</label>\n <div class="custom-select">\n <select ng-options="view.name as view.display_name for view in views" ng-model="cpyCollection.view">\n </select>\n </div>\n </div>\n \x3c!-- Who can see --\x3e\n <role-selector model="cpyCollection" title="\'app.who_can_see_this\'"></role-selector>\n\n <div class="modal-actions">\n <div class="form-field">\n <button type="button" class="button-link modal-trigger" ng-click="cancel()" translate>app.cancel</button>\n <button type="button" class="button-alpha modal-trigger" ng-click="saveCollection(cpyCollection)" translate>app.save_and_close</button>\n </div>\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",replace:!0,scope:{isToggleMode:"<toggleMode",posts:"="},controller:i,template:n(834)}}function i(e,a,t,n,o,r,l,c,s,i){function d(e){a.isToggleMode?a.collections=l.editableByMe({q:e}):a.collections=l.query({q:e})}function u(e){var t=e.id,n=e.name,s=[];c.each(a.posts,function(e){s.push(l.addPost({collectionId:t,id:e.id}))}),o.all(s).then(function(){a.addToPostsSet(String(t)),r.notify("notify.collection.add_to_collection",{collection:n})},function(e){r.apiErrors(e)})}function p(e){var t,n,s,i;1===a.posts.length&&c.contains(a.posts[0].sets,String(e.id))?(n=(t=e).id,s=t.name,i=[],c.each(a.posts,function(e){i.push(l.removePost({collectionId:n,id:e.id}))}),o.all(i).then(function(){c.each(a.posts,function(e){e.sets=c.without(e.sets,String(n))}),r.notify("notify.collection.removed_from_collection",{collection:s})},function(e){r.apiErrors(e)})):u(e)}a.postInCollection=function(e){return 1===a.posts.length&&c.contains(a.posts[0].sets,String(e.id))},a.toggleCollection=p,a.addToPostsSet=function(t){c.each(a.posts,function(e){e.sets.push(t)})},a.collectionClickHandler=function(e){(a.isToggleMode?p:function(e){a.$parent.closeModal();var t="map"!==e.view?"data":"map";i.go("posts."+t+".collection",{collectionId:e.id},{reload:!0})})(e)},a.createNewCollection=function(){a.$parent.closeModal(),s.createCollection(a.posts)},a.searchCollections=d,a.currentUser=e.currentUser,d()}(e.exports=s).$inject=[],i.$inject=["$rootScope","$scope","$translate","$location","$q","Notify","CollectionEndpoint","_","CollectionsService","$state"]},function(e,t,n){e.exports='<div>\n <div class="modal-body" style="max-height: 337.26px;">\n <div class="form-field search">\n <label class="hidden" translate>set.find_a_collection</label>\n <div class="input-with-icon">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#magnifying-glass"></use>\n </svg>\n <form ng-submit="searchCollections(collectionQuery)">\n <input name="collectionQuery" ng-model="collectionQuery" type="search" placeholder="{{ \'set.find_a_collection\' | translate}}">\n </form>\n </div>\n </div>\n <div class="listing init">\n\n <div class="listing-item" ng-repeat="collection in collections">\n <div class="listing-item-select" ng-if="isToggleMode">\n <input\n type="checkbox"\n ng-checked="postInCollection(collection)"\n ng-click="toggleCollection(collection)">\n </div>\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n <a ng-click="collectionClickHandler(collection)">\n {{collection.name}}\n </a>\n </h2>\n <p class="listing-item-secondary" ng-if="collection.user_id">\n <span translate>\n app.by\n </span>\n <a ng-href="/users/{{collection.user_id}}">\n {{collection.user_id}}\n </a>\n </p>\n </div>\n </div>\n </div>\n </div>\n\n <div class="modal-actions" ng-if="currentUser">\n <div class="form-field">\n <button type="button" class="button-beta" ng-click="createNewCollection()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="button-label" translate>app.create_new</span>\n </button>\n </div>\n </div>\n</div>\n'},function(e,t,i){"use strict";e.exports=["$rootScope","_","CollectionsService",function(e,n,s){return{restrict:"E",replace:!0,scope:{posts:"=",selectedPosts:"=",onDone:"&"},link:function(t){t.toggleCollection=function(){var e=n.filter(t.posts,function(e){return n.contains(t.selectedPosts,e.id)});s.showAddToCollection(e),t.onDone()}},template:i(836)}}]},function(e,t,n){e.exports='<button type="button" class="button-beta" data-modal="add-to-collection" ng-click="toggleCollection()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#grid-three-up"></use>\n </svg>\n <span class="button-label hidden" translate="set.add_to_collection">Add to collection</span>\n</button>\n'},function(e,t,n){"use strict";e.exports=["$rootScope","CollectionsService",function(e,t){return{restrict:"E",replace:!0,scope:{post:"="},link:function(e){e.toggleCollection=function(){t.showAddToCollection([e.post])}},template:n(838)}}]},function(e,t,n){e.exports='<a data-modal="add-to-collection" ng-click="toggleCollection()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#grid-three-up"></use>\n </svg>\n <span class="label"translate="set.add_to_collection">Add to collection</span>\n</a>\n'},function(e,t,i){"use strict";e.exports=["$stateProvider","$urlMatcherFactoryProvider",function(e,t){t.strictMode(!1);var n=["$transition$","CollectionEndpoint","PostFilters",function(e,t,n){return e.params().collectionId?t.get({collectionId:e.params().collectionId}).$promise:"collection"===n.getMode()?n.getModeEntity("collection"):void 0}],s=["$transition$","SavedSearchEndpoint","PostFilters",function(e,t,n){return e.params().savedSearchId?t.get({id:e.params().savedSearchId}).$promise:"savedsearch"===n.getMode()?n.getModeEntity("savedsearch"):void 0}];e.state({name:"posts",abstract:!0,params:{filterState:{value:null,squash:!0}},resolve:{collection:n,savedSearch:s,filters:["PostFilters",function(e){return e.getFilters()}]},onEnter:["$transition$","PostFilters",function(e,t){e.params().filterState&&t.setFilters(e.params().filterState)}]}).state({url:"^/savedsearches/{savedSearchId:int}",name:"posts.savedsearchRedirector",resolve:{savedSearch:s},onEnter:["$state","savedSearch",function(e,t){"data"===t.view||"list"===t.view?e.go("posts.data",{savedSearchId:t.id}):e.go("posts.map.all",{savedSearchId:t.id})}]}).state({url:"^/collections/{collectionId:int}",name:"posts.collectionRedirector",resolve:{collection:n},onEnter:["$state","collection",function(e,t){"data"===t.view||"list"===t.view?e.go("posts.data.collection",{collectionId:t.id}):e.go("posts.map.collection",{collectionId:t.id})}]}).state({url:"/views/data",name:"posts.data",params:{filterState:{value:null,squash:!0},activeCol:{value:"timeline",squash:!0}},component:"postViewData",resolve:{post:["$transition$","PostEndpoint",function(e,t){if(e.params().postId)return t.get({id:e.params().postId}).$promise}]},onEnter:["$state","PostFilters","post",function(e,t,n){n||("savedsearch"===t.getMode()?e.go("posts.data.savedsearch",{savedSearchId:t.getModeId()}):"collection"===t.getMode()&&e.go("posts.data.collection",{collectionId:t.getModeId()}))}]}).state({url:"^/savedsearches/{savedSearchId:int}/data",name:"posts.data.savedsearch",params:{activeCol:{value:"timeline",squash:!0}},resolve:{savedSearch:s},onEnter:["PostFilters","$state","savedSearch",function(e,t,n){n&&e.getModeId()!==n.id&&(e.setMode("savedsearch",n),e.setFilters(n.filter))}]}).state({url:"^/collections/{collectionId:int}/data",name:"posts.data.collection",onEnter:["$state","PostFilters","collection",function(e,t,n){t.setMode("collection",n)}],params:{activeCol:{value:"timeline",squash:!0}},resolve:{collection:n}}).state({name:"posts.map",abstract:!0,component:"postViewMap",params:{filterState:{value:null,squash:!0}}}).state({url:"/views/map",name:"posts.map.all",views:{"mode-context":"modeContext"},onEnter:["$state","PostFilters",function(e,t){"savedsearch"===t.getMode()?e.go("posts.map.savedsearch",{savedSearchId:t.getModeId()}):"collection"===t.getMode()&&e.go("posts.map.collection",{collectionId:t.getModeId()})}]}).state({url:"^/savedsearches/{savedSearchId:int}/map",name:"posts.map.savedsearch",views:{"mode-context":"savedSearchModeContext"},onEnter:["$state","PostFilters","savedSearch",function(e,t,n){n&&t.getModeId()!==n.id&&(t.setMode("savedsearch",n),t.setFilters(n.filter))}],resolve:{savedSearch:s}}).state({url:"^/collections/{collectionId:int}/map",name:"posts.map.collection",views:{"mode-context":"collectionModeContext"},onEnter:["$state","PostFilters","collection",function(e,t,n){t.setMode("collection",n)}],resolve:{collection:n}}).state({name:"posts.data.detail",url:"^/posts/:postId",component:"postDetailData",params:{activeCol:{value:"post",squash:!0}},resolve:{post:["$transition$","PostEndpoint",function(e,t){return t.get({id:e.params().postId}).$promise}]}}).state({name:"posts.data.edit",url:"^/posts/:postId/edit",component:"postDataEditor",params:{activeCol:{value:"post",squash:!0}},resolve:{post:["$transition$","PostEndpoint",function(e,t){return t.get({id:e.params().postId}).$promise}]}}).state({name:"posts.noui",url:"/map/noui",controller:i(840),template:i(841),params:{view:{value:"noui",squash:!0}}}).state({name:"postCreate",url:"/posts/create/:id",controller:i(842),template:i(843)})}]},function(e,t,n){"use strict";function s(e,t,n,s,i){t.setLayout("layout-embed"),e.filters=i.getFilters(),e.$emit("event:allposts:show")}(e.exports=s).$inject=["$scope","$rootScope","$translate","$transition$","PostFilters"]},function(e,t){e.exports='<main role="main">\n <post-view-map noui=true filters="filters" is-loading="{state:true}"></post-view-map>\n <ush-logo></ush-logo>\n</main>'},function(e,t,n){"use strict";e.exports=["$scope","$translate","$location","$controller","$transition$","PostEntity","PostEndpoint","FormEndpoint",function(t,e,n,s,i,a,o,r){e("post.create_post").then(function(e){t.title=e,t.$emit("setPageTitle",e)}),t.post=a(),o.options().$promise.then(function(e){t.post.allowed_privileges=e.allowed_privileges}),r.getFresh({id:i.params().id}).$promise.then(function(e){t.form=e})}]},function(e,t){e.exports='<post-editor post="post" form="form" ng-if="form.id"></post-editor>\n'},function(e,t,n){"use strict";angular.module("ushahidi.activity",[]).config(n(845)).directive("activityTimeline",n(848)).directive("activityBarChart",n(850)).directive("activityTimeChart",n(852)).directive("targetedSurveyTable",n(854)).directive("crowdsourcedSurveyTable",n(856))},function(e,t,n){"use strict";e.exports=["$stateProvider","$urlMatcherFactoryProvider",function(e,t){t.strictMode(!1),e.state({name:"activity",url:"/activity",controller:n(846),template:n(847)})}]},function(e,t,n){"use strict";function s(e,t,n,s,i){function a(){!function(e){switch(e){case"month":t.filters.created_after=s(s().startOf("month").toDate()).utc().format(),t.filters.created_before=null;break;case"all":t.filters.created_after=null,t.filters.created_before=null;break;case"custom":t.createdAfter&&t.createdBefore&&t.createdAfter.toDateString()===t.createdBefore.toDateString()&&(t.filters.created_after=s(s(t.createdAfter).utc()).startOf("day").format(),t.filters.created_before=s(s(t.createdBefore).utc()).endOf("day").format()),t.createdAfter&&(t.filters.created_after=s(s(t.createdAfter).utc()).startOf("day").format()),t.createdBefore&&(t.filters.created_before=s(s(t.createdBefore).utc()).startOf("day").format());break;default:t.filters.created_after=s(s().startOf("week").toDate()).utc().format(),t.filters.created_before=null}t.filters}(t.currentInterval)}t.isActivityAvailable=!1,t.currentInterval="all",t.editableInterval="all",t.filters={created_after:null,created_before:null},t.filtersMenuOpen=!1,t.dateOptions={format:"yyyy-mm-dd"},t.saveFilters=function(){t.currentInterval=t.editableInterval,a(),t.filtersMenuOpen=!1},t.cancelChangeFilters=function(){t.editableInterval=t.currentInterval,t.filtersMenuOpen=!1},t.targetedSurveysEnabled=!1,t.loggedIn=!1,t.createdAfter=null,t.createdBefore=null,function(){t.$emit("event:mode:change","activity"),n("nav.activity").then(function(e){t.$emit("setPageTitle",e)}),e.loggedin&&(t.loggedIn=!0);i.loadFeatures().then(function(){t.isActivityAvailable=i.isViewEnabled("activity"),t.targetedSurveysEnabled=i.isFeatureEnabled("targeted-surveys")}),a()}()}(e.exports=s).$inject=["$rootScope","$scope","$translate","moment","Features"]},function(e,t,n){e.exports='<div>\n <layout-class layout="a"></layout-class>\n <div class="mode-context init" ng-controller="navigation as nav" dropdown>\n <header class="mode-context-header" ng-class="{ \'has-logo\' : nav.site.image_header }">\n <h1 class="mode-context-title"><a href="/" ng-bind="nav.site.name"></a></h1>\n <img ng-if="nav.site.image_header" ng-src="{{ nav.site.image_header }}" class="deployment-logo" />\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n\n <div class="mode-context-body">\n <p markdown-to-html="nav.site.description"></p>\n </div>\n </div>\n\n <main role="main">\n <div class="toolbar" ng-show="isActivityAvailable" >\n <form role="search" class="searchbar" name="searchForm" ng-submit="saveFilters()">\n\n <div class="searchbar-options">\n <fieldset class="custom-fieldset init" data-fieldset-type="date-range" dropdown auto-close="disabled" is-open="filtersMenuOpen">\n <legend class="dropdown-trigger init" dropdown-toggle>\n <span class="legend-label" ng-show="currentInterval !== \'custom\'" translate="{{\'graph.\' + currentInterval }}">Date range</span>\n <span class="legend-label" ng-show="currentInterval == \'custom\'"\n translate="graph.custom_display"\n translate-values="{\n start: (filters.created_after | date:\'shortDate\'),\n end: (filters.created_before | date:\'shortDate\') }"\n translate-compile>Date range</span>\n <svg class="iconic chevron"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use></svg>\n </legend>\n\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio">\n <label>\n <input ng-model="editableInterval" type="radio" name="editableInterval" value="all">\n <span translate="graph.all">All time</span>\n </label>\n </div>\n <div class="form-field radio">\n <label>\n <input ng-model="editableInterval" type="radio" name="editableInterval" value="week">\n <span translate="graph.week">This week</span>\n </label>\n </div>\n <div class="form-field radio">\n <label>\n <input ng-model="editableInterval" type="radio" name="editableInterval" value="month">\n <span translate="graph.month">This month</span>\n </label>\n </div>\n\n <div class="form-field radio">\n <label>\n <input ng-model="editableInterval" type="radio" name="editableInterval" value="custom">\n <span translate="graph.custom">Custom date range</span>\n </label>\n\n \x3c!-- todo: reuse filter-date --\x3e\n <div class="form-fieldgroup">\n <div class="form-field date" ng-show="editableInterval == \'custom\'">\n <label class="hidden" translate="global_filter.filter_tabs.created_after">Start date</label>\n <div class="input-with-icon">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#calendar"></use>\n </svg>\n <input type="date" pick-a-date="createdAfter" pick-a-date-options="dateOptions" placeholder="{{ \'global_filter.filter_tabs.created_after\' | translate }}" ng-model="createdAfter" />\n </div>\n <span class="date-joiner">to</span>\n </div>\n\n <div class="form-field date" ng-show="editableInterval == \'custom\'">\n <label class="hidden" translate="global_filter.filter_tabs.created_before">End date</label>\n <div class="input-with-icon">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#calendar"></use>\n </svg>\n <input type="date" pick-a-date="createdBefore" pick-a-date-options="dateOptions" placeholder="{{ \'global_filter.filter_tabs.created_before\' | translate }}" ng-model="createdBefore">\n </div>\n </div>\n </div>\n </div>\n\n <div class="form-field">\n <button type="button" class="button-link" ng-click="cancelChangeFilters()" translate="app.cancel">Cancel</button>\n <button type="submit" class="button-alpha" translate="app.apply_filters">Apply filter</button>\n </div>\n </div>\n </fieldset>\n </div>\n\n </form>\n </div>\n\n \x3c!-- unavailable view --\x3e\n <post-view-unavailable ng-hide="isActivityAvailable" view="\'nav.activity\' | translate"></post-view-unavailable>\n \x3c!-- <img ng-hide="isActivityAvailable" src/img/activity-page.png" style="opacity: 0.4; filter: blur(1px);" /> --\x3e\n\n <div ng-show="isActivityAvailable" class="main-col">\n <div class="listing card init">\n <div class="listing-item active">\n <div class="listing-item-secondary">\n <button ng-show="todo" type="button" class="button-beta button-flat">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#share"></use>\n </svg>\n <span class="hidden" translate="app.share">Share</span>\n </button>\n </div>\n\n <div class="listing-item-primary">\n <h2 class="listing-item-title" translate="activity.activity_over_time">Activity over time</h2>\n </div>\n\n <div class="listing-item-body">\n \x3c!-- <dc-chart-by-volume date-range="dateRange"></dc-chart-by-volume> --\x3e\n <activity-time-chart filters="filters"></activity-time-chart>\n </div>\n </div>\n </div>\n <div class="listing card init">\n <div class="listing-item active">\n <div class="listing-item-secondary">\n <button ng-show="todo" type="button" class="button-beta button-flat">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#share"></use>\n </svg>\n <span class="hidden" translate="app.share">Share</span>\n </button>\n </div>\n\n <div class="listing-item-primary">\n <h2 class="listing-item-title" translate="activity.activity_by_volume">Activity by volume</h2>\n </div>\n\n <div class="listing-item-body">\n \x3c!-- <dc-chart-by-time date-range="dateRange"></dc-chart-by-time> --\x3e\n <activity-bar-chart filters="filters"></activity-bar-chart>\n </div>\n </div>\n </div>\n <div ng-if="targetedSurveysEnabled && loggedIn" class="listing card init">\n <div class="listing-item active">\n <div class="listing-item-primary">\n <h2 class="listing-item-title" translate="activity.targeted_activity">Tageted Survey Activity</h2>\n </div>\n\n <div class="listing-item-body">\n <targeted-survey-table filters="filters"></targeted-survey-table>\n </div>\n </div>\n </div>\n <div class="listing card init" ng-if="loggedIn">\n <div class="listing-item active">\n <div class="listing-item-primary">\n <h2 class="listing-item-title" translate="activity.crowdsourced_activity">Crowdsourced Survey Activity</h2>\n </div>\n\n <div class="listing-item-body">\n <crowdsourced-survey-table filters="filters"></crowdsourced-survey-table>\n </div>\n </div>\n </div>\n </div> \x3c!--end main column--\x3e\n\n\n <aside class="secondary-col" role="complementary">\n \x3c!-- <activity-timeline></activity-timeline> --\x3e\n </aside>\n\n </main>\n</div>'},function(e,t,n){"use strict";e.exports=[function(){return{restrict:"E",replace:!0,scope:{},controller:["$scope","$q","$translate","PostEndpoint","UserEndpoint","_",function(n,e,t,s,i,a){n.timeSince=function(e){var t=Math.floor((new Date-e)/1e3),n=Math.floor(t/31536e3);return 1<n?n+" years":1<(n=Math.floor(t/2592e3))?n+" months":1<(n=Math.floor(t/86400))?n+" days":1<(n=Math.floor(t/3600))?n+" hours":1<(n=Math.floor(t/60))?n+" minutes":Math.floor(t)+" seconds"};function o(e){e=e||{status:"all"};var t=a.extend({},e,{offset:(n.currentPage-1)*n.itemsPerPage,limit:n.itemsPerPage,ignore403:"@ignore403"});n.isLoading=!0,s.query(t).$promise.then(function(e){n.posts=e.results,n.isLoading=!1;var t=new Date(n.posts[0].created);n.start_timestamp=n.timeSince(t),n.posts.forEach(function(e){e.user=i.get({id:e.user.id})})})}n.pageChanged=o,n.currentPage=1,n.itemsPerPageOptions=[10,20,50],n.itemsPerPage=n.itemsPerPageOptions[0],n.start_timestamp=null,o()}],template:n(849)}}]},function(e,t,n){e.exports='<div>\n<div class="main-col">\n\n <div class="listing">\n\n <article class="postcard">\n <div class="post-band" ng-style="{backgroundColor: form.color}"></div>\n <div class="listing-item-select">\n <input type="checkbox">\n </div>\n <div class="postcard-body">\n <h1 class="postcard-title"><a href="">Overcrowding between 5th St. & Salem Ave.</a></h1>\n <span class="postcard-metadata"><a href="" class="postcard-author"><img src="https://api.adorable.io/avatars/40/[email protected]" class="avatar" />Jess Shorland</a>, 45 mins, via SMS</span>\n\n <div class="postcard-field">\n <p>Forms are the standard way to receive user inputted data. The transitions and smoothness of these elements are very important because of the inherent user interaction associated with forms.</p>\n </div>\n </div>\n\n <span class="postcard-actions-trigger" data-toggle="dropdown-menu">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </span>\n <ul class="dropdown-menu">\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#pencil"></use>\n </svg>\n <span class="label">Edit</span>\n </a>\n </li>\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#grid-three-up"></use>\n </svg>\n <span class="label">Add to Collection</span>\n </a>\n </li>\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#share"></use>\n </svg>\n <span class="label">Share</span>\n </a>\n </li>\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#task"></use>\n </svg>\n <span class="label">Assign to...</span>\n </a>\n </li>\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="label">Delete</span>\n </a>\n </li>\n </ul>\n </article>\n\n <article class="postcard">\n\n <div class="post-band" ng-style="{ backgroundColor: form.color}"></div>\n <div class="listing-item-select">\n <input type="checkbox">\n </div>\n <div class="postcard-body">\n <h1 class="postcard-title"><a href="">Overcrowding between 5th St. & Salem Ave.</a></h1>\n <span class="postcard-metadata"><a href="" class="postcard-author"><img src="https://api.adorable.io/avatars/40/[email protected]" class="avatar" />Jess Shorland</a>, 45 mins, via SMS</span>\n\n <div class="postcard-field">\n <img src="//lorempixel.com/400/300/" class="postcard-image" />\n </div>\n </div>\n\n <span class="postcard-actions-trigger" data-toggle="dropdown-menu">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </span>\n <ul class="dropdown-menu">\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#pencil"></use>\n </svg>\n <span class="label">Edit</span>\n </a>\n </li>\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#grid-three-up"></use>\n </svg>\n <span class="label">Add to Collection</span>\n </a>\n </li>\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#share"></use>\n </svg>\n <span class="label">Share</span>\n </a>\n </li>\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#task"></use>\n </svg>\n <span class="label">Assign to...</span>\n </a>\n </li>\n <li>\n <a href="">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="label">Delete</span>\n </a>\n </li>\n </ul>\n </article>\n\n <div class="listing-toolbar">\n <div class="listing-toolbar-summary">\n <strong><span class="total"></span> selected</strong>\n <button class="button-link">Deselect</button>\n </div>\n\n <div class="listing-toolbar-actions">\n\n <fieldset class="custom-fieldset">\n <legend>Mark as</legend>\n\n <div class="form-field radio">\n <label for="contributor">\n <input type="radio" name="role" id="contributor">\n Spam\n </label>\n </div>\n\n <div class="form-field radio">\n <label for="editor">\n <input type="radio" name="role" id="editor">\n Duplicates\n </label>\n </div>\n </fieldset>\n\n <fieldset class="custom-fieldset">\n <legend>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#grid-three-up"></use>\n </svg>\n Add to Collection\n </legend>\n\n <div class="form-field radio">\n <label for="contributor">\n <input type="radio" name="role" id="contributor">\n Spam\n </label>\n </div>\n\n <div class="form-field radio">\n <label for="editor">\n <input type="radio" name="role" id="editor">\n Duplicates\n </label>\n </div>\n </fieldset>\n\n <button type="button">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n <span class="button-label">Export</span>\n </button>\n\n <button type="button" class="button-destructive">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label hidden">Delete</span>\n </button>\n\n <button type="button" class="listing-toolbar-toggle more">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#ellipses"></use>\n </svg>\n <span class="button-label">Show more</span>\n </button>\n\n <button type="button" class="listing-toolbar-toggle less">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#x"></use>\n </svg>\n <span class="button-label">Show less</span>\n </button>\n </div>\n </div>\n </div>\n</div> \x3c!--end main column--\x3e\n\n<div>\n<h3 translate>activity.recent_activity_timeline</h3>\n<div ng-show="isLoading"><i class="fa fa-refresh fa-4 fa-spin"></i></div>\n<div class="activity-timeline" ng-hide="isLoading">\n\n <div class="timestamp"><span ng-bind="start_timestamp"></span> AGO</div>\n\n <div class="activity-listing" ng-repeat="post in ::posts">\n <div class="activity-type post" translate>\n activity.new_post\n </div>\n <div class="listing-summary">\n <h3>\n <a ng-href="/posts/{{::post.id}}" ng-bind="::post.title"></a>\n </h3>\n <p translate>activity.by <a ng-href="" ng-bind="::post.user.realname"></a></p>\n </div>\n <div class="clearfix"></div>\n </div>\n\n \x3c!-- USE NG-SWITCH TO RENDER DIFF TYPES OF ACTIVITES --\x3e\n\n \x3c!-- <a class="button" href="#">\n <span>View Full Timeline</span>\n </a> --\x3e\n\n \x3c!-- <div class="activity-listing">\n <div class="activity-type post">\n New Post\n </div>\n <div class="listing-summary">\n <h3>\n <a href="">Bus carring Shiite pilgrims bombed</a>\n </h3>\n <p>By <a href="">David Kobia</a></p>\n </div>\n <div class="clearfix"></div>\n </div>\n\n <div class="activity-listing">\n <div class="activity-type comment">\n New Comment\n </div>\n <div class="listing-summary">\n <p>\n By <a href="">David Kobia</a> on <a href="">Unstable building due to explosion next to road</a>:\n </p>\n <blockquote>\n Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae.\n </blockquote>\n </div>\n <div class="clearfix"></div>\n </div>\n\n <div class="activity-listing">\n <div class="activity-type collection">\n New Collection\n </div>\n <div class="listing-summary">\n <h3>\n <a href="">Bus carring Shiite pilgrims bombed</a>\n </h3>\n <p>By <a href="">David Kobia</a></p>\n </div>\n\n <div class="clearfix"></div>\n </div>\n\n <div class="timestamp">6 Hours Ago</div>\n\n <div class="activity-listing">\n <div class="activity-type saved-search">\n New Saved Search\n </div>\n <div class="listing-summary">\n <h3>\n <a href="">Missing Children since 2012</a>\n </h3>\n <p>By <a href="">David Kobia</a></p>\n </div>\n <div class="clearfix"></div>\n </div>\n\n <div class="activity-listing">\n <div class="activity-type post">\n New Post\n </div>\n <div class="listing-summary">\n <h3>\n <a href="">Bus carring Shiite pilgrims bombed</a>\n </h3>\n <p>By <a href="">David Kobia</a></p>\n </div>\n <div class="clearfix"></div>\n </div> --\x3e\n</div>\n</div>\n</div>\n'},function(e,t,n){"use strict";function s(n,s,i,e,a,o){function t(e){e=e||o.getQueryParams(n.filters);var t=a.extend({},e,{group_by:n.groupBy.value,ignore403:"@ignore403"});n.isLoading=!0,i.stats(t).$promise.then(function(e){n.options.chart.xAxis.axisLabel=s.instant(n.groupByOptions[n.groupBy.value]),e.totals[0]&&(e.totals[0].key=n.options.chart.yAxis.axisLabel),n.data=e.totals,n.isLoading=!1})}n.data=[{values:[]}],n.groupByOptions={tags:"nav.categories",form:"app.surveys",status:"post.status"},n.groupBy={value:"tags"},n.options={chart:{type:"multiBarHorizontalChart",height:450,margin:{top:0,right:40,bottom:40,left:5},x:function(e){return e.label},y:function(e){return e.total},showValues:!1,showControls:!1,valueFormat:e.format("d"),transitionDuration:500,xAxis:{axisLabel:s.instant("post.categories"),tickPadding:-10,axisLabelDistance:0},yAxis:{axisLabel:s.instant("graph.post_count"),tickFormat:e.format("d")},tooltip:{contentGenerator:function(e){return"<h3>"+e.value+"</h3><p>"+e.data.total+"</p>"}},forceY:0,barColor:e.scale.category20().range(),noData:s.instant("graph.no_data")}},n.reload=t,n.$watch("filters",function(){t()},!0),o.setMode("activity")}e.exports=function(){return{restrict:"E",scope:{filters:"="},controller:s,template:n(851)}},s.$inject=["$scope","$translate","PostEndpoint","d3","_","PostFilters"]},function(e,t,n){e.exports='<div class="graph-view">\n <fieldset class="custom-fieldset init" dropdown is-open="compareIsOpen">\n <legend class="dropdown-trigger init" data-toggle="dropdown-menu" dropdown-toggle>\n <span class="legend-label" translate="graph.compare" ng-show="compareIsOpen">Compare...</span>\n <span class="legend-label" translate="graph.compare_{{groupBy.value || \'all\'}}" ng-hide="compareIsOpen">Compare...</span>\n <svg class="iconic chevron">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio" ng-repeat="(key, value) in groupByOptions">\n <label>\n <input type="radio" ng-value="key" ng-model="groupBy.value" ng-change="reload()"> {{::value | translate}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <nvd3 options=\'options\' data=\'data\'></nvd3>\n</div>\n'},function(e,t,n){"use strict";function s(n,e,s,t,i,a){var o=e.instant("graph.cumulative_post_count"),r=e.instant("graph.new_post_count"),l=e.instant("graph.post_date");function c(e){e=e||a.getQueryParams(n.filters);var t=i.extend({},e,{timeline:1,timeline_attribute:n.timelineAttribute,group_by:n.groupBy.value,ignore403:"@ignore403"});n.isLoading=!0,s.stats(t).$promise.then(function(e){!e.totals.length||i.chain(e.totals).pluck("values").pluck("length").max().value()<3?n.data=[{values:[]}]:n.data=e.totals,n.isLoading=!1})}function d(e){n.options.chart.yAxis.axisLabel=e?o:r}n.showCumulative=!0,n.isLoading=!0,n.timelineAttribute="created",n.data=[{values:[]}],n.groupByOptions={"":"graph.all_posts",tags:"nav.categories",form:"app.surveys",status:"post.status"},n.groupBy={value:""},n.options={chart:{type:"lineChart",height:450,margin:{top:0,right:65,bottom:40,left:65},showControls:!1,x:function(e){return new Date(1e3*parseInt(e.label))},y:function(e){return e[n.showCumulative?"cumulative_total":"total"]},transitionDuration:500,xAxis:{axisLabel:l,tickFormat:function(e){return t.time.format("%e %b %Y")(new Date(e))}},yAxis:{axisLabel:r,tickFormat:t.format("d")},forceY:0,tooltip:{contentGenerator:function(e){return"<h3>"+e.series[0].key+"</h3><p>"+e.point.y+" posts at "+t.time.format("%e %b %Y")(new Date(e.point.x))+"</p>"}},noData:e.instant("graph.no_data")}},n.reload=c,n.$watch("filters",function(){c()},!0),n.$watch("showCumulative",d),a.setMode("activity")}e.exports=function(){return{restrict:"E",scope:{filters:"="},controller:s,template:n(853)}},s.$inject=["$scope","$translate","PostEndpoint","d3","_","PostFilters"]},function(e,t,n){e.exports='<div class="timeline-view">\n <fieldset class="custom-fieldset init" dropdown is-open="compareIsOpen">\n <legend class="dropdown-trigger init" data-toggle="dropdown-menu" dropdown-toggle>\n <span class="legend-label" translate="graph.compare" ng-show="compareIsOpen">Compare...</span>\n <span class="legend-label" translate="graph.compare_{{groupBy.value || \'all\'}}" ng-hide="compareIsOpen">Compare...</span>\n <svg class="iconic chevron">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio" ng-repeat="(key, value) in groupByOptions">\n <label>\n <input type="radio" ng-value="key" ng-model="groupBy.value" ng-change="reload()"> {{::value | translate}}\n </label>\n </div>\n <div class="form-fieldgroup">\n <div class="form-field checkbox">\n <label>\n <input type="checkbox" name="showCumulative" ng-model="showCumulative" ng-change="reload()">\n <span translate="graph.cumulative">Show cumulative totals</span>\n </label>\n </div>\n </div>\n </div>\n </fieldset>\n\n <div class="nvd3-wrapper">\n <nvd3 options=\'options\' data=\'data\'></nvd3>\n </div>\n</div>\n'},function(e,t,n){"use strict";function s(e,s,t,n,i,a,o,r,l,c){s.targetedSurveyStatsByForm=[],s.totalResponses=0,s.totalMessagesSent=0,s.totalRecipients=0,s.totalResponseRecipients=0,s.noSurveys=!1,s.$watch("filters",function(){e.loggedin&&(s.targetedSurveyStatsByForm=[],s.totalResponses=0,s.totalMessagesSent=0,s.totalRecipients=0,s.totalResponseRecipients=0,n.query({ignore403:"@ignore403"}).$promise.then(function(e){e.find(function(e){if(e.targeted_survey)return!0})?(s.noSurveys=!1,e.forEach(function(t){if(t.targeted_survey){var e=l.getQueryParams(s.filters)||{},n=r.extend({},e,{formId:t.id,ignore403:"@ignore403"});i.query(n).$promise.then(function(e){e.name=t.name,s.targetedSurveyStatsByForm.push(e),s.totalResponses+=e.total_responses,s.totalMessagesSent+=e.total_messages_sent,s.totalRecipients+=e.total_recipients,s.totalResponseRecipients+=e.total_response_recipients}).catch(function(e){s.noSurveys=!0})}})):s.noSurveys=!0}).catch(function(e){s.noSurveys=!0}))},!0),l.setMode("activity")}e.exports=function(){return{restrict:"E",scope:{filters:"="},controller:s,template:n(855)}},s.$inject=["$rootScope","$scope","$translate","FormEndpoint","FormStatsEndpoint","FormContactEndpoint","PostEndpoint","_","PostFilters","Session"]},function(e,t){e.exports='<div>\n <loading-dots button-class="\'button-gamma button-flat\'" label="\'app.loading\'" ng-if="!noSurveys && targetedSurveyStatsByForm.length === 0"></loading-dots>\n <fieldset ng-if="targetedSurveyStatsByForm.length >= 1">\n <table>\n <thead>\n <tr>\n <th></th>\n <th translate="activity.inbound">Inbound Response Messages</th>\n <th translate="activity.outbound">Outbound Surveying Messages</th>\n <th translate="activity.recipients">Unique Recipients of Targeted Survey</th>\n <th translate="activity.responders">Unique Responders to Targeted Survey</th>\n \n </tr>\n </thead>\n\n <tbody>\n <tr ng-repeat="survey in targetedSurveyStatsByForm">\n <td>{{survey.name}}</td>\n <td>{{survey.total_responses}}</td>\n <td>{{survey.total_messages_sent}}</td>\n <td>{{survey.total_recipients}}</td>\n <td>{{survey.total_response_recipients}}</td>\n </tr>\n <tr>\n <td translate="activity.all_targeted">All Targeted Surveys</td>\n <td>{{totalResponses}}</td>\n <td>{{totalMessagesSent}}</td>\n <td>{{totalRecipients}}</td>\n <td>{{totalResponseRecipients}}</td>\n </tr>\n </tbody>\n </table>\n </fieldset>\n <p translate="activity.no_targeted" ng-if="noSurveys">You don\'t have any Targeted Survey data to show.</p>\n</div>'},function(e,t,n){"use strict";function s(s,e,t,i,n,a,o,r,l){s.crowdsourcedSurveyStatsByForm=[],s.totalAll=0,s.totalWeb=0,s.totalEmail=0,s.totalSms=0,s.totalTwitter=0,s.noSurveys=!1,s.unstructuredStats={},s.$watch("filters",function(){s.crowdsourcedSurveyStatsByForm=[],s.totalAll=0,s.totalWeb=0,s.totalEmail=0,s.totalSms=0,s.totalTwitter=0,s.unstructuredStats={},t.query({ignore403:"@ignore403"}).$promise.then(function(e){if(e.find(function(e){if(!e.targeted_survey)return!0})){s.noSurveys=!1,e.forEach(function(t){if(!t.targeted_survey){var e=r.getQueryParams(s.filters)||{},n=o.extend({},e,{formId:t.id,ignore403:"@ignore403"});i.query(n).$promise.then(function(e){e.name=t.name,s.crowdsourcedSurveyStatsByForm.push(e),s.totalAll+=parseInt(e.total_by_data_source.all),s.totalWeb+=parseInt(e.total_by_data_source.web),s.totalEmail+=parseInt(e.total_by_data_source.email),s.totalSms+=parseInt(e.total_by_data_source.sms),s.totalTwitter+=parseInt(e.total_by_data_source.twitter)}).catch(function(e){s.noSurveys=!0})}});var t=r.getQueryParams(s.filters)||{},n=o.extend({},t,{include_unmapped:!0,group_by:"form",has_location:"all",order:"desc",order_unlocked_on_top:!0,orderby:"created",status:"all",form:"none"});a.stats(n).$promise.then(function(e){s.unstructuredStats={name:"Unstructured Posts",all:0,web:0,email:0,sms:0,twitter:0},e.totals[0].values.forEach(function(e){s.unstructuredStats[e.type]=e.total,s.unstructuredStats.all+=e.total}),s.totalAll+=s.unstructuredStats.all,s.totalWeb+=s.unstructuredStats.web,s.totalEmail+=s.unstructuredStats.email,s.totalSms+=s.unstructuredStats.sms,s.totalTwitter+=s.unstructuredStats.twitter}).catch(function(e){s.noSurveys=!0})}else s.noSurveys=!0}).catch(function(e){s.noSurveys=!0})},!0),r.setMode("activity")}e.exports=function(){return{restrict:"E",scope:{filters:"="},controller:s,template:n(857)}},s.$inject=["$scope","$translate","FormEndpoint","FormStatsEndpoint","FormContactEndpoint","PostEndpoint","_","PostFilters","Session"]},function(e,t){e.exports='<div>\n <loading-dots button-class="\'button-gamma button-flat\'" label="\'app.loading\'" ng-if="!noSurveys && crowdsourcedSurveyStatsByForm.length === 0"></loading-dots>\n <fieldset ng-if="crowdsourcedSurveyStatsByForm.length >= 1">\n <table>\n <thead>\n <tr>\n <th></th>\n <th translate="activity.all_sources">All Data Sources</th>\n <th translate="activity.web_mobile">Web and Mobile</th>\n <th translate="activity.email">Email</th>\n <th translate="activity.sms">SMS</th>\n <th translate="activity.twitter">Twitter</th>\n \n </tr>\n </thead>\n\n <tbody>\n <tr ng-repeat="survey in crowdsourcedSurveyStatsByForm">\n <td>{{survey.name}}</td>\n <td>{{survey.total_by_data_source.all}}</td>\n <td>{{survey.total_by_data_source.web}}</td>\n <td>{{survey.total_by_data_source.email}}</td>\n <td>{{survey.total_by_data_source.sms}}</td>\n <td>{{survey.total_by_data_source.twitter}}</td>\n </tr>\n <tr>\n <td>{{unstructuredStats.name}}</td>\n <td>{{unstructuredStats.all}}</td>\n <td>{{unstructuredStats.web}}</td>\n <td>{{unstructuredStats.email}}</td>\n <td>{{unstructuredStats.sms}}</td>\n <td>{{unstructuredStats.twitter}}</td>\n </tr>\n <tr>\n <td translate="activity.all_crowdsourced">All Crowdsourced Surveys</td>\n <td>{{totalAll}}</td>\n <td>{{totalWeb}}</td>\n <td>{{totalEmail}}</td>\n <td>{{totalSms}}</td>\n <td>{{totalTwitter}}</td>\n </tr>\n </tbody>\n </table>\n </fieldset>\n <p translate="activity.no_crowdsourced" ng-if="noSurveys">You don\'t have any Crowdsourced Survey data to show.</p>\n</div>'},function(e,t,n){"use strict";angular.module("ushahidi.settings",[]).directive("afterImportCsv",n(859)).directive("importerCsv",n(860)).service("ImportNotify",n(861)).directive("hdxDetails",n(863)).directive("surveyEditor",n(865)).directive("surveyTaskCreate",n(867)).directive("surveyAttributeCreate",n(869)).directive("surveyAttributeEditor",n(871)).service("SurveyNotify",n(873)).directive("targetedQuestion",n(875)).directive("settingsMap",n(877)).directive("settingsEditor",n(879)).directive("filterUsers",n(881)).directive("customRoles",n(883)).directive("customRolesEditor",n(884)).directive("customWebhooks",n(885)).directive("customWebhooksEditor",n(886)).config(n(887))},function(e,t,n){"use strict";e.exports=["$rootScope","$translate","$location","Notify","Features",function(e,t,n,s,i){return{restrict:"A",link:function(n){n.importComplete=!1,e.$on("event:import:complete",function(e,t){n.collectionId=t.collectionId,n.filename=t.filename,n.importComplete=!0})}}}]},function(e,t,n){"use strict";e.exports=["$translate","$rootScope","$q","$location","FormEndpoint","FormStageEndpoint","FormAttributeEndpoint","DataImportEndpoint","Notify","DataImport","Features","CollectionEndpoint","moment","_",function(d,e,t,n,s,i,a,o,r,l,u,c,p,g){return{restrict:"A",link:function(c){function e(){o.delete(c.csv)}c.setStatus=function(e){c.selectedStatus=e},c.setStatusOption=function(e){c.statusOption=e},c.isStatusOption=function(e){return c.statusOption===e},c.isStatusSelected=function(e){return c.selectedStatus===e},c.setSelectedForm=function(e){c.selectedForm=e},c.isSelectedForm=function(e){if(c.selectedForm)return c.selectedForm.id===e.id;return!1},c.cancelImport=function(){r.confirm("notify.data_import.csv_import_cancel_confirm").then(function(){r.notify("notify.data_import.csv_import_cancel"),e(c.csv),n.url("/settings/data-import/")})},c.deleteDataImport=e,c.isActiveStep=function(e){return c.activeStep===e},c.completeStepOne=function(){if(!c.fileContainer.file)return void r.error("notify.data_import.file_missing");if(!c.selectedForm)return void r.error("notify.data_import.form_missing");var e=new FormData;e.append("file",c.fileContainer.file),e.append("form_id",c.selectedForm.id),o.upload(e).then(function(e){r.notify("notify.data_import.csv_upload",{name:c.fileContainer.file.name}),c.stepOneComplete=!0,c.activeStep=2,c.csv=e,function(){if(!c.csv.columns||c.csv.columns.filter(function(e){return""===e}).length===c.csv.columns.length)return r.error("notify.data_import.empty_mapping_empty");t.all([i.getFresh({form_id:c.selectedForm.id}).$promise,a.getFresh({form_id:c.selectedForm.id}).$promise]).then(function(e){var t,n,s,i,a,o,r,l;c.selectedForm.tasks=e[0].results,c.selectedForm.attributes=(t=e[1].results,n=g.chain(t).where({type:"point"}).reduce(function(e,t){return e.concat({key:t.key+".lat",label:t.label+" (Latitude)",priority:t.priority,required:t.required},{key:t.key+".lon",label:t.label+" (Longitude)",priority:t.priority,required:t.required})},[]).value(),s=g.find(t,{type:"title"}),i=g.find(t,{type:"description"}),a=s?s.label:d.instant("post.modify.form.title"),o=i?i.label:d.instant("post.modify.form.description"),t=g.chain(t).reject({type:"point"}).reject({type:"title"}).reject({type:"description"}).concat(n).push({key:"title",label:a,priority:0,required:!0},{key:"content",label:o,priority:1,required:!0}).sortBy("priority").value()),r=c.selectedForm.attributes,g.each(r,function(e,t){e.required&&(c.required_fields.push(e.key),c.required_fields_map[e.key]=e.label)}),l=c.selectedForm.tasks,g.each(l,function(e){e.required&&(c.hasRequiredTask=!0)})})}()},function(e){r.apiErrors(e)})},c.completeStepTwo=function(){if(c.csv.maps_to=function(){var n=g.clone(c.maps_to);n=g.invert(n),n=g.omit(n,"");var s=g.keys(n);return g.each(c.csv.columns,function(e,t){n[t]=g.contains(s,t.toString())?n[t]:null}),n}(),!function(){if(g.every(c.csv.maps_to,g.isEmpty))return void r.error("notify.data_import.no_mappings");var e=function(){var e=g.omit(c.maps_to,function(e,t,n){return""===e});return g.chain(e).map(function(e){return c.csv.columns[e]}).countBy(function(e){return e}).pick(function(e,t){return 1<e}).allKeys().value()}(),t=e.filter(function(e){return""===e}).length===e.length;{if(0<e.length&&!t)return void r.error("notify.data_import.duplicate_fields",{duplicates:e.join(", ")});if(0<e.length)return void r.error("notify.data_import.empty_mapping_empty")}var n=function(e){var t=[],n=g.difference(c.required_fields,g.toArray(e));g.isEmpty(n)||g.each(n,function(e){t.push(c.required_fields_map[e])});return t}(c.csv.maps_to);return g.isEmpty(n)||(r.error("notify.data_import.required_fields",{required:n.join(", ")}),!1)}())return;c.csv.fixed={form:c.selectedForm.id},c.selectedStatus&&(c.isStatusOption("mark_as")?c.csv.fixed.status=c.selectedStatus:c.csv.maps_to[c.selectedStatus]="status");!function(e){o.update(e).$promise.then(function(){o.import({id:e.id,action:"import"}).$promise.then(function(){l.startImport(e)}).catch(function(e){r.apiErrors(e),n.url("/settings/data-import")})},function(e){r.apiErrors(e)}),n.url("/settings/data-after-import")}(c.csv)},c.selectedForm,c.activeStep=1,c.stepOneComplete=!1,c.stepTwoComplete=!1,c.maps_to={},c.required_fields=[],c.required_fields_map={},c.hasRequiredTask=!1,u.loadFeatures().then(function(){c.csvEnabled=u.isFeatureEnabled("data-import")})}}}]},function(e,t,o){"use strict";var r;function n(n,e,s,t,i,a){return{importComplete:function(e){var t=function(){r&&r.$destroy();return r=s.$new()}();t=n.extend(t,e),i.openTemplate(o(862),"thumb-up","confirmation",t,!1,!1)}}}(e.exports=n).$inject=["_","$q","$rootScope","$translate","SliderService","ModalService"]},function(e,t){e.exports='<p translate-values="{processed: processed, errors: errors}"translate="notify.data_import.csv_import_processed_errors">\n <strong>Your CSV import</strong> is complete. {{processed}} records imported, {{errors}} records failed.\n</p>\n<p translate-values="{from_name: form_name, filename: filename}" translate="notify.data_import.csv_import_success_info">\n The data from your CSV spreadsheet, <em>{{filename}}</em>, was successfully imported into your <a ui-sref="posts.data">{{form_name}}</a> survey.\n</p>\n<a class="button button-alpha" ng-click="close()" ng-href="/collections/{{collectionId}}" translate="notify.data_import.see_imported_posts">See imported posts</a>\n<a ng-click="close()" ui-sref="settings.dataImport" class="button button-gamma button-flat" translate="data_import.import_another_csv">Import another CSV file</a>\n<button class="button-flat message-trigger" ng-click="close()" translate="message.button.dismiss">\n Dismiss\n</button>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",controller:i,template:n(864)}}function i(t,e,n,s,i,a,o,r,l,c,d,u){t.exportJob=n.exportJob,t.uploadToHdx=function(){t.metadata.$valid?(t.details.export_job_id=parseInt(l.params.jobId),t.details.user_id=e.currentUser.userId,t.details.organisation_id=t.details.organisation.id,t.details.organisation_name=t.details.organisation.name,c.save(t.details).$promise.then(function(e){e.id&&(t.exportJob.hxl_meta_data_id=e.id,d.startExport(t.exportJob).then(function(e){t.showProgress=!0,t.title="data_export.uploading_data",t.description="data_export.uploading_data_desc"}))},function(e){u.error("data_export.uploading_data_err")}),t.error=!1):t.error=!0},t.error=!1,t.isLoading=s.getLoadingState,t.showProgress=!1,t.title="data_export.add_details",t.description="data_export.details_desc",t.details={private:!0},i.loadFeatures().then(function(){i.isFeatureEnabled("hxl")||l.go("posts.map.all")}),e.setLayout("layout-c"),t.$emit("event:mode:change","settings"),a.get({id:"site"},function(e){t.details.source=e.name}),o.get().$promise.then(function(e){t.licenses=e.results}),r.get().$promise.then(function(e){t.organisations=e.results})}(e.exports=s).$inject=[],i.$inject=["$scope","$rootScope","$stateParams","LoadingProgress","Features","ConfigEndpoint","HxlLicenseEndpoint","HxlOrganisationsEndpoint","$state","HxlMetadataEndpoint","DataExport","Notify"]},function(e,t,n){e.exports='\n<div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>nav.export</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n</div>\n\n\n<main role="main">\n <div class="progress-bar" ng-show="isLoading()">\n <span>\n ..\n </span>\n </div>\n \n <div class="main-col">\n <div class="form-sheet hdx">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate>{{title}}</h2>\n <p translate>{{description}}</p>\n </div>\n <img class="field-logo" src="'+n(208)+'" />\n <div class="form-field" ng-if="!showProgress">\n <h3 translate="data_export.privacy_title">Privacy Settings</h3>\n <p translate="data_export.privacy_desc">You have a choice of sharing your dataset publicly or restricting access to other members of the organisation which owns the dataset.</p>\n </div>\n\n <form name="metadata" ng-show="!showProgress">\n <fieldset>\n <legend class="required" translate="data_export.this_dataset">This data set is:</legend>\n <div class="form-field radio">\n <label for="private" translate="data_export.private_desc"></label>\n <input id="private" type="radio" ng-value="true" ng-model="details.private">\n </div>\n <div class="form-field radio">\n <label for="public" translate="data_export.public_desc"></label>\n <input id="public" ng-value="false" ng-model="details.private" type="radio">\n\n </div>\n </fieldset>\n\n <div class="form-field">\n <h3 translate="data_export.dataset">Dataset Title & Description</h3>\n <p translate="data_export.dataset_desc">When users search for data on HDX, their search terms will be matched to terms in your title. Avoid using abbreviations in the title which may not be familiar to all users. Also,\n avoid using words such as current, latest or previous when referring to the time period (e.g Latest 3W) as these terms become misleading as the dataset ages.</p>\n <p translate="data_export.dataset_example">Example dataset title: <strong>Who is Doing What Where in Afghanistan, Jan-Dec 2015</strong></p>\n </div>\n\n <div class="form-field" ng-class="{\n \'error\': metadata.title.$invalid && metadata.title.$dirty,\n \'success\': !metadata.title.$invalid && metadata.title.$dirty\n }">\n <label class="required" translate="data_export.dataset_title">Title of data set</label>\n <input name="title" placeholder="e.g a descriptive title" ng-model="details.dataset_title" ng-required="true" type="text">\n <div\n class="alert error"\n ng-show="metadata.title.$invalid && metadata.title.$dirty"\n ng-repeat="(error, value) in metadata.title.$error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'data_export.validation.title\'}}"></p>\n </div>\n </div>\n\n <div class="form-field">\n <h3 translate="data_export.metadata_title">Metadata</h3>\n <p translate="data_export.metadata_desc">Metadata is additional information about your dataset that will make it easier for others to understand and put your data into context. Datasets on HDX must include a set of metadata fields</p>\n </div>\n\n <div class="form-field" ng-class="{\n \'error\': metadata.source.$invalid && metadata.source.$dirty,\n \'success\': !metadata.source.$invalid && metadata.source.$dirty\n }">\n <label for="source" class="required" translate="data_export.source">Source</label>\n <input name="source" ng-required="true" placeholder="Add the source of the data" ng-model="details.source" type="text">\n <div\n class="alert error"\n ng-show="metadata.source.$invalid && metadata.source.$dirty"\n ng-repeat="(error, value) in metadata.source.$error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'data_export.validation.source.\' + error}}"></p>\n </div>\n </div>\n\n <div class="form-field" ng-class="{\n \'error\': metadata.organisation.$invalid && metadata.organisation.$dirty,\n \'success\': !metadata.organisation.$invalid && metadata.organisation.$dirty\n }">\n <label class="required" for="organisation" translate="data_export.organisation">Organisation</label>\n <div class="custom-select" >\n <select name="organisation" ng-required="true" id="organisation" ng-model="details.organisation">\n <option value="" translate="data_export.select_organisation">Select an organisation</option>\n <option ng-repeat="organisation in organisations" ng-value="organisation">{{organisation.name}}</option>\n </select>\n </div>\n <div\n class="alert error"\n ng-show="metadata.organisation.$invalid && metadata.organisation.$dirty"\n ng-repeat="(error, value) in metadata.organisation.$error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'data_export.validation.organisation\'}}"></p>\n </div>\n </div>\n\n <div class="form-field" ng-class="{\n \'error\': metadata.license.$invalid && metadata.license.$dirty,\n \'success\': !metadata.license.$invalid && metadata.license.$dirty\n }">\n <label class="required" for="license" translate="data_export.license">License</label>\n <div class="custom-select">\n <select id="license" ng-required="true" name="license" ng-model="details.license_id">\n <option value="" translate="data_export.add_license">Add license</option>\n <option ng-repeat="license in licenses" ng-value="license.id">{{license.name}}</option>\n </select>\n </div>\n <a href="#" class="link-blue">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n {{\'data_export.read_more_licenses\' | translate}}\n </a>\n <div\n class="alert error"\n ng-show="metadata.license.$invalid && metadata.license.$dirty"\n ng-repeat="(error, value) in metadata.license.$error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'data_export.validation.license\'}}"></p>\n </div>\n </div>\n\n <div\n class="form-field alert error"\n ng-show="error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="data_export.validation.all_fields">Please fill in all required fields</p>\n </div>\n\n <div class="form-field button-group">\n <button class="button button-alpha" ng-click="uploadToHdx()" translate="data_export.submit_hdx">Submit to HDX Account</button>\n </div>\n </form>\n </div>\n </div>\n</main>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",scope:{surveyId:"=",actionType:"="},controller:i,template:n(866)}}function i(a,s,n,e,t,i,o,r,l,c,d,u,p,g,m,h,f){function v(){var e="interim_id_"+a.currentInterimId;return a.currentInterimId++,e}function b(e){a.saving_survey=!1,g.apiErrors(e)}function y(e,t,n){var s=e.attributes,i=s[p.indexOf(s,t)+n];p.isUndefined(i)||(i.priority=t.priority,t.priority=t.priority+n,e.attributes=p.sortBy(s,"priority"))}function _(e,t){var n=a.survey.tasks,s=n[p.indexOf(n,e)+t];p.isUndefined(s)||(s.priority=e.priority,e.priority=e.priority+t,a.survey.tasks=p.sortBy(n,"priority"))}a.saving=!1,a.currentInterimId=0,a.survey={color:null},a.canReorderTask=function(e){return"Post"!==e.label},a.moveTaskUp=function(e){_(e,-1)},a.moveTaskDown=function(e){_(e,1)},a.isFirstTask=function(e){var t=a.survey.tasks;return 1===p.indexOf(t,e)},a.isLastTask=function(e){var t=a.survey.tasks;return p.indexOf(t,e)===t.length-1},a.deleteTask=function(t){g.confirmDelete("notify.form.delete_stage_confirm","notify.form.delete_stage_confirm_desc").then(function(){t.id&&!p.isString(t.id)?r.delete({formId:a.survey.id,id:t.id}).$promise.then(function(){g.notify("notify.form.destroy_stage_success",{name:t.label}),a.survey.tasks=p.filter(a.survey.tasks,function(e){return e.id!==t.id})}):a.survey.tasks=p.filter(a.survey.tasks,function(e){return e.label!==t.label})})},a.duplicateSection=function(e){var t=angular.copy(e);t.label=void 0,t.description=void 0,t.id=v(),p.each(t.attributes,function(e){delete e.id,delete e.url,delete e.key,e.form_stage_id=t.id}),a.survey.tasks.push(t),a.switchTab(t.id,"section-build")},a.openTaskModal=function(){h.openTemplate("<survey-task-create></survey-task-create>","survey.add_task","",a,!0,!0)},a.addNewTask=function(e){h.close(),e.priority=a.survey.tasks.length?p.last(a.survey.tasks).priority+1:0,e.id=a.getInterimId(),a.survey.tasks.push(e),a.switchTab(e.id,"section-build")},a.openAttributeModal=function(e){a.activeTask=e,h.openTemplate("<survey-attribute-create></survey-attribute-create>","survey.add_field","",a,!0,!0)},a.openAttributeEditModal=function(e,t){a.activeTask=e,t.form_stage_id||h.close();var n=(a.editAttribute=t).id?"survey.edit_field":"survey.add_field";h.openTemplate("<survey-attribute-editor></survey-attribute-editor>",n,"",a,!0,!0)},a.addNewAttribute=function(e,t){h.close(),e.form_stage_id||(e.priority=function(e){return e.attributes.length?p.last(e.attributes).priority+1:0}(t),e.form_stage_id=t.id?t.id:t.label,t.attributes.push(e))},a.moveAttributeUp=function(e,t){y(e,t,-1)},a.moveAttributeDown=function(e,t){y(e,t,1)},a.isFirstAttribute=function(e,t){var n=e.attributes;return 0===p.indexOf(n,t)},a.isLastAttribute=function(e,t){var n=e.attributes;return p.indexOf(n,t)===n.length-1},a.deleteAttribute=function(t,n){g.confirmDelete("notify.form.delete_attribute_confirm","notify.form.delete_attribute_confirm_desc").then(function(){if(!t.id)return n.attributes=p.filter(n.attributes,function(e){return e.label!==t.label}),void h.close();l.delete({formId:a.survey.id,id:t.id}).$promise.then(function(t){var e=p.findIndex(n.attributes,function(e){return e.id===t.id});n.attributes.splice(e,1),r.invalidateCache(),g.notify("notify.form.destroy_attribute_success",{name:t.label}),h.close()})})},a.saving_survey=!1,a.saveSurvey=function(){a.saving_survey=!0,i.saveCache(a.survey).$promise.then(function(e){return a.survey.id!==e.id&&(a.survey.id=e.id),s.all([(t=[],a.removeInterimIds(),p.each(a.survey.tasks,function(e){e.form_id=a.survey.id,t.push(r.saveCache(p.extend(e,{formId:a.survey.id})).$promise)}),s.all(t).then(function(e){e=p.sortBy(e,"priority"),p.each(e,function(e,t){p.extend(a.survey.tasks[t],e)})})),function(){var e=p.findWhere(a.roles,{name:"admin"});a.survey.everyone_can_create||-1!==p.indexOf(a.roles_allowed,e.id)||a.roles_allowed.push(e.id);return o.saveCache(p.extend({roles:a.roles_allowed},{formId:a.survey.id})).$promise}()]);var t}).then(function(){return n=[],p.each(a.survey.tasks,function(t){p.each(t.attributes,function(e){"tags"===e.type&&(e.options=p.filter(e.options,function(e){return!isNaN(e)})),e.form_stage_id=t.id,n.push(l.saveCache(p.extend(e,{formId:a.survey.id})).$promise)})}),s.all(n);var n}).then(function(){m.success("notify.form.edit_form_success",{name:a.survey.name},{formId:a.survey.id}),t.go("settings.surveys",{},{reload:!0})}).catch(b)},a.cancel=function(){n.url("/settings/surveys")},a.toggleTaskRequired=function(e){e.required=!e.required},a.toggleAttributeRequired=function(e){e.required=!e.required},a.toggleTaskPublic=function(e){e.is_public=!e.is_public},a.changeTaskLabel=function(t){t.id||p.each(t.attributes,function(e){e.form_stage_id=t.label})},a.getInterimId=v,a.removeInterimIds=function(){p.each(a.survey.tasks,function(e){e.id=p.isString(e.id)?void 0:e.id})},a.switchTab=function(e,t){var n=a.tab_history[e];if(n){var s=n+"-li";angular.element(document.getElementById(n)).removeClass("active"),angular.element(document.getElementById(s)).removeClass("active")}t=t+"-"+e;var i=(a.tab_history[e]=t)+"-li";angular.element(document.getElementById(t)).addClass("active"),angular.element(document.getElementById(i)).addClass("active")},a.loadRoleData=function(){s.all([d.query().$promise]).then(function(e){a.roles=e[0]})},a.roles_allowed=[],a.roles=[],a.onlyOptional=function(e){return"title"!==e.type&&"description"!==e.type},a.anonymiseReportersEnabled=!1,a.location_precision=1e3,function(){a.tab_history={},a.switchTab("post","survey-build"),a.loadRoleData(),a.save=e.instant("app.save"),a.saving=e.instant("app.saving"),c.get({id:"map"},function(e){a.location_precision=1e3/Math.pow(10,e.location_precision)}),f.loadFeatures().then(function(){a.targetedSurveysEnabled=f.isFeatureEnabled("targeted-surveys"),a.anonymiseReportersEnabled=f.isFeatureEnabled("anonymise-reporters")}),a.surveyId?s.all([i.getFresh({id:a.surveyId}).$promise,r.queryFresh({formId:a.surveyId}).$promise,l.queryFresh({formId:a.surveyId}).$promise,o.queryFresh({formId:a.surveyId}).$promise]).then(function(e){var t=e[0];t.tasks=p.sortBy(e[1],"priority");var n=p.chain(e[2]).sortBy("priority").value();p.each(n,function(e){"tags"===e.type&&(e.options=p.map(e.options,function(e){return parseInt(e)}))}),p.each(t.tasks,function(t){a.switchTab(t.id,"section-build"),t.attributes=p.filter(n,function(e){return e.form_stage_id===t.id})}),a.survey=t;var s=e[3];a.roles_allowed=p.pluck(s,"role_id"),"duplicate"===a.actionType&&(a.survey.name=void 0,a.survey.description=void 0,delete a.survey.id,delete a.survey.created,delete a.survey.updated,delete a.survey.url,delete a.survey.can_create,delete a.survey.tags,p.each(a.survey.tasks,function(t){t.form_id=void 0,t.id=a.getInterimId(),delete t.url,p.each(t.attributes,function(e){e.form_stage_id=t.id,delete e.id,delete e.url,delete e.key})}))}):(a.survey={color:null,require_approval:!0,everyone_can_create:!0,tasks:[{label:"Post",priority:0,required:!1,type:"post",show_when_published:!0,task_is_internal_only:!1,attributes:[{cardinality:0,input:"text",label:"Title",priority:1,required:!0,type:"title",options:[],config:{},form_stage_id:v()},{cardinality:0,input:"text",label:"Description",priority:2,required:!0,type:"description",options:[],config:{},form_stage_id:v()}],is_public:!0}]},a.survey.tasks[0].id=a.getInterimId());i.queryFresh().$promise.then(function(e){a.availableForms=e}),u.queryFresh().$promise.then(function(e){a.availableCategories=e,a.availableCategories=p.chain(a.availableCategories).map(function(e){var t=p.findWhere(a.availableCategories,{id:e.id});return t&&0<t.children.length&&(t.children=p.chain(t.children).map(function(e){return p.findWhere(a.availableCategories,{id:e.id})}).filter().value()),t}).filter().value()}),a.surveyId||s.all([f.loadFeatures(),i.queryFresh().$promise]).then(function(e){var t=f.getLimit("forms");!0!==t&&t<=e[1].length&&(g.limit("limit.post_type_limit_reached"),n.path("settings/surveys"))})}(),a.hasOptions=function(e){return p.contains(["checkbox","radio","select"],e.input)},a.removeOption=function(e,t){e.options.splice(t,1)},a.addOption=function(e){e.options.push("")}}(e.exports=s).$inject=[],i.$inject=["$scope","$q","$location","$translate","$state","FormEndpoint","FormRoleEndpoint","FormStageEndpoint","FormAttributeEndpoint","ConfigEndpoint","RoleEndpoint","TagEndpoint","_","Notify","SurveyNotify","ModalService","Features"]},function(e,t,n){e.exports='<div>\n \x3c!-- mode-context needs to be in each template --\x3e\n <div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n <li><a href="/settings/surveys" translate>app.surveys</a></li>\n </ol>\n <h1 ng-show="survey.id" class="mode-context-title" translate>app.edit_survey</h1>\n <h1 ng-show="!survey.id" class="mode-context-title" translate>app.add_survey</h1>\n <a ng-show="targetedSurveysEnabled" ui-sref="settings.surveys.targeted.create"><span translate="settings.send_targeted">Send a targeted survey via SMS</span> ></a>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="button-group">\n <button type="button" class="button-flat" ng-click="cancel()" translate>app.cancel</button>\n <button type="submit" class="button-alpha" ng-if="!saving_survey" ng-click="saveSurvey()">{{save}}</button>\n <button type="submit" class="button-alpha" disabled ng-if="saving_survey">{{saving}}\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </button>\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <div class="full-col">\n <section class="form-sheet">\n \x3c!-- TODO: get form colour here --\x3e\n <span class="post-band" ng-style="{backgroundColor: survey.color}"></span>\n <div class="form-field survey">\n \x3c!-- TODO: add placeholder text--\x3e\n <label translate>survey.survey_name</label>\n <input type="text" placeholder="{{ \'survey.survey_name\' | translate }}" ng-model="survey.name">\n\n </div>\n\n <div class="form-field survey">\n <label translate>app.description</label>\n <textarea placeholder="{{ \'survey.describe_your_survey\' | translate }}" ng-model="survey.description">Posts about streets that need resurfacing, repairs, or the removal of a hazard.</textarea>\n </div>\n\n <nav class="tabs-menu init" data-tabs="survey-details">\n <ul>\n <li id="survey-build-post-li">\n <a ng-click="switchTab(\'post\', \'survey-build\')" translate="survey.build">\n Build\n </a>\n </li>\n <li id="survey-configure-post-li">\n <a ng-click="switchTab(\'post\', \'survey-configure\')" translate="survey.configure">\n Configure\n </a>\n </li>\n <li id="survey-share-post-li">\n <a ng-click="switchTab(\'post\', \'survey-share\')" ng-show="survey.id" translate="survey.share">\n Share\n </a>\n </li>\n </ul>\n </nav>\n\n <div id="survey-build-post" class="survey-details tabs-target" >\n <div class="listing init" style="margin-left: 4px;">\n <h3 class="listing-heading hidden" translate="survey.post_fields">Fields</h3>\n\n <div class="listing-item" ng-repeat="attribute in survey.tasks[0].attributes track by $index">\n <div class="listing-item-select">\n <div class="buttons-updown">\n <button type="button" class="button-beta" ng-disabled="isFirstAttribute(survey.tasks[0], attribute)" ng-click="moveAttributeUp(survey.tasks[0], attribute)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-top"></use>\n </svg>\n <span class="label hidden">Move up</span>\n </button>\n <button type="button" class="button-beta" ng-disabled="isLastAttribute(survey.tasks[0], attribute)" ng-click="moveAttributeDown(survey.tasks[0], attribute)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden">Move down</span>\n </button>\n </div>\n </div>\n <div class="listing-item-secondary" ng-show="onlyOptional(attribute)">\n <button class="button-beta button-flat" ng-click="deleteAttribute(attribute, survey.tasks[0])">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="hidden">Delete</span>\n </button>\n </div>\n\n <div class="listing-item-primary" ng-click="openAttributeEditModal(survey.tasks[0], attribute)">\n <div class="listing-item-image">\n \x3c!-- TODO: Set icon based on type --\x3e\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#ic_short_text_24px"></use>\n </svg>\n </div>\n <h2 class="listing-item-title">\n {{attribute.label}}\n <span class="listing-item-image tooltip" ng-show="attribute.response_private">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#lock-locked"></use>\n </svg>\n <span class="bug" translate="survey.response_private_desc">Only people with permission to edit responses can see responses to this field</span>\n </span>\n </h2>\n </div>\n </div>\n <div class="listing-item">\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n <a ng-click="openAttributeModal(survey.tasks[0])" class="button button-beta" data-modal="add-field">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span translate="survey.add_field">Add field</span>\n </a>\n </h2>\n </div>\n </div>\n </div>\n </div>\n <div id="survey-configure-post" class="survey-details tabs-target">\n \x3c!--// Require review //--\x3e\n <div class="form-field switch">\n <label translate="survey.require_review">Require posts be reviewed before they\'re published</label>\n <p data-fieldgroup-target="require-review-message" ng-show="survey.require_approval" translate="survey.require_review_desc">New responses to this survey will be put "under review," and therefore not immediately visible to the public. Users with permission to review the response can review and "publish" them, which would then make them visible to everyone.</p>\n <div class="toggle-switch">\n <input class="tgl" id="post-review" type="checkbox" ng-model="survey.require_approval">\n <label class="tgl-btn" for="post-review"></label>\n </div>\n </div>\n \x3c!--// Hide Author Information //--\x3e\n <div class="form-field switch" ng-show="anonymiseReportersEnabled">\n <label translate="survey.hide_author_information">Hide author information</label>\n <p ng-show="survey.hide_author" data-fieldgroup-target="hide-author-message" translate="survey.hide_author_information_desc">Only people with permission to edit responses will be able to see who submitted them; and only when editing them.</p>\n <div class="toggle-switch">\n <input class="tgl init" id="hide-author" type="checkbox" data-fieldgroup-toggle="hide-author-message" ng-model="survey.hide_author">\n <label class="tgl-btn" for="hide-author"></label>\n </div>\n </div>\n\n <div class="form-field switch" ng-show="anonymiseReportersEnabled">\n <label translate="survey.hide_location_information">Hide location information</label>\n <p ng-show="survey.hide_location" data-fieldgroup-target="hide-location-message" translate-values="{ precision: location_precision}" translate="survey.hide_location_information_desc">Only people with permission to edit responses will be able to see location info; and only when editing them.</p>\n <div class="toggle-switch">\n <input class="tgl init" id="hide-location" type="checkbox" data-fieldgroup-toggle="hide-location-message" ng-model="survey.hide_location">\n <label class="tgl-btn" for="hide-location"></label>\n </div>\n </div>\n\n <div class="form-field switch" ng-show="anonymiseReportersEnabled">\n <label translate="survey.hide_time_information">Hide exact time information</label>\n <p ng-show="survey.hide_time" data-fieldgroup-target="hide-time-message" translate="survey.hide_time_information_desc">Only people with permission to edit responses will be able to see exact respon time; and only when editing them.</p>\n <div class="toggle-switch">\n <input class="tgl init" id="hide-time" type="checkbox" data-fieldgroup-toggle="hide-time-message" ng-model="survey.hide_time">\n <label class="tgl-btn" for="hide-time"></label>\n </div>\n </div>\n\n \x3c!--// Who can add //--\x3e\n <fieldset>\n <legend translate="survey.who_can_add">Who can add to this survey</legend>\n <div class="form-field radio icon-input" ng-class="{ \'checked\': survey.everyone_can_create }">\n <label for="survey-add_everyone">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <input name="survey-add" id="survey-add_everyone" ng-value="true" checked="" type="radio" ng-model="survey.everyone_can_create">\n <span class="label" translate="nav.everyone">Everyone</span>\n </label>\n </div>\n\n <div class="form-field radio icon-input" ng-class="{ \'checked\': !survey.everyone_can_create }">\n <label for="survey-add_roles">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#people"></use>\n </svg>\n <input class="init" name="survey-add" id="survey-add_roles" ng-value="false" ng-modaldata-fieldgroup-toggle="survey-add_roles" type="radio" ng-model="survey.everyone_can_create">\n <span translate="app.specific_roles">Specific roles...</span>\n </label>\n\n <div class="form-fieldgroup init" data-fieldgroup-target="survey-add_roles" ng-class="{true:\'\', false:\'active\'}[survey.everyone_can_create]">\n <div class="form-field checkbox" ng-repeat="role in roles">\n <label>\n <input\n type="checkbox"\n checklist-model="roles_allowed"\n ng-disabled="role.name === \'admin\'"\n ng-checked="role.name === \'admin\'"\n checklist-value="role.id"\n >\n {{role.display_name | translate}}\n </label>\n </div>\n </div>\n </div>\n </fieldset>\n\n <color-picker color-container="survey"></color-picker>\n \x3c!-- <fieldset data-fieldset-type="color">\n <legend><span class="swatch" style="background-color: #A51A1A;"></span>Survey color</legend>\n <p>Your survey\'s color will be used for map markers, and the left border of the survey and its responses.</p>\n\n <div class="form-field">\n <label class="hidden">Hex value</label>\n <div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left minicolors-inline"><input type="text" data-input-type="color" value="#A51A1A" class="minicolors-input" size="7"><div class="minicolors-panel minicolors-slider-hue minicolors-with-swatches"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker" style="top: 150px;"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite" style="background-color: rgb(255, 0, 0);"><div class="minicolors-grid-inner"></div><div class="minicolors-picker" style="top: 52px; left: 127px;"><div></div></div></div><ul class="minicolors-swatches"><li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" style="background-color: rgb(165, 26, 26);"></span></li><li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" style="background-color: rgb(230, 147, 39);"></span></li><li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" style="background-color: rgb(34, 116, 180);"></span></li><li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" style="background-color: rgb(91, 170, 0);"></span></li></ul></div></div>\n </div>\n </fieldset> --\x3e\n </div>\n \x3c!-- Share Tab Options --\x3e\n <div id="survey-share-post" class="survey-details tabs-target" ng-show="survey.id">\n <share-menu survey-id="surveyId"></share-menu>\n </div>\n </section>\n \x3c!-- Task sections --\x3e\n <section class="form-sheet" ng-repeat="task in survey.tasks | limitTo: 1 - survey.tasks.length">\n <div class="form-field title section-title">\n <label class="hidden" translate="survey.task_name">Section name</label>\n <input type="text" placeholder="{{ \'survey.untitled_task\' | translate }}" ng-change="changeTaskLabel(task)" ng-model="task.label">\n\n <label class="hidden" translate="survey.task_description">Section description</label>\n <textarea\n name="description"\n placeholder="{{ \'survey.describe_this_task\' | translate }}"\n rows="1"\n ng-model="task.description"\n ></textarea>\n\n \x3c!-- <p class="alert">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#people"></use>\n </svg>\n The fields in this section can only be completed and viewed by select people. <a>Change settings</a>\n </p> --\x3e\n <div class="section-title-actions" dropdown>\n <button class="button-beta button-flat init" data-toggle="dropdown-menu" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#ellipses"></use>\n </svg>\n <span class="hidden" translate="app.more">More</span>\n </button>\n\n <ul class="dropdown-menu init" dropdown-menu>\n <li>\n <a href="" data-modal="delete-post" ng-click="duplicateSection(task)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(209)+'#ic_content_copy_24px"></use>\n </svg>\n <span class="label" translate="survey.duplicate_task">Duplicate task</span>\n </a>\n </li>\n <li>\n <a href="" data-modal="delete-post" ng-click="deleteTask(task)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="label" translate="survey.delete_task">Delete task</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n\n <nav class="tabs-menu init" data-tabs="section-1-details">\n <ul>\n <li class="active" ng-attr-id="{{ \'section-build-\' + task.id + \'-li\'}}">\n <a ng-click="switchTab(task.id, \'section-build\')" translate="survey.build">\n Build\n </a>\n </li>\n <li ng-attr-id="{{ \'section-configure-\' + task.id + \'-li\'}}">\n <a ng-click="switchTab(task.id, \'section-configure\')" translate="survey.configure">\n Configure\n </a>\n </li>\n </ul>\n </nav>\n\n <div ng-attr-id="{{ \'section-build-\' + task.id }}" class="section-1-details tabs-target active">\n <div class="listing init">\n <div class="listing-item" ng-repeat="attribute in task.attributes track by $index">\n <div class="listing-item-select">\n <div class="buttons-updown">\n <button type="button" class="button-beta" ng-disabled="isFirstAttribute(task, attribute)" ng-click="moveAttributeUp(task, attribute)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-top"></use>\n </svg>\n <span class="label hidden">Move up</span>\n </button>\n <button type="button" class="button-beta" ng-disabled="isLastAttribute(task, attribute)" ng-click="moveAttributeDown(task, attribute)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden">Move down</span>\n </button>\n </div>\n </div>\n\n <div class="listing-item-secondary" ng-show="onlyOptional(attribute)">\n <button class="button-beta button-flat" ng-click="deleteAttribute(attribute, task)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="hidden">Delete</span>\n </button>\n </div>\n\n <div class="listing-item-primary" ng-click="openAttributeEditModal(task, attribute)">\n <div class="listing-item-image">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#ic_short_text_24px"></use>\n </svg>\n </div>\n <h2 class="listing-item-title">\n {{attribute.label}}\n <span class="listing-item-image tooltip" ng-show="attribute.response_private">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#lock-locked"></use>\n </svg>\n <span class="bug" translate="survey.response_private_desc">Only people with permission to edit responses can see responses to this field</span>\n </span>\n </h2>\n </div>\n </div>\n <div class="listing-item">\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n <a ng-click="openAttributeModal(task)" class="button button-beta" data-modal="add-field">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span translate="survey.add_field">Add field</span>\n </a>\n </h2>\n </div>\n </div>\n </div>\n </div>\n\n <div ng-attr-id="{{ \'section-configure-\' + task.id }}" class="section-1-details tabs-target">\n <div class="form-field switch">\n <label translate="survey.required">Required</label>\n <p data-fieldgroup-target="require-review-message" ng-show="task.required" translate="survey.required_desc">Require this section be completed before a post can be visible to the public.</p>\n <div class="toggle-switch" ng-attr-id="{{ \'toggle-switch-required-\' + task.id }}">\n <input class="tgl" ng-attr-id="{{ \'task-required-\' + task.id }}" type="checkbox" ng-model="task.required">\n <label class="tgl-btn" for="task-required-{{task.id}}" ng-attr-id="{{ \'task-required-label-\' + task.id }}"></label>\n </div>\n </div>\n <div class="form-field switch checked">\n <label translate="survey.internal_use_task">Task is only for internal use</label>\n \x3c!-- todo show list of roles with correct permission for clarity in message below--\x3e\n <p data-fieldgroup-target="internal_only-message" class="active" ng-show="task.task_is_internal_only" translate="survey.internal_use_task_desc">This task will only be visible to User who have Manage Post permission.</p>\n <div class="toggle-switch" ng-attr-id="{{ \'toggle-switch-show-\' + task.id }}">\n <input class="tgl init" ng-attr-id="{{ \'internal_only-\' + task.id }}" type="checkbox" data-fieldgroup-toggle="internal_only-message" ng-model="task.task_is_internal_only">\n <label class="tgl-btn" for="internal_only-{{task.id}}" ng-attr-id="{{ \'internal_only-label-\' + task.id }}"></label>\n </div>\n </div>\n <div class="form-field switch checked">\n <label translate="survey.show_this_task_to">Show this task to everyone when published</label>\n <p data-fieldgroup-target="show_section-message" class="active" ng-show="task.show_when_published" translate="survey.show_this_task_to_desc">When a survey response is published, data from this section will be displayed.</p>\n <div class="toggle-switch" ng-attr-id="{{ \'toggle-switch-show-\' + task.id }}">\n <input class="tgl init" ng-attr-id="{{ \'show_section-\' + task.id }}" type="checkbox" data-fieldgroup-toggle="show_section-message" ng-model="task.show_when_published">\n\n <label class="tgl-btn" for="show_section-{{task.id}}" ng-attr-id="{{ \'show_section-label-\' + task.id }}"></label>\n </div>\n </div>\n\n \x3c!-- <fieldset>\n <legend translate="survey.who_can_contribute_to_section">Who can contribute to fields in this section</legend>\n <div class="form-field radio icon-input" ng-class="{ \'checked\': task.everyone_can_contribute }">\n <label for="survey-add_everyone">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <input name="survey-add" id="survey-add_everyone" ng-value="true" checked="" type="radio" ng-model="task.everyone_can_contribute">\n <span class="label" translate="nav.everyone">Everyone</span>\n </label>\n </div>\n\n <div class="form-field radio icon-input" ng-class="{ \'checked\': !task.everyone_can_contribute }">\n <label for="survey-add_roles">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#people"></use>\n </svg>\n <input class="init" name="survey-add" id="survey-add_roles" ng-value="false" ng-modaldata-fieldgroup-toggle="survey-add_roles" type="radio" ng-model="task.everyone_can_contribute">\n <span translate="app.specific_roles">Specific roles...</span>\n </label>\n\n <div class="form-fieldgroup init" data-fieldgroup-target="survey-add_roles" ng-class="{true:\'\', false:\'active\'}[task.everyone_can_contribute]">\n <div class="form-field checkbox" ng-repeat="role in roles">\n <label>\n <input type="checkbox" checklist-model="section_roles_allowed" checklist-value="role.id">\n {{role.display_name}}\n </label>\n </div>\n </div>\n </div>\n </fieldset> --\x3e\n </div>\n </section>\n \x3c!-- Add nw section/task --\x3e\n <div class="listing-item">\n <div class="listing-item-primary">\n <button ng-click="openTaskModal()" class="button-gamma init" data-toggle="field-type">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="button-label" translate="survey.add_task">Add task</span>\n </button>\n </div>\n </div>\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$rootScope","ModalService",function(e,t){return{restrict:"E",template:n(868),link:function(e){e.newTask={required:!1,attributes:[],type:"task",show_when_published:!1,task_is_internal_only:!0},e.closeModal=function(){t.close()}}}}]},function(e,t){e.exports='<div>\n <div class="form-field title">\n <label translate="survey.task_name">task name</label>\n <input type="text" placeholder="{{ \'survey.name_this_task\' | translate }}" ng-model="newTask.label">\n </div>\n <div class="form-field">\n <label for="task_description" translate="survey.task_description">\n task description\n </label>\n <textarea id="task_description" placeholder="{{ \'survey.describe_this_task\' | translate }}" name="description" data-min-rows="1" rows="1" ng-model="newTask.description"></textarea>\n\n </div>\n <div class="form-field switch">\n <label translate="survey.require_section">Require this section be completed before a post can be visible to the public</label>\n <div class="toggle-switch">\n <input class="tgl" id="require-toggle" type="checkbox" ng-model="newTask.required">\n <label class="tgl-btn" for="require-toggle"></label>\n </div>\n </div>\n <div class="form-field">\n <button type="button" class="button-link modal-trigger" ng-click="closeModal()" translate="app.cancel">Cancel</button>\n <button type="button" class="button-alpha modal-trigger" ng-click="addNewTask(newTask)" translate="app.add_and_close">Add & close</button>\n </div>\n</div>\n'},function(e,t,a){"use strict";e.exports=["$rootScope","$translate","ModalService","_",function(e,n,s,i){return{restrict:"E",template:a(870),link:function(t){t.newAttribute={required:!1,options:[],config:{},priority:0},t.createNewAttribute=function(e){e.label="",t.openAttributeEditModal(t.activeTask,i.extend(t.newAttribute,e))},t.closeModal=function(){s.close()},t.availableAttrTypes=[{label:n.instant("survey.short_text"),type:"varchar",input:"text",description:n.instant("survey.text_desc")},{label:n.instant("survey.long_text"),type:"text",input:"textarea",description:n.instant("survey.textarea_desc")},{label:n.instant("survey.number_decimal"),type:"decimal",input:"number",description:n.instant("survey.decimal_desc")},{label:n.instant("survey.number_integer"),type:"int",input:"number",description:n.instant("survey.integer_desc")},{label:n.instant("survey.location"),type:"point",input:"location",description:n.instant("survey.location_desc")},{label:n.instant("survey.date"),type:"datetime",input:"date",description:n.instant("survey.date_desc")},{label:n.instant("survey.datetime"),type:"datetime",input:"datetime",description:n.instant("survey.datetime_desc")},{label:n.instant("survey.select"),type:"varchar",input:"select",description:n.instant("survey.select_desc")},{label:n.instant("survey.radio_button"),type:"varchar",input:"radio",description:n.instant("survey.radio_desc")},{label:n.instant("survey.checkbox"),type:"varchar",input:"checkbox",cardinality:0,description:n.instant("survey.checkbox_desc")},{label:n.instant("survey.related_post"),type:"relation",input:"relation",description:n.instant("survey.relation_desc")},{label:n.instant("survey.upload_image"),type:"media",input:"upload",description:n.instant("survey.upload_desc"),config:{hasCaption:!0}},{label:n.instant("survey.embed_video"),type:"varchar",input:"video",description:n.instant("survey.video_desc")},{label:"Markdown",type:"markdown",input:"markdown",description:n.instant("survey.markdown_desc")},{label:n.instant("survey.categories"),type:"tags",cardinality:0,input:"tags",description:n.instant("settings.settings_list.categories_desc")}]}}}]},function(e,t){e.exports='<dl class="modal-body" >\n\n <dt class="list-item" ng-repeat-start="type in availableAttrTypes">\n <a ng-click="createNewAttribute(type)" data-modal="edit-field">\n {{type.label}}\n </a>\n </dt>\n <dd ng-repeat-end="">{{type.description}}</dd>\n </dl>\n'},function(e,t,n){"use strict";e.exports=["$rootScope","ModalService","_","Editor",function(e,t,s,i){return{restrict:"E",template:n(872),link:function(n){n.label=angular.copy(n.editAttribute.label),n.editAttribute.config=!n.editAttribute.config||s.isArray(n.editAttribute.config)&&0===n.editAttribute.config.length?{}:n.editAttribute.config,n.labelError=!1;n.editor=new i({el:document.querySelector("#editSection"),previewStyle:"vertical",height:"180px",initialEditType:"wysiwyg",toolbarItems:["heading","bold","italic","link","ol","ul"],usageStatistics:!1}),n.editor.setValue(n.editAttribute.instructions),document.querySelector("#editSection").style.height="240px",n.save=function(e,t){e.instructions=n.editor.getValue(),n.attributeLabel.$invalid||(n.editAttribute.label=n.label,n.addNewAttribute(e,t))},n.closeModal=function(){t.close()},n.onlyOptional=function(){return"title"!==n.editAttribute.type&&"description"!==n.editAttribute.type},n.canDisplay=function(){return"upload"!==n.editAttribute.input&&"title"!==n.editAttribute.type&&"description"!==n.editAttribute.type&&"tags"!==n.editAttribute.input},n.canMakePrivate=function(){return"tags"!==n.editAttribute.type},n.canDisableCaption=function(){return"media"===n.editAttribute.type&&"upload"===n.editAttribute.input}}}}]},function(e,t,n){e.exports=' <div class="modal-body">\n <div class="form-field required"\n ng-class="{\n \'error\': attributeLabel.$invalid && attributeLabel.$dirty\n }">\n <form name="attributeLabel">\n <label translate="app.name">Name</label>\n <input type="text" ng-model="label" ng-required="true" placeholder="{{ \'form.field_name_placeholder\' | translate}}">\n <div\n class="alert error"\n ng-show="attributeLabel.$invalid && attributeLabel.$dirty"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <span translate="{{\'post.valid.label.required\'}}"></span>\n </div>\n </form>\n </div>\n <div class="form-field switch">\n <label translate="survey.show_field_description">Add field description (optional):</label>\n <div class="form-field">\n <div id="editSection"></div>\n </div>\n</div>\n <div ng-if="canDisplay()">\n <div class="form-field" ng-if="hasOptions(editAttribute)">\n <label translate>form.field_options</label>\n <div class="input-inline" ng-repeat="(key, option) in editAttribute.options track by $index">\n <input type="text" placeholder="{{ \'form.field_option_placeholder\'|translate }}" ng-model="editAttribute.options[key]">\n <button type="button" class="button-flat button-beta" ng-if="editAttribute.options.length > 1" ng-click="removeOption(editAttribute, key)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label hidden">Remove</span>\n </button>\n </div>\n <button type="button" class="button-secondary alt" ng-click="addOption(editAttribute)"><i class="fa fa-plus"></i> <span translate>form.field_add_option</span></button>\n </div>\n </div>\n \x3c!-- editing/adding categories --\x3e\n <div class="form-field" ng-if="editAttribute.input ===\'tags\'">\n <label translate>Which categories should be available</label>\n <category-selector\n available="availableCategories"\n selected="editAttribute.options"\n enable-parents="true"\n ></category-selector>\n </div>\n \x3c!-- End of editing/adding categories --\x3e\n <div class="form-field" ng-if="editAttribute.input === \'relation\'">\n <label translate>survey.field_allowed_relation_survey</label>\n <ul name="visible-to">\n <li ng-repeat="relationForm in availableForms | filter : filterNotCurrentForm">\n <label>\n <input type="checkbox" checklist-model="editAttribute.config.input.form" checklist-value="relationForm.id" />\n {{relationForm.name}}\n </label>\n </li>\n </ul>\n </div>\n <div class="form-field switch" ng-show="onlyOptional() && editAttribute.input !== \'tags\'">\n <label translate="survey.required">Require this field be completed</label>\n <div class="toggle-switch">\n <input class="tgl" id="switchnewattribute" type="checkbox" ng-model="editAttribute.required">\n <label class="tgl-btn" for="switchnewattribute"></label>\n </div>\n </div>\n\n \x3c!-- start: media upload toggle to make caption an optional field--\x3e\n <div class="form-field switch" ng-show="canDisableCaption()">\n <label translate="survey.collect_image_caption">Disable Caption field</label>\n <p data-fieldgroup-target="field-caption-disabled-warning" class="init active" translate="survey.disable_caption_field_explanation" ng-show="!editAttribute.config.hasCaption">\n This will disable all captions for this field, but it won\'t delete them from the database. You will be able to re-enable them later.\n </p>\n <div class="toggle-switch">\n <input class="tgl" id="switch-hascaption" type="checkbox" ng-model="editAttribute.config.hasCaption">\n <label class="tgl-btn" for="switch-hascaption"></label>\n </div>\n </div>\n \x3c!-- end: media upload toggle to make caption an optional field--\x3e\n <div class="form-field switch" ng-show="canMakePrivate()">\n <label translate="survey.make_response_private">Make responses private</label>\n <p data-fieldgroup-target="field-private-message-3" class="init active" translate="survey.response_private_desc" ng-show="editAttribute.response_private">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#lock-locked"></use>\n </svg>\n Only people with permission to edit responses will be able to see responses to this field.\n </p>\n <div class="toggle-switch">\n <input class="tgl" id="switchprivateresponse" type="checkbox" ng-model="editAttribute.response_private">\n <label class="tgl-btn" for="switchprivateresponse"></label>\n </div>\n </div>\n <div class="form-field switch" ng-if="canDisplay()">\n <label translate="app.default_value">Default value (optional):</label>\n <div class="form-field">\n <div ng-switch="editAttribute.input">\n <input ng-switch-when="location" type="text" placeholder="{{ \'form.default_location_placeholder\'|translate }}" ng-model="editAttribute.default">\n <input ng-switch-when="date" type="text" date-time="editAttribute.default" ng-model="editAttribute.default">\n <input ng-switch-when="int" type="number" step="1" ng-model="editAttribute.default">\n <input ng-switch-when="decimal" type="number" ng-model="editAttribute.default">\n <input ng-switch-default type="text" placeholder="{{ \'form.default_default_placeholder\'|translate }}" ng-model="editAttribute.default">\n </div>\n </div>\n </div>\n </div>\n <div class="form-field">\n <button ng-show="!editAttribute.id" type="button" class="button-alpha modal-trigger" ng-click="save(editAttribute, activeTask)" translate="app.add_and_close">Add & close</button>\n <button ng-show="editAttribute.id" type="button" class="button-alpha modal-trigger" ng-click="save(editAttribute, activeTask)" translate="app.update_and_close">Update & close</button>\n </div>\n\n</div>\n'},function(e,t,c){"use strict";var d;function n(a,e,o,r,l,t){return{success:function(e,t,n){var s=function(){d&&d.$destroy();return d=o.$new()}();function i(e){n.successText=e,s=a.extend(s,n),l.openTemplate(c(874),"thumb-up","confirmation",s,!1,!1)}r(e,t).then(i,i)}}}(e.exports=n).$inject=["_","$q","$rootScope","$translate","SliderService","ModalService"]},function(e,t){e.exports='<p>\n {{successText}}\n</p>\n\n<a class="button button-beta" ng-click="close()" ui-sref="postCreate({id: formId})" translate="notify.form.add_to_survey">Add to survey</a>\n<button class="button-flat message-trigger" ng-click="close()" translate="message.button.dismiss">\n Dismiss\n</button>\n'},function(e,t,n){"use strict";function s(){return{restrict:"E",link:i,template:n(876)}}function i(e,t,n){e.charactersRemaining=function(){return void 0===e.editQuestion.question||0===e.editQuestion.question.length?(e.error=void 0!==e.editQuestion.question,e.message="You need to add a question.",160):(e.error=!(e.editQuestion.question.length<160),e.message="Your question is too long, you can use maximum 160 characters.",160-e.editQuestion.question.length)},e.removeError=function(){e.questionError=!1},e.save=function(){e.charactersRemaining()<0?e.questionError=!1:e.editQuestion.newQuestion&&e.survey.attributes&&e.checkForDuplicate()?(e.questionError=!0,e.questionMessage="This question already exists"):e.editQuestion.question&&e.editQuestion.question.length?e.questionError||e.addNewQuestion():(e.questionError=!0,e.questionMessage="You need to add a question")}}(e.exports=s).$inject=[]},function(e,t,n){e.exports='<div class="modal-body">\n <div class="form-field" ng-class="{\'error\': error || questionError, \'success\': !error && !questionError}">\n <label class="required" translate="survey.targeted_survey.question_text"></label>\n <p translate="survey.targeted_survey.question_description"></p>\n\n <textarea placeholder="Sample question: Hi there! How are you feeling today? Your response is free." ng-model="editQuestion.question" required ng-change="removeError()"></textarea>\n\n <span class="right" translate="survey.targeted_survey.char_remains" translate-values="{remaining: charactersRemaining()}"></span>\n </div>\n\n <div\n class="alert error"\n ng-show="error"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p>{{message}}</p>\n </div>\n\n <div\n class="alert error"\n ng-show="questionError"\n >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p>{{questionMessage}}</p>\n </div>\n\n <div class="form-field switch checked">\n <label for="switch3" translate="survey.make_response_private"></label>\n <p ng-show="editQuestion.response_private" translate="survey.response_private_desc"></p>\n <div class="toggle-switch">\n <input class="tgl" id="switch3" type="checkbox" ng-model="editQuestion.response_private">\n <label class="tgl-btn" for="switch3"></label>\n </div>\n </div>\n\n <div class="modal-actions">\n <button class="button-alpha modal-trigger" ng-click="save()" translate="form.save_and_close"></button>\n <button class="button-destructive modal-trigger" translate="survey.targeted_survey.delete" ng-click="deleteQuestion()" ng-if="!editQuestion.newQuestion"></button>\n <button class="button modal-trigger" translate="survey.targeted_survey.cancel" ng-click="cancel()" ng-if="editQuestion.newQuestion"></button>\n </div>\n </div>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$q","ConfigEndpoint","Leaflet","Maps","Features",function(r,e,l,c,d){return{restrict:"E",scope:{config:"="},template:n(878),link:function(n,e){var t,s;function i(t){n.$evalAsync(function(){var e=t.target.getLatLng().wrap();n.config.default_view.lat=e.lat,n.config.default_view.lon=e.lng,n.updateMapPreview()})}function a(t){n.$evalAsync(function(){var e=t.latlng.wrap();n.config.default_view.lat=e.lat,n.config.default_view.lon=e.lng,n.updateMapPreview()})}function o(e){n.$evalAsync(function(){n.config.default_view.zoom=t.getZoom()})}n.getPrecision=function(){return 1e3/Math.pow(10,n.config.location_precision)},n.patternDigitsOnly=/^[0-9]+$/,n.patternFloat=/[-+]?(\d*[.])?\d+/,n.minZoom=0,n.maxZoom=18,n.minObfuscation=0,n.maxObfuscation=9,n.updatePrecision=function(){n.current_precision=n.getPrecision()},n.updateMapPreview=function(){t.setView([n.config.default_view.lat,n.config.default_view.lon],n.config.default_view.zoom),s.setLatLng([n.config.default_view.lat,n.config.default_view.lon])},n.updateMapPreviewLayer=function(){t.eachLayer(function(e){e instanceof l.TileLayer&&e.remove()}),c.getLayer(n.config.default_view.baselayer).addTo(t)},n.current_precision=9,n.locationPrecisionEnabled=!1,d.loadFeatures().then(function(){n.locationPrecisionEnabled=d.isFeatureEnabled("anonymise-reporters")}),n.baselayers=c.getBaseLayers(),r.all({map:c.createMap(e[0].querySelector("#settings-map")),config:c.getConfig(!0)}).then(function(e){t=e.map,angular.extend(n.config,e.config),(s=l.marker(t.getCenter(),{draggable:!0,icon:c.pointIcon()})).addTo(t),n.minZoom=t.getMinZoom(),n.maxZoom=t.getMaxZoom(),s.on("dragend",i),t.on("zoomend",o),t.on("click",a),n.current_precision=n.getPrecision()})}}}]},function(e,t){e.exports='<div>\n\n <div class="form-field">\n <label class="input-label" translate>settings.map_default_location</label>\n <div id="settings-map" style="height: 300px; width: 100%;"></div>\n </div>\n\n <div class="form-field">\n <label translate>settings.map_default_baselayer</label>\n <select id="map-settings-base-layer" class="form-control" ng-model="config.default_view.baselayer" ng-change="updateMapPreviewLayer()" ng-options="index as layer.name for (index, layer) in baselayers">\n </select>\n </div>\n\n <div class="form-field">\n <label class="input-label"\n ng-class="{\'error\': map.latitude.$valid}"\n for="map-settings-latitude" translate>settings.map_default_latitude</label>\n <input name="latitude" id="map-settings-latitude" type="number" step="any" ng-min="-90" ng-max="90" required\n ng-class="{\'error\': map.latitude.$valid}"\n ng-model="config.default_view.lat" ng-pattern="patternFloat" ng-change="updateMapPreview()" />\n </div>\n\n <div class="form-field">\n <label class="input-label"\n ng-class="{\'error\': map.latitude.$valid}"\n for="map-settings-longitude" translate>settings.map_default_longitude</label>\n <input name="longitude" id="map-settings-longitude" type="number" step="any" min="-180" max="180" required\n ng-class="{\'error\': map.longitude.$valid}"\n ng-model="config.default_view.lon" ng-pattern="patternFloat" ng-change="updateMapPreview()" />\n </div>\n\n <div class="form-field">\n <label class="input-label" for="map-settings-zoom" translate>settings.map_default_zoom_level</label>\n <input id="map-settings-zoom" type="number" min="{{minZoom}}" max="{{maxZoom}}" required class="form-control" ng-model="config.default_view.zoom" ng-pattern="onlyNumbers" ng-change="updateMapPreview()" />\n </div>\n <div class="form-field" ng-show="locationPrecisionEnabled">\n <label class="input-label" for="map-settings-obfuscation">\n <span translate>\n settings.map_location_precision\n </span> \n </label>\n <p>\n <span translate>\n settings.map_precise_to\n </span>\n {{ current_precision }}km\n </p>\n <input id="map-settings-obfuscation" type="number" min="{{minObfuscation}}" ng-change="updatePrecision()" max="{{maxObfuscation}}" required class="form-control" ng-model="config.location_precision" ng-pattern="onlyNumbers" ng-change="updateMapPreview()" />\n </div>\n <div class="form-field checkbox">\n <input type="checkbox" ng-model="config.clustering" id="map-settings-clustering">\n <label for="map-settings-clustering" translate>settings.map_clustering</label>\n </div>\n</div>\n'},function(e,t,h){"use strict";e.exports=["$q","$http","$translate","$location","$rootScope","ConfigEndpoint","ApiKeyEndpoint","_","Notify","Maps","Util","Languages","Features","Session","TranslationService",function(n,i,e,t,a,o,r,s,l,c,d,u,p,g,m){return{restrict:"E",replace:!0,scope:{formId:"@",formTemplate:"@"},template:h(880),link:function(s){s.saving_config=!1,s.save=e.instant("app.save"),s.saving=e.instant("app.saving"),s.map={},s.fileContainer={file:null},s.SystemLanguage="",p.loadFeatures().then(function(){s.isPrivateEnabled=p.isFeatureEnabled("private")}),r.query().$promise.then(function(e){s.api_key=e[0]}),o.get({id:"site"}).$promise.then(function(e){s.site=e,s.SystemLanguage=e.language}),s.userSavedSettings=!1,s.clearHeader=function(){s.site.image_header=null};s.generateApiKey=function(){l.confirmModal("notify.api_key.change_question").then(function(){(s.api_key?r.update(s.api_key):r.save({})).$promise.then(function(e){s.api_key=e})})},s.updateConfig=function(){s.saving_config=!0,function(){var t=n.defer();if(s.fileContainer.file){var e=new FormData;e.append("file",s.fileContainer.file),i.post(d.apiUrl("/media"),e,{headers:{"Content-Type":void 0}}).then(function(e){s.site.image_header=e.data.original_file_url,t.resolve()},function(e){t.reject(e)})}else t.resolve();return t.promise}().then(function(){n.all([o.saveCache(s.site).$promise,o.saveCache(s.map).$promise]).then(function(e){s.saving_config=!1,a.$broadcast("event:update:header");var t=e[0].language,n=g.getSessionDataEntry("language");null==n&&s.SystemLanguage!==t&&m.translate(t),s.SystemLanguage=t,l.notify("notify.general_settings.save_success")},function(e){l.apiErrors(e),s.saving_config=!1})},function(e){l.apiErrors(e),s.saving_config=!1})},s.cancel=function(){t.path("/settings")}}}}]},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.general</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n <form id="site" name="form" ng-submit="updateConfig()">\n\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="button-group">\n <button type="button" class="button-flat" ng-click="cancel()" translate>app.cancel</button>\n <button type="submit" ng-click="updateConfig()" class="button-alpha" ng-if="!saving_config" ng-disabled="form.$invalid || isUnchanged(site) || saving_config">{{save}}</button>\n <button type="submit" class="button-alpha" ng-if="saving_config" ng-disabled="form.$invalid || isUnchanged(site) || saving_config" translate>{{saving}}\n <div class="loading">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </button>\n\n\n\x3c!-- <button type="button" ng-click="updateConfig()" class="button-alpha" type="submit" ng-disabled="form.$invalid || isUnchanged(site) || saving_config" translate>\n <div class="loading" ng-if="saving_config">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span ng-hide="saving" translate>app.save</span>\n </button>\n --\x3e </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <div class="main-col">\n\n <div class="form-sheet">\n <div class="form-field">\n <label for="site-settings-name" ng-class="{ \'success\': !form.name.$invalid && form.name.$dirty, \'error\' : form.name.$invalid && form.name.$dirty }" translate>settings.deployment_name</label>\n <input id="name" name="name" type="text" placeholder="{{\'settings.deployment_name\' | translate}}" ng-model="site.name" ng-class="{\'error\': form.name.$invalid && form.name.$dirty}" required>\n\n <div class="alert error" ng-repeat="(error, value) in form.name.$error" ng-show="form.name.$dirty" >\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p>{{\'settings.valid.name.\' + error | translate}}</p>\n </div>\n </div>\n\n <div class="form-field">\n <label for="site-settings-description" translate>settings.site_description</label>\n\n <textarea id="site-settings-description" name="description" type="text" ng-model="site.description" placeholder="{{\'settings.site_description_placeholder\' | translate}}" data-min-rows=\'1\' rows=\'1\'></textarea>\n </div>\n\n <div class="form-field">\n <label translate>settings.deployment_logo</label>\n <figure ng-show="site.image_header">\n <img ng-src="{{ site.image_header }}" class="postcard-image deployment-logo" />\n <button class="button-flat" ng-click="clearHeader()" translate="settings.delete_logo"></button>\n </figure>\n\n <file-upload container="fileContainer">\n </file-upload>\n </div>\n\n <div class="form-field" ng-class="{ \'error\': form.email.$invalid && form.email.$dirty }">\n <label translate>settings.site_email</label>\n <p class="small" translate>settings.site_email_note</p>\n <input id="site-settings-email" type="email" placeholder="[email protected]" value="[email protected]" name="email" ng-model="site.email">\n <div ng-repeat="(error, value) in form.email.$error"\n ng-show="form.email.$dirty"\n class="alert error">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="{{\'user.valid.email.\' + error}}" translate-default="{{error}}"></p>\n </div>\n </div>\n <div class="form-field">\n <label translate>settings.site_language</label>\n <language-switch site="site"></language-switch>\n </div>\n <div class="form-field checkbox" ng-show="isPrivateEnabled">\n <input id="private" ng-model="site.private" type="checkbox">\n <label for="private" translate>settings.site_private</label>\n <p translate="settings.site_private_desc">Enabling this option makes your deployment and it’s data only accessible to registered users with the correct privileges, who must sign in for access.</p>\n </div>\n\n <div class="form-field">\n <label translate="settings.api_key">API Key</label>\n <p translate="settings.api_key_desc">The API Key is unique to your deployment, it can be used to allow third party systems to interact with your Ushahidi deployment.</p>\n <button type="button" class="button-beta" ng-click="generateApiKey()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#key"></use>\n </svg>\n <span class="button-label hidden-when-small">\n Generate API Key\n </span>\n </button>\n <span id="api_key" class="bug">{{api_key.api_key}}</span>\n\n </div>\n\n <settings-map config="map"></settings-map>\n </div>\n\n <div class="form-sheet" ng-show="todo">\n\n {# TODO: not yet implemented #}\n\n <div class="form-sheet-summary">\n <h3 class="form-sheet-title" translate>settings.deployment_delete_this</h3>\n </div>\n\n <div class="form-field">\n <p translate>settings.deployment_delete_info</p>\n\n <button class="button-destructive">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label" translate>settings.deployment_delete</span>\n </button>\n </div>\n </div>\n\n </div>\n\n </form>\n\n </main>\n\n</div>\n'},function(e,t,n){"use strict";e.exports=[function(){return{restrict:"E",replace:!0,template:n(882),scope:{filters:"="},controller:["$scope","$rootScope","$translate","$timeout","RoleEndpoint","UserEndpoint","_",function(e,t,n,s,i,a,o){e.filtersMenuOpen=!1,e.cancel=function(){e.usersFiltersForm.$rollbackViewValue(),e.filtersMenuOpen=!1},e.applyFilters=function(){e.filtersMenuOpen=!1}}]}}]},function(e,t,n){e.exports='<form name="usersFiltersForm" role="search" class="searchbar" dropdown is-open="filtersMenuOpen" auto-close="outsideClick" ng-submit="applyFilters()" ng-model-options="{ updateOn : \'submit\' }" ng-class="{ active: status.isopen }">\n \x3c!-- Include search bar --\x3e\n <filter-searchbar model="filters"></filter-searchbar>\n\n \x3c!-- Toggle Filters show/hide --\x3e\n <div class="searchbar-options">\n <a href="#" id="toggleUserSearchFilters" class="button searchbar-options-filter init" data-toggle="search-filters" dropdown-toggle>\n <span class="button-label" translate>app.filters</span>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </a>\n </div>\n\n \x3c!-- Filters menu --\x3e\n <div class="dropdown-menu init" data-toggle-target="search-filters" dropdown-menu>\n <div class="dropdown-menu-body">\n <filter-role model="filters.role"></filter-role>\n </div>\n\n <div class="form-field filter-actions">\n <button type="button" class="button-link" ng-click="cancel()" translate>app.cancel</button>\n <button type="submit" class="button-alpha" ng-disabled="applyEnabled" translate>app.apply_filters</button>\n </div>\n </div>\n</form>\n'},function(e,t,n){"use strict";e.exports=["$translate","$rootScope","$location","RoleEndpoint","Notify","_","Features",function(e,n,t,s,i,a,o){return{restrict:"A",link:function(t){n.setLayout("layout-a"),t.refreshView=function(){s.queryFresh().$promise.then(function(e){t.roles=e})},t.refreshView(),o.loadFeatures().then(function(){t.rolesEnabled=o.isFeatureEnabled("roles")})}}}]},function(e,t,n){"use strict";e.exports=["$translate","$location","RoleEndpoint","PermissionEndpoint","Notify",function(s,i,a,e,o){return{restrict:"A",link:function(n){n.whereToNext="settings/roles",n.save=s.instant("app.save"),n.saving=s.instant("app.saving"),n.saving_role=!1,a.getFresh({id:n.$resolve.$transition$.params().id}).$promise.then(function(e){n.role=e,n.title=n.role.id?"role.edit_role":"role.add_role",s(n.title).then(function(e){n.title=e,n.$emit("setPageTitle",e)})}),e.query().$promise.then(function(e){n.permissions=e.results}),n.cancel=function(){i.path(n.whereToNext)},n.saveRole=function(t){n.saving_role=!0,t.name=t.name?t.name:t.display_name,a.saveCache(t).$promise.then(function(e){o.notify("notify.role.save_success",{role:t.display_name}),i.path(n.whereToNext)},function(e){o.apiErrors(e)}),n.saving_role=!1};function t(e){o.apiErrors(e)}n.checkIfLastAdmin=function(){var t=0;return _.each(n.roles,function(e){"admin"===e.name&&t++}),1===t},n.deleteRole=function(e){"admin"===e.name&&n.checkIfLastAdmin()?o.error("notify.role.last_admin"):o.confirmDelete("notify.role.delete_question",{role:e.display_name}).then(function(){a.delete({id:e.id}).$promise.then(function(){o.notify("notify.role.destroy_success",{role:e.display_name}),i.path(n.whereToNext)},t)})}}}}]},function(e,t,n){"use strict";e.exports=["$translate","$rootScope","$location","WebhookEndpoint","Notify","_","Features",function(e,n,t,s,i,a,o){return{restrict:"A",link:function(t){n.setLayout("layout-a"),t.refreshView=function(){s.queryFresh().$promise.then(function(e){t.webhooks=e})},t.refreshView(),o.loadFeatures().then(function(){t.webhooksEnabled=o.isFeatureEnabled("webhooks")})}}}]},function(e,t,n){"use strict";e.exports=["$q","$translate","$location","_","$state","WebhookEndpoint","FormEndpoint","FormAttributeEndpoint","Notify",function(e,s,i,a,t,o,r,l,c){return{restrict:"A",link:function(n){n.whereToNext="settings/webhooks",n.event_types=["create","update"],n.entity_types=["post"],n.formEnabled=!1,n.selectedForm=void 0,n.save=s.instant("app.save"),n.saving=s.instant("app.saving"),n.processing=!1,e.all([r.query().$promise,o.getFresh({id:n.$resolve.$transition$.params().id}).$promise]).then(function(e){if(n.forms=e[0],n.webhook=e[1],n.webhook.form_id){n.toggleFormAssociation();var t=a.find(n.forms,function(e){return e.id===n.webhook.form_id});n.setSelectedForm(t)}n.title=n.webhook.id?"webhook.edit_webhook":"webhook.add_webhook",s(n.title).then(function(e){n.title=e,n.$emit("setPageTitle",e)})}),n.cancel=function(){i.path(n.whereToNext)},n.saveWebhook=function(t){n.processing=!0,t.name=t.name?t.name:t.display_name,o.saveCache(t).$promise.then(function(e){c.notify("notify.webhook.save_success",{webhook:t.display_name}),i.path(n.whereToNext)},function(e){c.apiErrors(e)}),n.processing=!1};function t(e){n.processing=!1,c.apiErrors(e)}n.getFormAttributes=function(e){n.selectedForm.attributes||(n.selectedForm.attributes=[],l.query({formId:e.id}).$promise.then(function(e){a.each(e,function(e){"title"===e.type||"description"===e.type?e.post_key="title"===e.type?e.type:"content":e.post_key="values."+e.key,n.selectedForm.attributes.push(e)})}))},n.setSelectedForm=function(e,t){n.webhook.form_id=e.id,n.selectedForm=e,n.getFormAttributes(e)},n.toggleFormAssociation=function(){n.formEnabled&&n.webhook.form_id&&(n.selectedForm=void 0,n.webhook.form_id=void 0,n.webhook.source_field_key=void 0,n.webhook.destination_field_key=void 0),n.formEnabled=!n.formEnabled},n.deleteWebhook=function(e){c.confirmDelete("notify.webhook.delete_question",{webhook:e.display_name}).then(function(){o.delete({id:e.id}).$promise.then(function(){c.notify("notify.webhook.destroy_success",{webhook:e.display_name}),i.path(n.whereToNext)},t)})}}}}]},function(e,t,n){"use strict";e.exports=["$stateProvider","$urlMatcherFactoryProvider",function(e,t){t.strictMode(!1),e.state({name:"settings",controller:n(888),template:n(889)}).state({name:"settings.list",url:"/settings",template:n(890),controller:n(891)}).state({name:"settings.general",url:"/settings/general",controller:n(892),template:n(893)}).state({name:"settings.dataImport",url:"/settings/data-import",controller:n(894),template:n(895)}).state({name:"settings.dataAfterImport",url:"/settings/data-after-import",controller:n(896),template:n(897)}).state({name:"settings.userSettings",url:"/settings/user-settings",controller:n(898),template:n(899)}).state({name:"settings.dataExport",url:"/settings/data-export",controller:n(900),template:n(901)}).state({name:"settings.hdx",url:"/settings/hdx",controller:n(902),template:n(903)}).state({name:"settings.hdxDetails",url:"/settings/hdx-details",component:"hdxDetails",params:{exportJob:null}}).state({name:"settings.surveys",url:"/settings/surveys",controller:n(904),template:n(905)}).state({name:"settings.surveys.create",url:"/create",controller:n(210),template:n(211)}).state({name:"settings.surveys.targeted",url:"/targeted-survey"}).state({name:"settings.surveys.targeted.create",url:"/targeted-survey/create",controller:n(212),template:n(213)}).state({name:"settings.surveys.targeted.published",url:"/targeted-survey/published/:id",controller:n(212),template:n(213)}).state({name:"settings.surveys.id",url:"/:action/:id",controller:n(210),template:n(211)}).state({name:"settings.categories",url:"/settings/categories",controller:n(906),template:n(907)}).state({name:"settings.categories.create",url:"/create",controller:n(214),template:n(215)}).state({name:"settings.categories.edit",url:"/:id",controller:n(214),template:n(215)}).state({name:"settings.users",url:"/settings/users",controller:n(908),template:n(909)}).state({name:"settings.users.create",url:"/create",controller:n(910),template:n(216)}).state({name:"settings.users.edit",url:"/:id",controller:n(911),template:n(216)}).state({name:"settings.roles",url:"/settings/roles",controller:n(141),template:n(912)}).state({name:"settings.roles.create",url:"/create",controller:n(141),template:n(217)}).state({name:"settings.roles.edit",url:"/:id",controller:n(141),template:n(217)}).state({name:"settings.webhooks",url:"/settings/webhooks",controller:n(142),template:n(913)}).state({name:"settings.webhooks.create",url:"/create",controller:n(142),template:n(218)}).state({name:"settings.webhooks.edit",url:"/:id",controller:n(142),template:n(218)}).state({name:"settings.datasources",url:"/settings/datasources",controller:n(914),template:n(915)}).state({name:"settings.plan",url:"/settings/plan",controller:n(916),template:n(917)})}]},function(e,t,n){"use strict";e.exports=["$scope","$translate","$location","$rootScope",function(t,e,n,s){if(!1===s.hasManageSettingsPermission())return n.path("/");e("tool.settings").then(function(e){t.title=e,t.$emit("setPageTitle",e)}),t.$emit("event:mode:change","settings")}]},function(e,t){e.exports="<ui-view></ui-view>"},function(e,t,n){e.exports='<div>\n <layout-class layout="c"></layout-class>\n <div class="mode-context init" ng-controller="navigation as nav" dropdown>\n <header class="mode-context-header" ng-class="{ \'has-logo\' : nav.site.image_header }">\n <h1 class="mode-context-title"><a ui-sref="posts.map.all" ng-bind="nav.site.name"></a></h1>\n <img ng-if="nav.site.image_header" ng-src="{{ nav.site.image_header }}" class="deployment-logo" />\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n\n <div class="mode-context-body">\n <p markdown-to-html="nav.site.description"></p>\n </div>\n </div>\n <main role="main">\n\n <div class="main-col">\n\n <div class="listing card init" ng-show="hasManageSettingsPermission()">\n <div class="listing-item" ng-show="hasPermission(\'Manage Settings\')">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.general" translate>settings.settings_list.general</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.general_desc</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="hasPermission(\'Manage Settings\')">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.surveys" translate>settings.settings_list.surveys</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.surveys_desc</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="hasPermission(\'Manage Settings\')">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.datasources" translate>settings.settings_list.data_sources</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.data_sources_desc</p>\n </div>\n </div>\n <div class="listing-item" ng-show="hasPermission(\'Bulk Data Import and Export\') || hasPermission(\'Bulk Data Import\')">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.dataImport" translate>settings.settings_list.import</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.import_desc</p>\n </div>\n </div>\n <div class="listing-item" ng-show="userSettingsEnabled && hxlEnabled">\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n <a ui-sref="settings.userSettings" translate>settings.settings_list.user_settings</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.user_settings_desc</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="hasPermission(\'Bulk Data Import and Export\')">\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n <a ui-sref="settings.dataExport" translate>{{dataExportTitle}}</a></h2>\n <p class="listing-item-secondary" translate>{{dataExportDescription}}</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="hasPermission(\'Manage Users\')">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.users" translate>settings.settings_list.users</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.users_desc</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="isAdmin()">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.roles" translate>settings.settings_list.roles</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.roles_desc</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="hasPermission(\'Manage Settings\')">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.categories" translate>settings.settings_list.categories</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.categories_desc</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="hasPermission(\'Manage Settings\')">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.webhooks" translate>settings.settings_list.webhooks</a></h2>\n <p class="listing-item-secondary" translate>settings.settings_list.webhooks_desc</p>\n </div>\n </div>\n\n <div class="listing-item" ng-show="planIsAvailable">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.plan" translate>settings.settings_list.plans</a></h2>\n <p class="listing-item-secondary" translate-values="{ current_plan: tierNames[tier] }" translate>settings.settings_list.plan_desc</p>\n </div>\n </div>\n </div>\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$translate","$rootScope","_","ConfigEndpoint","Notify","Util","Languages","Features","$scope",function(e,t,n,s,i,a,o,r,l){l.isAdmin=t.isAdmin,l.hasPermission=t.hasPermission,l.hasManageSettingsPermission=t.hasManageSettingsPermission,l.tierNames={free:"Mapper",surveyor:"Surveyor",responder:"Responder","free-pre-jun-2016":"Mapper (Legacy)",zerorated:"Social Impact"},l.dataExportTitle="settings.settings_list.export",l.dataExportDescription="settings.settings_list.export_desc",r.loadFeatures().then(function(){l.planIsAvailable=r.isViewEnabled("plan"),l.userSettingsEnabled=r.isFeatureEnabled("user-settings"),l.hxlEnabled=r.isFeatureEnabled("hxl"),l.hxlEnabled&&(l.dataExportTitle="settings.settings_list.export_hxl",l.dataExportDescription="settings.settings_list.export_desc_hxl"),s.get({id:"site"}).$promise.then(function(e){l.tier=e.tier})})}]},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$location","$translate",function(t,n,e,s){if(!1===n.hasManageSettingsPermission())return e.path("/");n.setLayout("layout-a"),s("tool.site_settings").then(function(e){t.title=e,n.$emit("setPageTitle",e)}),t.$emit("event:mode:change","settings")}]},function(e,t){e.exports="<settings-editor></settings-editor>\n"},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$location","$translate","FormEndpoint","Notify","_",function(t,e,n,s,i,a,o){if(!1===e.hasManageSettingsPermission())return n.path("/");e.setLayout("layout-c"),t.$emit("event:mode:change","settings"),t.fileContainer={file:null},i.query().$promise.then(function(e){t.forms=e})}]},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.import</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n <div class="main-col" importer-csv>\n <div class="alert" translate="feature_limits.view_unavailable" translate-values="{value: \'Bulk Data Import and Export\'}" ng-show="!csvEnabled">\n </div>\n <form name="upload" ng-show="csvEnabled">\n <div class="form-sheet">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate="data_import.csv">CSV</h2>\n <p translate="data_import.import_explanation_csv">Import the data from a CSV spreadsheet into your deployment as posts belonging to a specific survey.</p>\n </div>\n\n <div class="stepper">\n\n <div class="stepper-item" ng-class="{\'complete\': stepOneComplete, \'active\' : isActiveStep(1), \'disabled\' : !isActiveStep(1) }">\n <h2 class="stepper-heading">\n <span class="stepper-badge" ng-show="!stepOneComplete">1</span>\n <span class="stepper-badge" ng-show="stepOneComplete">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#check"></use>\n </svg>\n </span>\n <div translate="data_import.choose_csv_file">\n Choose CSV file\n </div>\n </h2>\n <div ng-show="!stepOneComplete">\n <div class="form-field">\n <file-upload container="fileContainer" required>\n </file-upload>\n </div>\n\n <fieldset class="custom-fieldset init" dropdown auto-close="outsideClick">\n <legend data-toggle="dropdown-menu" class="dropdown-trigger init" dropdown-toggle>\n <span class="legend-label">\n <span tranlate="data_import.import_to">\n Import to\n </span>\n <span class="custom-fieldset-value" ng-show="!selectedForm.id" translate="data_import.which_survey">\n which survey?\n </span>\n <span class="custom-fieldset-value">\n {{selectedForm.name}}\n </span>\n </span>\n <svg class="iconic chevron">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio" ng-repeat="form in forms" ng-class="{\'checked\' : isSelectedForm(form)}" ng-click="setSelectedForm(form)">\n <label for="import-to-{{form.id}}">\n <input id="import-to-{{form.id}}" name="import-to" type="radio">\n {{form.name}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <div class="form-field">\n <button class="button-alpha" type="submit" ng-disabled="upload.$invalid" ng-click="completeStepOne()" translate="settings.continue">Continue</button>\n </div>\n </div>\n </div>\n\n <div class="stepper-item" ng-class="{\'complete\': stepTwoComplete, \'active\' : isActiveStep(2), \'disabled\' : !isActiveStep(2) }">\n <h2 class="stepper-heading">\n <span class="stepper-badge">2</span>\n <span translate="data_import.configure_imported_posts">\n Configure imported posts\n </span>\n </h2>\n <div ng-show="stepOneComplete">\n <ol class="metadata">\n <li>{{fileContainer.file.name}}</li>\n <li>{{selectedForm.name}}</li>\n </ol>\n\n <fieldset>\n <legend translate="data_import.imported_posts_status">Imported posts should have their status...</legend>\n <div class="form-field radio">\n <label for="status-model-mark">\n <input type="radio" id="status-model-mark" name="status-model" ng-model="statusOption" value="mark_as"/>\n <span translate="data_import.marked_as">Marked as...</span>\n </label>\n <fieldset data-fieldgroup-target="status-model-mark" ng-show="isStatusOption(\'mark_as\')">\n <legend class="hidden">Post status</legend>\n <div class="form-field radio icon-input" ng-class="{\'checked\' : isStatusSelected(\'published\')}">\n <label for="status-published" ng-click="setStatus(\'published\')">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#globe"></use>\n </svg>\n <input type="radio" name="status" id="status-published" checked data-fieldgroup-toggle="status-model-mark-published" />\n <span translate="post.published">Published</span>\n </label>\n\n \x3c!--// IF the chosen survey has tasks that must be completed before its posts can be published //--\x3e\n <p ng-show="hasRequiredTask" class="alert" data-fieldgroup-target="status-model-mark-published">Your survey, <strong>{{selectedForm.name}}</strong>, includes tasks that typically must be completed for each post before they can be marked \'published.\' During this import, all of your imported posts will have their tasks marked as \'incomplete\', while still allowing their status to be marked as \'published.\' If you edit any of these posts after they\'ve been imported, however, you\'ll be asked to complete those tasks before re-publishing them.</p>\n \x3c!--// END IF //--\x3e\n </div>\n\n <div class="form-field radio icon-input" ng-class="{\'checked\' : isStatusSelected(\'draft\')}">\n <label for="status-review" ng-click="setStatus(\'draft\')">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#document"></use>\n </svg>\n <input type="radio" name="status" id="status-review" />\n <span translate="post.draft">Under review</span>\n </label>\n </div>\n\n <div class="form-field radio icon-input" ng-class="{\'checked\' : isStatusSelected(\'archived\')}">\n <label for="status-archive" ng-click="setStatus(\'archived\')">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#box"></use>\n </svg>\n <input type="radio" name="status" id="status-archive"/>\n <span translate="post.archived">Archived</span>\n </label>\n </div>\n </fieldset>\n </div>\n\n <div class="form-field radio">\n <label for="status-model-columns" >\n <input type="radio" id="status-model-columns" name="status-model" data-fieldgroup-toggle="status-model-columns" ng-model="statusOption" value="defined_column"/>\n <span translate="data_import.defined_column">Defined by a column in your CSV file...</span>\n </label>\n\n <div class="form-field select" data-fieldgroup-target="status-model-columns" ng-show="isStatusOption(\'defined_column\')">\n <div class="custom-select">\n <select ng-model="selectedStatus">\n <option ng-repeat="column in csv.columns track by $index" value="{{$index}}" label="{{column}}" >\n </select>\n </div>\n <p><em translate="data_import.status_explanation">Ushahidi recognizes one of three post statuses: Published, Under review, and Archived. So be sure that each entry in the column you select has one of those three values.</em></p>\n\n \x3c!--// IF the chosen survey has tasks that must be completed before its posts can be published //--\x3e\n <p class="alert" data-fieldgroup-target="status-model-mark-published">Your survey, <strong>{{selectedForm.name}}</strong>, includes tasks that typically must be completed for each post before they can be marked \'published.\' During this import, all of your imported posts will have their tasks marked as \'incomplete\', even if their status is marked as \'published.\' If you edit any of these posts after they\'ve been imported, however, you\'ll be asked to complete those tasks before re-publishing them.</p>\n \x3c!--// END IF //--\x3e\n </div>\n </div>\n </fieldset>\n\n <fieldset>\n <legend translate="data_import.choose_which_column">Choose which CSV column should be assigned to each survey field</legend>\n <p translate="data_import.each_survey_field">Each of the survey\'s fields are listed below. Choose the column from your CSV file that you\'d like to use to populate each of those fields.</p>\n\n <table>\n <thead>\n <tr>\n <th translate="data_import.survey_field">Survey field</th>\n <th translate="data_import.csv_column">CSV column</th>\n </tr>\n </thead>\n\n <tbody>\n <tr ng-repeat="attribute in selectedForm.attributes">\n <td><span ng-class="{\'required\' : attribute.required}">{{attribute.label}}</span></td>\n <td>\n <div class="custom-select">\n <select ng-model="maps_to[attribute.key]">\n <option selected="selected" value="" translate="data_import.leave_empty">\n Leave empty\n </option>\n <option ng-repeat="column in csv.columns track by $index" value="{{$index}}" label="{{column}}" >\n </select>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n\n </fieldset>\n <div class="form-field">\n <button class="button-beta button-flat" data-accordion-trigger="0" ng-click="cancelImport()" translate="data_import.cancel_import">Cancel</button>\n <button type="submit" class="button-alpha" ng-click="completeStepTwo(csv)" translate="data_import.finish_import">Finish import</button>\n </div>\n </div>\n </div>\n\n </div>\n\n </div>\n </form>\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$location","$translate","$q","Notify","_",function(e,t,n,s,i,a,o){if(!1===t.hasManageSettingsPermission())return n.path("/");t.setLayout("layout-c"),e.$emit("event:mode:change","settings")}]},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.import</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n <main role="main">\n\n <div class="main-col" after-import-csv>\n\n <div class="form-sheet" ng-show="!importComplete">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate="data_import.nearly_complete">Your import is nearly complete</h2>\n <progress max="100" value="60">\n \x3c!--// Fallback for browsers that don\'t support progress element //--\x3e\n <div class="progress-bar">\n <span style="width: 60%;">Progress: 60%</span>\n </div>\n </progress>\n <p translate="data_import.finish_info">The data from your CSV spreadsheet is still being processed. You\'re welcome to leave this page or wait until the process is complete. Either way, we\'ll notify you when your data is ready.</p>\n </div>\n\n <div class="form-field">\n <a href="/settings/data-import" class="button button-gamma button-flat" translate="data_import.import_another">Import another CSV file</a>\n </div>\n </div>\n\n <div class="form-sheet" ng-show="importComplete">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate="data_import.import_complete">Your import is complete</h2>\n <p translate-values="{filename: filename}" translate="data_import.complete_info">The data from your CSV spreadsheet, <em>filename.csv</em>, was successfully imported into your <a href="">Street Maintenance</a> survey.</p>\n </div>\n\n <div class="form-field">\n <a ng-href="/collections/{{collectionId}}" class="button button-alpha" translate="data_import.see_imported_posts">See imported posts</a>\n <a href="/settings/data-import" class="button button-gamma button-flat" translate="data_import.import_another_csv">Import another CSV file</a>\n </div>\n </div>\n\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","Features","$state","_","$q","LoadingProgress","UserSettingsEndpoint","Notify",function(n,e,t,s,i,a,o,r,l){function c(e){"hdx_api_key"===e.config_key&&(e.config_value="*** *** *** *** *** *** *** "+e.config_value.slice(e.config_value.length-4),n.hdxSettings.hdx_api_key=e,n.hxlApiKeySet=!0,n.showCancel=!0),"hdx_maintainer_id"===e.config_key&&(n.hxlMaintainerSet=!0,n.tempMaintainerId=e.config_value,n.hdxSettings.hdx_maintainer_id=e,n.showCancel=!0)}function d(){s.go("settings.hdx")}function u(e){l.apiErrors(e)}n.saveKey=function(){var e,t=[];n.api.api_key.$dirty&&((e=n.hdxSettings.hdx_api_key).config_value=n.tempApiKey,t.push(r.saveCache(e).$promise));n.api.hdx_maintainer_id.$dirty&&((e=n.hdxSettings.hdx_maintainer_id).config_value=n.tempMaintainerId,t.push(r.saveCache(e).$promise));a.all(t).then(function(e){i.each(e,function(e){e.user_id=e.user.id,c(e)}),l.notifyAction("settings.user_settings.api_key_saved",null,!1,"thumb-up","circle-icon confirmation",{callback:d,text:"settings.user_settings.start_tagging",callbackArg:null,actionClass:"button button-alpha"})},u)},n.changeKey=function(){n.hxlApiKeySet=!1},n.changeId=function(){n.hxlMaintainerSet=!1},n.showCancel=!1,n.hxlMaintainerSet=!1,n.hxlApiKeySet=!1,n.cancelMaintainerSet=function(){n.tempMaintainerId=n.hdxSettings.hdx_maintainer_id.config_value,n.hxlMaintainerSet=!0},n.cancelApiKeySet=function(){n.tempApiKey="",n.hxlApiKeySet=!0},n.isLoading=o.getLoadingState,n.tempApiKey="",n.tempMaintainerId="",n.hdxSettings={hdx_api_key:{id:null,user_id:e.currentUser.userId,config_key:"hdx_api_key",config_value:""},hdx_maintainer_id:{id:null,user_id:e.currentUser.userId,config_key:"hdx_maintainer_id",config_value:""}},e.setLayout("layout-c"),t.loadFeatures().then(function(){t.isFeatureEnabled("user-settings")&&t.isFeatureEnabled("hxl")||s.go("posts.map.all")}),r.getFresh({id:e.currentUser.userId}).$promise.then(function(e){i.each(e.results,function(e){e.user_id=e.user.id,c(e)})})}]},function(e,t,n){e.exports='<div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>settings.settings_list.user_settings</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n</div>\n<main role="main">\n <div class="progress-bar" ng-show="isLoading()">\n <span>\n ..\n </span>\n </div>\n <div class="main-col">\n <div class="form-sheet">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate="settings.settings_list.user_settings">\n Configure HDX API\n </h2>\n <p translate="settings.user_settings.user_settings_desc_1">Here you can add your unique key for your Humanitarian Data Exchange (HDX) account.</p>\n <p translate="settings.user_settings.user_settings_desc_2">Once you set it up, this will enable you to upload data directly to a Humanitarian Data Exchange (HDX) account.</p>\n <p translate="settings.user_settings.user_settings_desc_3">You can find your API key on your Humanitarian Data Exchange (HDX) profile once you\'re logged in.</p>\n\n <a href="https://data.humdata.org/faq" class="link-blue" target="_blank">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n {{\'settings.user_settings.view_guide\' |translate}}\n </a>\n </div>\n\n <img class="field-logo" src="'+n(208)+'" />\n <form name="api">\n <div\n class="form-field init required"\n ng-class="{\'error\': api.hdx_maintainer_id.$invalid && api.hdx_maintainer_id.$dirty,\'success\': !api.hdx_maintainer_id.$invalid && api.hdx_maintainer_id.$dirty}"\n ng-show="!hxlMaintainerSet"\n >\n <label class="required " for="hdx_maintainer_id" translate="settings.user_settings.hdx_maintainer_id">\n HDX User Id\n </label>\n <p translate="settings.user_settings.profile_page"> Found on your Humanitarian Data Exchange (HDX) profile page</p>\n <input id="hdx_maintainer_id" name="hdx_maintainer_id" ng-required="true" type="text" ng-model="tempMaintainerId" required="required"/>\n </div>\n\n <div class="form-field alert error" ng-show="!hxlMaintainerSet && api.hdx_maintainer_id.$invalid && api.hdx_maintainer_id.$dirty">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="settings.user_settings.valid_user">A user id is required</p>\n </div>\n\n <div class="form-field" ng-show="!hxlMaintainerSet">\n <button ng-show="showCancel" type="button" class="button-link" ng-click="cancelMaintainerSet()" translate="app.cancel">Cancel</button>\n <button class="button button-alpha" translate="app.save" ng-click="saveKey()">Save</button>\n </div>\n\n\n <div class="form-field init required key" ng-show="hxlMaintainerSet">\n <label class="required " for="hdx_maintainer_id_text" translate="settings.user_settings.hdx_maintainer_id">\n HDX Maintainer Id\n </label>\n <span id="hdx_maintainer_id_text">{{hdxSettings[\'hdx_maintainer_id\'].config_value}}\n <a class="link-blue" ng-click="changeId()" >Change your User ID</a>\n </span>\n </div>\n\n <div\n class="form-field init required"\n ng-class="{\'error\': api.api_key.$invalid && api.api_key.$dirty,\'success\': !api.api_key.$invalid && api.api_key.$dirty}"\n ng-show="!hxlApiKeySet"\n >\n <label class="required " for="api_key" translate="settings.user_settings.api_key">\n Api key\n </label>\n <p translate="settings.user_settings.profile_page"> Found on your Humanitarian Data Exchange (HDX) profile page</p>\n <input id="api_key" name="api_key" ng-required="true" type="text" ng-model="tempApiKey" required="required"/>\n </div>\n\n <div class="form-field alert error" ng-show="!hxlApiKeySet && api.api_key.$invalid && api.api_key.$dirty && !hxlApiKeySet">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n <p translate="settings.user_settings.valid_key">A valid key is required</p>\n </div>\n\n <div class="form-field" ng-show="!hxlApiKeySet">\n <button ng-show="showCancel" type="button" class="button-link" ng-click="cancelApiKeySet()" translate="app.cancel">Cancel</button>\n <button class="button button-alpha" translate="app.save" ng-click="saveKey()">Save</button>\n </div>\n\n <div class="form-field init required key" ng-show="hxlApiKeySet">\n <label class="required" for="api_key_text" translate="settings.user_settings.api_key">\n Api key\n </label>\n <span id="api_key_text">{{hdxSettings[\'hdx_api_key\'].config_value}}\n <a class="link-blue" ng-click="changeKey()" >Change your API key</a>\n </span>\n </div>\n </form>\n </div>\n </div>\n</main>\n'},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$location","DataExport","Notify","FormEndpoint","FormAttributeEndpoint","_","LoadingProgress","Features","UserSettingsEndpoint",function(a,e,t,s,n,i,o,r,l,c,d){if(a.exportAll=function(){s.startExport({send_to_hdx:!1,include_hxl:!1,send_to_browser:!0}),a.showProgress=!0},a.showFields=!1,a.showProgress=!1,a.selectFields=function(){a.showFields=!a.showFields},a.selectedFields=[],a.exportSelected=function(){var e=r.chain(a.selectedFields).flatten().compact().value();if(0===e.length){n.notifyAction('<p translate="data_export.no_fields"></p>',null,!1,"warning","error")}else s.startExport({fields:e,send_to_hdx:!1,include_hxl:!1,send_to_browser:!0}),a.showFields=!1,a.showProgress=!0},a.selectAll=function(t){a.selectedFields[t.id]=a.selectedFields[t.id]?a.selectedFields[t.id]:[],a.selectedFields[t.id].length===t.attributes.length?a.selectedFields[t.id]=[]:r.each(t.attributes,function(e){r.contains(a.selectedFields[t.id],e.key)||a.selectedFields[t.id].push(e.key)})},a.displayedForms=[],a.getForms=u,a.isLoading=l.getLoadingState,a.attachAttributes=function(){r.each(a.forms,function(t){o.query({formId:t.id}).$promise.then(function(e){t.attributes=e})})},a.loadExportJobs=function(){s.loadExportJobs().then(function(e){s.setExportJobs(s.processExportJobs(e)),a.exportJobs=s.getExportJobs()})},a.switchTab=function(e,t){var n=a.tab_history[e];if(n){var s=n+"-li";angular.element(document.getElementById(n)).removeClass("active"),angular.element(document.getElementById(s)).removeClass("active")}t=t+"-"+e;var i=(a.tab_history[e]=t)+"-li";angular.element(document.getElementById(t)).addClass("active"),angular.element(document.getElementById(i)).addClass("active")},a.exportJobs=[],a.dataExportTitle="data_export.title",a.loadingFeature=!0,e.$on("event:export_job:stopped",function(){a.showProgress=!1}),e.$on("event:export_job:started",function(){a.showProgress=!0}),!1===e.hasPermission("Bulk Data Import and Export")&&!1===e.hasPermission("Bulk Data Import"))return t.path("/");function u(){i.queryFresh().$promise.then(function(e){a.forms=e,a.attachAttributes()})}c.loadFeatures().then(function(){a.hxlEnabled=c.isFeatureEnabled("hxl"),a.hxlEnabled&&(a.dataExportTitle="data_export.title_hxl",a.loadingFeature=!1)}),d.getFresh({id:e.currentUser.userId}).$promise.then(function(e){a.hxlApiKey=!1,r.each(e.results,function(e){"hdx_api_key"===e.config_key&&(a.hxlApiKey=!0,a.loadingFeature=!1)})}),e.setLayout("layout-c"),a.$emit("event:mode:change","settings"),a.loadExportJobs(),a.tab_history={},a.switchTab("export","main"),a.$on("exportJobs:updated",function(e,t,n){a.exportJobs=s.getExportJobs()}),u()}]},function(e,t,n){e.exports='<div>\n \x3c!-- TODO This should realy go into its own directive --\x3e\n <div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>data_export.export</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n <div class="progress-bar" ng-show="isLoading() && showFields">\n <span>\n ..\n </span>\n </div>\n\n <div class="main-col">\n <div class="form-sheet" ng-show="!showFields">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate>\n {{dataExportTitle}}\n </h2>\n <p translate ng-show="!showProgress && !hxlEnabled">data_export.description</p>\n \x3c!-- TODO: Revisit and condense below structure of translations when migrating to react --\x3e\n <p ng-show="!showProgress && hxlEnabled">\n {{\'data_export.description_hxl\' | translate}}\n <a href="http://hxlstandard.org/tagging/" class="link-blue" target="_blank">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n {{\'data_export.hxl_tags\' | translate}}\n </a>,\n <a href="http://hxlstandard.org/dictionary/" class="link-blue" target="_blank">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n {{\'data_export.hxl_attributes\' | translate}}\n </a>\n {{\'data_export.and_choose\' | translate}}\n <a href="https://data.humdata.org/" class="link-blue" target="_blank">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n {{\'data_export.HDX\' | translate}}\n </a>\n {{\'data_export.account\' | translate}}\n </p>\n <p translate ng-show="showProgress">data_export.export_progress</p>\n </div>\n\n <nav class="tabs-menu init" data-tabs="survey-details">\n <ul>\n <li id="main-export-li">\n <a ng-click="switchTab(\'export\', \'main\')" translate>\n data_export.export\n </a>\n </li>\n <li id="history-export-li">\n <a ng-click="switchTab(\'export\', \'history\')" translate>\n data_export.export_history\n </a>\n </li>\n </ul>\n </nav>\n\n <div id="main-export" class="survey-details tabs-target" >\n <div class="form-field" ng-hide="hxlApiKey || !hxlEnabled || loadingFeature">\n <div class="alert" >\n <p>{{\'data_export.hxl_apikey_alert_1\' | translate}}</p>\n <p>{{\'data_export.hxl_apikey_alert_2\' | translate}}\n <a ui-sref="settings.userSettings" class="link-blue">\n {{\'data_export.hxl_configure\' | translate}}\n </a>\n {{\'data_export.hxl_apikey_alert_3\' | translate}}\n </p>\n </div>\n </div>\n <div class="form-field">\n <button class="button-alpha" translate ng-click="exportAll()" ng-disabled="showProgress">data_export.all</button>\n <button class="button" ng-click="selectFields()" translate ng-disabled="showProgress">data_export.select_fields</button>\n <a ui-sref="settings.hdx" class="button" ng-show="hxlEnabled" ng-disabled="showProgress || !hxlApiKey" translate>data_export.tags_attributes</a>\n </div>\n </div>\n <div id="history-export" class="survey-details tabs-target">\n <div class="listing">\n <div class="listing-item" ng-repeat="job in exportJobs">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a href="{{job.url}}" target="_blank" translate="data_export.job" translate-values="{jobId: job.id}">Job {{job.id}}</a></h2>\n <p class="listing-item-secondary" translate="data_export.{{job.status}}">Status: {{job.status}}</p>\n <p class="listing-item-secondary" translate="data_export.created" translate-values="{created: job.created}">Created: {{job.created}}</p>\n <p class="listing-item-secondary" translate="data_export.expires" translate-values="{expires: job.url_expiration}">Expires: {{job.url_expiration}}</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="form-sheet" ng-show="showFields && !showProgress">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate>\n data_export.select_fields_title\n </h2>\n <p translate>data_export.select_fields_desc</p>\n </div>\n <div class="form-field" ng-repeat="form in forms">\n <label><bdi>{{form.name}}</bdi></label>\n <div class="form-field checkbox" ng-show="form.attributes">\n <label>\n <input\n type="checkbox"\n ng-checked="selectedFields[form.id].length === form.attributes.length"\n ng-click="selectAll(form)"\n >\n <em><span translate="category.select_all"></span></em>\n </label>\n </div>\n <div class="form-field checkbox" ng-repeat="attribute in form.attributes">\n <label>\n <input\n type="checkbox"\n checklist-model="selectedFields[form.id]"\n checklist-value="attribute.key"\n value="attribute.key"\n >\n <bdi>{{attribute.label}}</bdi>\n </label>\n </div>\n </div>\n <div class="form-field">\n <button class="button-alpha" ng-click="exportSelected()" translate>data_export.export_selected\n </button>\n <button class="button" ng-click="selectFields()" translate>data_export.cancel</button>\n </div>\n </div>\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","Features","$state","HxlExport","_","LoadingProgress","$anchorScroll","Notify","DataExport",function(o,e,t,r,n,c,s,l,d,u){function i(e){e.nbAttributes++}function p(){var t=[];return c.each(o.forms,function(e){c.each(e.attributes,function(e){e.selected&&0<e.selected.length&&t.push(e.key)})}),o.fieldError&&0<t.length&&(o.fieldError=!1),t}function a(e){if(!e.selectedTag)return[];var t="#"+e.selectedTag.tag_name;return c.each(e.selectedHxlAttributes,function(e){t=t+"+"+e.attribute}),[t]}o.selectHxlAttribute=function(e){!function(e){return"geo"===e.selectedTag.tag_name&&1===c.filter(e.selectedHxlAttributes,function(e){return"lon"===e.attribute||"lat"===e.attribute}).length}(e)?e.hxl_label=a(e):e=function(e){var t="lat"===e.selectedHxlAttributes[e.selectedHxlAttributes.length-1].attribute?"lon":"lat";"#geo"!==e.hxl_label[0]?(e.hxl_label=["#geo"],e.selectedHxlAttributes=[],e.nbAttributes--):(i(e),e.selectedHxlAttributes.push({attribute:t}),e.hxl_label=["#geo+lat","#geo+lon"]);return e}(e);return e},o.addAnother=i,o.range=function(e){e.nbAttributes||(e.nbAttributes=1);return c.range(e.nbAttributes)},o.selectTag=function(e){e.selected=[e.id],e.hxl_label=a(e),e.selectedTag&&e.selectedTag.tag_name||i(e);e.selectedHxlAttributes=[]},o.exportData=function(e){var t=function(){var l=[];return c.each(o.forms,function(e){c.each(e.attributes,function(o){if(o.selected&&0<o.selected.length){var r=o.selectedTag?{form_attribute_id:o.id,hxl_tag_id:o.selectedTag.id}:{form_attribute_id:o.id};o.selectedHxlAttributes&&!c.isEmpty(o.selectedHxlAttributes)?c.each(o.selectedHxlAttributes,function(e){var t,n,s,i=(t=o,n=e.attribute,s=c.findWhere(t.tags,{id:t.selectedTag.id}),c.findWhere(s.hxl_attributes,{attribute:n}));if(i){var a=angular.copy(r);a.hxl_attribute_id=parseInt(i.id),l.push(a)}}):l.push(r)}})}),l}();if(0===t.length)o.fieldError=!0,l();else{o.fieldError=!1;var n=void 0,s=void 0,i=void 0,a={fields:o.getSelectedFields(),filters:{status:["published","draft"],has_location:"all",orderby:"created",order:"desc",order_unlocked_on_top:"true",source:["sms","twitter","web","email"]},send_to_hdx:e,include_hxl:!0,send_to_browser:!e,hxl_heading_row:t};i=e?(n="data_export.upload_title",s="data_export.upload_desc","data_export.upload_button"):(n="data_export.hdx_csv_title",s="data_export.hdx_csv_desc","data_export.export_button"),d.confirmModal(n,null,s,"{fields: "+p().length+"}",i,"data_export.go_back").then(function(){e?r.go("settings.hdxDetails",{exportJob:a}):u.startExport(a,e).then(function(e){o.showProgress=!0})})}},o.selectAll=function(e){e.selected?e.attributes=c.map(e.attributes,function(e){return e.selected=[e.id],e}):e.attributes=c.map(e.attributes,function(e){return e.selected=[],e})},o.isLoading=s.getLoadingState,o.getSelectedFields=p,o.hxlAttributeSelected=function(e,t,n){var s=!1,i=angular.copy(t.selectedHxlAttributes);delete i[n],c.findWhere(i,{attribute:e.attribute})&&(s=!0);return s},o.showProgress=!1,e.setLayout("layout-c"),o.$emit("event:mode:change","settings"),t.loadFeatures().then(function(){o.hxlEnabled=t.isFeatureEnabled("hxl"),o.hxlEnabled||r.go("posts.map.all")}),n.getFormsWithTags().then(function(e){o.forms=e})}]},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>nav.export</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n <div class="progress-bar" ng-show="isLoading()">\n <span>\n ..\n </span>\n </div>\n\n <div class="main-col">\n <div class="form-sheet" ng-show="showProgress">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title" translate>\n data_export.title_hxl\n </h2>\n <p translate>data_export.export_progress</p>\n </div>\n </div>\n <div class="form-sheet" ng-show="!showProgress">\n <div class="form-sheet-summary">\n <h2 class="form-sheet-title">\n {{\'data_export.hxl_title\' | translate}}\n </h2>\n <p>{{\'data_export.hxl_desc\' | translate}}</p>\n\n <p>\n {{\'data_export.hxl_instructions_1\' | translate}}\n <a href="https://data.humdata.org/" target="_blank" class="link-blue">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n {{\'data_export.hxl_instructions_2\' | translate}}\n </a>\n {{\'data_export.hxl_instructions_3\' | translate}}\n <a ui-sref="settings.userSettings" class="link-blue">\n {{\'data_export.hxl_instructions_4\' | translate}}\n </a>\n {{\'data_export.hxl_instructions_5\' | translate}}\n </p>\n\n <p>{{\'data_export.hxl_instructions_6\' | translate}}\n <a href="https://tools.humdata.org/examples/hxl/" target="_blank" class="link-blue">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n {{\'data_export.hxl_instructions_7\' | translate}}\n </a>\n {{\'data_export.hxl_instructions_8\' |translate}}\n <a href="http://hxlstandard.org/standard/1_1beta/postcards/" target="_blank" class="link-blue">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n {{\'data_export.hxl_instructions_9\' | translate}}\n </a>\n .\n </p>\n </div>\n <div class="form-field alert error" id="error" ng-show="fieldError">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#warning"></use>\n </svg>\n {{\'data_export.no_fields_selected\' | translate}}\n </div>\n <fieldset ng-repeat="form in forms" ng-hide="form.targeted_survey === true">\n <legend>\n <bdi>{{form.name}}</bdi>\n </legend>\n <table>\n <thead>\n <tr>\n <th></th>\n <th translate="survey.survey_field">Survey field</th>\n <th translate="data_export.HXL_tags">HXL tags</th>\n <th translate="data_export.HXL_attributes">HXL attributes</th>\n <th translate="data_export.tag_preview">Tag preview</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class="form-field">\n <input type="checkbox" ng-model="form.selected" ng-value="1" ng-change="selectAll(form)">\n </td>\n <td>\n <em translate="nav.select_all">Select all<em>\n </td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr ng-repeat="formAttribute in form.attributes">\n <td class="form-field">\n <input\n type="checkbox"\n checklist-model="formAttribute.selected"\n checklist-value="formAttribute.id"\n ng-checked="_.isEmpty(attribute.selected)"\n >\n </td>\n <td>\n <p ng-click="formAttribute.selected = !formAttribute.selected"><bdi>{{formAttribute.label}}</bdi></p>\n </td>\n <td>\n <div class="custom-select">\n <select\n ng-model="formAttribute.selectedTag"\n ng-options="tag as tag.tag_name for tag in formAttribute.tags track by tag.id"\n\n ng-change="selectTag(formAttribute)"\n >\n <option value=\'\'>Leave empty</option>\n </select>\n </div>\n </td>\n <td class="form-field">\n <div class="custom-select" ng-repeat="index in range(formAttribute)">\n <select\n ng-disabled="!formAttribute.selectedTag && !formAttribute.selected"\n ng-model="formAttribute.selectedHxlAttributes[index].attribute"\n ng-change="selectHxlAttribute(formAttribute)"\n >\n <option value=\'\'>Leave empty</option>\n <option\n ng-value="hxlAttribute.attribute"\n ng-repeat="hxlAttribute in formAttribute.selectedTag.hxl_attributes"\n ng-disabled="hxlAttributeSelected(hxlAttribute, formAttribute, index)"\n >\n {{hxlAttribute.attribute}}\n </option>\n\n </select>\n </div>\n <a ng-click="addAnother(formAttribute)" class="link-blue">Add another hxl attribute?</a>\n </td>\n <td>\n <span ng-repeat="hxl_label in formAttribute.hxl_label"><em>{{hxl_label}} </em></span>\n </td>\n </tr>\n </tbody>\n </table>\n </fieldset>\n <div class="form-field" ng-hide="isLoading()">\n <p>{{getSelectedFields().length}} fields selected</p>\n </div>\n <div class="form-field button-group">\n <button class="button-alpha" ng-click="exportData(false)">Export to CSV</button>\n <a ng-click="exportData(true)" class="button button-alpha">Upload to a hdx account</a>\n <a ui-sref="settings.dataExport" class="button">Cancel</a>\n </div>\n </div>\n </div>\n </main>\n</div>\n '},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$translate","$location","$q","FormEndpoint","FormStageEndpoint","Notify","_","Features",function(t,e,n,s,i,a,o,r,l,c){if(e.setLayout("layout-b"),!1===e.hasManageSettingsPermission())return s.path("/");n("nav.posts_and_entities").then(function(e){t.title=e,t.$emit("setPageTitle",e)}),t.$emit("event:mode:change","settings"),c.loadFeatures().then(function(){t.targetedSurveysEnabled=c.isFeatureEnabled("targeted-surveys")}),t.refreshForms=function(){a.queryFresh().$promise.then(function(e){t.forms=e})},t.deleteSurvey=function(e){r.confirmDelete("notify.form.delete_form_confirm","notify.form.delete_form_confirm_desc").then(function(){e.id?a.delete({id:e.id}).$promise.then(function(){r.notify("notify.form.destroy_form_success",{name:e.name}),t.refreshForms()},t.handleResponseErrors):s.url("/settings/surveys")})},t.handleResponseErrors=function(e){r.apiErrors(e)},t.refreshForms()}]},function(e,t,n){e.exports='<div ui-view>\n \x3c!-- mode-context needs to be in each template --\x3e\n <layout-class layout="a"></layout-class>\n <div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.surveys</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n </div>\n \x3c!-- end toolbar --\x3e\n\n <div class="main-col">\n <div class="listing card">\n <article class="listing-item">\n <div class="listing-item-primary">\n <div class="button-group right">\n <a ui-sref="settings.surveys.create"><button class="button-alpha" translate="settings.new_survey">New survey</button></a>\n </div>\n <h2 class="listing-item-title"><a ui-sref="settings.surveys.create" translate="settings.create">Create a new survey</a></h2>\n <p class="listing-item-secondary" translate="settings.create_open_or_targeted" ng-show="targetedSurveysEnabled">Create an open or targeted survey to gather information about Ushahidi.</p>\n </div>\n </article>\n </div>\n <div class="listing card">\n <div class="listing-item" ng-show="forms.length" ng-repeat="form in forms">\n <span class="post-band" ng-style="{backgroundColor: form.color}"></span>\n <div class="listing-item-secondary" dropdown>\n <button class="button-beta button-flat" data-toggle="dropdown-menu" dropdown-toggle>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#ellipses"></use>\n </svg>\n <span class="hidden">More</span>\n </button>\n <ul class="dropdown-menu init" dropdown-menu>\n <li>\n <a href="/settings/surveys/duplicate/{{form.id}}">\n <svg class="iconic">\n <use xlink:href="'+n(209)+'#ic_content_copy_24px"></use>\n </svg>\n <span class="label" translate="survey.duplicate_survey">Duplicate</span>\n </a>\n </li>\n <li>\n <a ng-click="deleteSurvey(form)">\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="label" translate="survey.delete">Delete</span>\n </a>\n </li>\n </ul>\n </div>\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n <a href="/settings/surveys/edit/{{form.id}}" ng-show="!form.targeted_survey || !targetedSurveysEnabled">{{form.name}}</a></h2>\n <a ui-sref="settings.surveys.targeted.published({id: form.id})" ng-show="form.targeted_survey && targetedSurveysEnabled">{{form.name}}</a>\n\n <p class="listing-item-secondary" markdown-to-html="form.description"></p>\n </div>\n </div>\n\n </div>\n\n </div>\n\n </main>\n\n</div>\n'},function(e,t,n){"use strict";e.exports=["$scope","$translate","$rootScope","$location","$q","TagEndpoint","Notify","_",function(n,e,t,s,i,a,o,r){if(!1===t.hasManageSettingsPermission())return s.path("/");function l(e){o.apiErrors(e)}e("tool.manage_tags").then(function(e){n.title=e,n.$emit("setPageTitle",e)}),n.$emit("event:mode:change","settings"),n.refreshView=function(){a.queryFresh().$promise.then(function(t){n.allCategories=t,n.categories=r.map(r.where(t,{parent_id:null}),function(e){return e&&e.children&&(e.children=r.map(e.children,function(e){return r.findWhere(t,{id:parseInt(e.id)})})),e})}),n.selectedCategories=[]},n.refreshView(),n.deleteCategory=function(e){o.confirmDelete("notify.category.destroy_confirm","notify.category.destroy_confirm_desc").then(function(){a.delete(e).$promise.then(function(){o.notify("notify.category.destroy_success",{name:e.tag}),n.refreshView()},l)})},n.deleteCategories=function(){o.confirmDelete("notify.category.bulk_destroy_confirm","notify.category.bulk_destroy_confirm_desc",{count:n.selectedCategories.length}).then(function(){var t=[];angular.forEach(n.selectedCategories,function(e){t.push(a.delete({id:e}).$promise)}),i.all(t).then(function(){o.notify("notify.category.bulk_destroy_success",{count:n.selectedCategories.length}),n.refreshView()},l)})},n.isToggled=function(e){return-1<n.selectedCategories.indexOf(e.id)},n.toggleCategory=function(e){var t=n.selectedCategories.indexOf(e.id);-1<t?n.selectedCategories.splice(t,1):n.selectedCategories.push(e.id)}}]},function(e,t,n){e.exports='<div ui-view>\n\t<layout-class layout="b"></layout-class>\n <div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a ui-sref="settings.list" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.categories</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n <main role="main">\n\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="fab">\n <a ui-sref="settings.categories.create" type="button" class="button button-alpha button-fab" ng-class="{\'disabled\': selectedCategories.length}">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="hidden" translate>category.add_category</span>\n </a>\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <div class="main-col">\n\n <div class="listing card" ng-class="{\'toolbar-active\': selectedCategories.length}">\n <div class="alert" ng-hide="categories.length">\n <p ng-hide="categories.length"><em translate>empty.category</em></p>\n </div>\n\n <div id="category-{{category.id}}" class="listing-item" ng-repeat="category in categories" ng-class="{ \'warning\': isToggled(category) }">\n\n <div class="listing-item-select" ng-click="toggleCategory(category)">\n <input type="checkbox" value="{{category.id}}" ng-checked="isToggled(category)"></input>\n </div>\n\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.categories.edit({id: category.id})">{{category.tag}}</a></h2>\n </div>\n <div class="listing-item-secondary">\n <button class="button-beta button-flat" ng-click="deleteCategory(category)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="hidden">Delete</span>\n </button>\n </div>\n\n <div id="category-{{child.id}}" class="listing-item" ng-repeat="child in category.children" ng-class="{ \'warning\': isToggled(child) }" ng-click="toggleCategory(child)" ng-style="{\'marginLeft\': \'50px\', \'border\': \'none\'}" ng-if="category.children">\n\n <div class="listing-item-select">\n <input type="checkbox" value="{{child.id}}" ng-checked="isToggled(child)">\n </div>\n\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.categories.edit({id: child.id})">{{child.tag}}</a></h2>\n </div>\n <div class="listing-item-secondary">\n <button class="button-beta button-flat" ng-click="deleteCategory(child)">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="hidden">Delete</span>\n </button>\n </div>\n </div>\n </div>\n\n <listing-toolbar entities="allCategories" selected-set="selectedCategories">\n <button type="button" class="button-destructive" ng-disabled="!selectedCategories.length" ng-click="deleteCategories()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label hidden">nav.delete</span>\n </button>\n </listing-toolbar>\n </div>\n \x3c!--\n @FIXME\n I don\'t know if we actually need pagination here. Since we didn\'t use to have a working pagination, I\'m commenting out for the moment.\n Opening a ticket for this and if it turns out we don\'t need it I\'ll just delete this code.\n so I can send the PR for users which do need pagination\n <uib-pagination ng-model="currentPage" items-per-page="itemsPerPage" total-items="totalItems" ng-change="pageChanged()" max-size="5" boundary-links="false" rotate="false"></uib-pagination>\n !--\x3e\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$translate","$q","$location","_","$window","Session","UserEndpoint","RoleEndpoint","Notify",function(s,e,t,i,n,a,o,r,l,c,d){if(!1===e.hasManageSettingsPermission())return n.path("/");var u,p;e.setLayout("layout-a"),t("tool.manage_users").then(function(e){s.title=e,s.$emit("setPageTitle",e)}),c.query().$promise.then(function(e){s.roles=a.indexBy(e,"name")}),s.filters={role:[],q:""},s.selectedUsers=[],s.isToggled=function(e){return-1<s.selectedUsers.indexOf(e.id)},s.toggleUser=function(e){var t=s.selectedUsers.indexOf(e.id);-1<t?s.selectedUsers.splice(t,1):s.selectedUsers.push(e.id)},u=function(e){d.apiErrors(e)},p=function(e){var t=r.getSessionDataEntry("userId");return!!a.contains(s.selectedUsers,t)&&(d.error(e),!0)},s.addUser=function(){n.path("/settings/users/create")},s.deleteUsers=function(){p("user.cannot_delete_yourself")||d.confirmDelete("notify.user.bulk_destroy_confirm",{count:s.selectedUsers.length}).then(function(){var t=[];angular.forEach(s.selectedUsers,function(e){t.push(l.delete({id:e}).$promise)}),i.all(t).then(function(){d.notify("notify.user.bulk_destroy_success"),s.getUsersForPagination()},u).finally(s.filterRole)},function(){})},s.changeRole=function(n){p("user.cannot_change_your_own_role")||d.confirm("notify.user.bulk_role_change_confirm",{count:s.selectedUsers.length,role:n.display_name}).then(function(){var t=[];angular.forEach(s.selectedUsers,function(e){t.push(l.saveCache({id:e,role:n.name}).$promise)}),i.all(t).then(function(){d.notify("notify.user.bulk_role_change_success",{role_name:n.name}),s.getUsersForPagination()},u).finally(s.filterRole)})},s.itemsPerPageChanged=function(e){s.pagination.itemsPerPage=e,s.getUsersForPagination()},s.getUsersForPagination=function(){var e=a.extend({offset:(s.pagination.currentPage-1)*s.pagination.itemsPerPage,limit:s.pagination.itemsPerPage,orderby:"realname"},s.filters);l.queryFresh(e).$promise.then(function(e){s.users=e.results,s.pagination.totalItems=e.total_count,s.showPagination=0<s.pagination.totalItems&&1<s.pagination.totalItems/s.pagination.itemsPerPage})},s.pageChanged=s.getUsersForPagination,s.applyFilters=function(){s.getUsersForPagination()},s.filteredRole="",s.pagination={currentPage:1,itemsPerPage:10,totalItems:10},s.getUsersForPagination(),s.$watch("filters",function(){s.getUsersForPagination()},!0)}]},function(e,t,n){e.exports='<div ui-view>\n <div class="mode-context init" dropdown>\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.users</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="fab">\n <a ui-sref="settings.users.create" type="button" class="button button-alpha button-fab" ng-class="{\'disabled\': selectedUsers.length}">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="hidden" translate>user.add_user</span>\n </a>\n </div>\n\n <filter-users filters="filters"></filter-users>\n\n <div class="button-group" ng-show="todo">\n <button type="button">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#external-link"></use>\n </svg>\n <span class="button-label" translate>nav.export</span>\n </button>\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <div class="main-col">\n\n <div class="listing card" ng-class="{\'toolbar-active\': selectedUsers.length}">\n <div class="alert" ng-hide="users.length">\n <p ng-hide="users.length"><em translate>empty.user</em></p>\n </div>\n\n <div id="user-{{user.id}}" class="listing-item" ng-repeat="user in users | orderBy:\'realname\'" ng-class="{ \'warning\': isToggled(user) }" ng-click="toggleUser(user)">\n <div class="listing-item-select">\n <input type="checkbox" value="{{user.id}}" ng-checked="isToggled(user)">\n </div>\n\n <div class="listing-item-primary">\n <div class="listing-item-image">\n <img class="avatar" ng-src="https://www.gravatar.com/avatar/{{ user.gravatar || \'00000000000000000000000000000000\' }}?d=retro" alt="{{ user.realname }}">\n </div>\n\n <h2 class="listing-item-title"><a ui-sref="settings.users.edit({id: user.id})">{{user.realname}}</a></h2>\n <p class="listing-item-secondary" \n translate-values="{role: roles[user.role].display_name}" \n translate="user.role_display">\n Role: role_name\n </p>\n <p class="listing-item-secondary" style="text-transform: capitalize" ng-repeat="contact in user.contacts"\n translate-values="{\n type: contact.type,\n contact: contact.contact\n }" \n translate="user.contact">\n Contact_Type: contact\n </p>\n </div>\n </div>\n <listing-toolbar entities="users" selected-set="selectedUsers">\n <fieldset class="custom-fieldset init" dropdown>\n <legend class="dropdown-trigger init" data-toggle="dropdown-menu" dropdown-toggle>\n <span class="legend-label" translate>\n user.change_role\n </span>\n <svg class="iconic chevron">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio" ng-repeat="role in roles">\n <label>\n <input type="radio" name="role" ng-click="changeRole(role)">\n {{role.display_name}}\n </label>\n </div>\n </div>\n </fieldset>\n <button type="button" class="button-destructive" ng-disabled="!selectedUsers.length" ng-click="deleteUsers()">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#trash"></use>\n </svg>\n <span class="button-label hidden">nav.delete</span>\n </button>\n </listing-toolbar>\n </div>\n <nav class="pagination" ng-show="showPagination">\n <ul uib-pagination ng-model="pagination.currentPage" items-per-page="pagination.itemsPerPage" total-items="pagination.totalItems" ng-change="pageChanged()" max-size="5" boundary-links="false" rotate="false"></ul>\n </nav>\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$translate","$location","$state","UserEndpoint","Notify","_","RoleEndpoint",function(i,t,e,n,s,a,o,r,l){if(!1===t.hasManageSettingsPermission())return n.path("/");e("user.add_user").then(function(e){i.title=e,t.$emit("setPageTitle",e)}),i.passwordShown=!0,i.user={role:"user"},i.save=e.instant("app.save"),i.saving=e.instant("app.saving"),i.saving_user=!1,i.saveUser=function(t){i.saving_user=!0,a.saveCache(t).$promise.then(function(e){e.id&&(o.notify("notify.user.save_success",{name:t.realname}),i.saving_user=!1,i.userSavedUser=!0,i.user.id=e.id,s.go("settings.users",null,{reload:!0}))},function(e){var n=[],s=!1;r.each(e.data.errors,function(e,t){"limit::admin"===e.title?s="limit.admin_limit_reached":n.push(e)}),s?o.limit(s):o.errors(r.pluck(n,"message")),i.saving_user=!1})},i.cancel=function(){n.path("/settings/users")},l.query().$promise.then(function(e){i.roles=r.indexBy(e,"name")})}]},function(e,t,n){"use strict";e.exports=["$scope","$rootScope","$translate","$location","$transition$","UserEndpoint","Notify","_","RoleEndpoint","Session","$state",function(i,e,t,s,n,a,o,r,l,c,d){if(!1===e.hasManageSettingsPermission())return s.path("/");t("user.edit_user").then(function(e){i.title=e,i.$emit("setPageTitle",e)}),i.passwordShown=!0,i.save=t.instant("app.save"),i.saving=t.instant("app.saving"),i.saving_user=!1,a.getFresh({id:n.params().id}).$promise.then(function(e){i.$emit("setPageTitle",i.title+" - "+e.realname),i.user=e,i.passwordShown=!1}),i.showPassword=function(){i.passwordShown=!0},i.saveUser=function(t){i.saving_user=!0,a.saveCache(t).$promise.then(function(e){e.id&&(o.notify("notify.user.edit_success",{name:t.realname}),i.saving_user=!1,i.userSavedUser=!0,i.user.id=e.id),d.go("settings.users",null,{reload:!0})},function(e){var n=[],s=!1;r.each(e.data.errors,function(e,t){"limit::admin"===e.title?s="limit.admin_limit_reached":n.push(e)}),s?o.limit(s):o.errors(r.pluck(n,"message")),i.saving_user=!1})};function u(e){o.apiErrors(e)}i.deleteUser=function(e){var t,n;t="user.cannot_delete_yourself",n=c.getSessionDataEntry("userId"),r.contains(i.selectedUsers,n)&&(o.error(t),!0)||o.confirmDelete("notify.user.destroy_confirm").then(function(){a.delete({id:e.id}).$promise.then(function(){o.notify("notify.user.destroy_success")},u),s.url("/settings/users")},function(){})},i.cancel=function(){s.path("/settings/users")},l.query().$promise.then(function(e){i.roles=r.indexBy(e,"name")})}]},function(e,t,n){e.exports='<div ui-view>\n <div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a ui-sref="settings.list" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.roles</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="fab" ng-show="rolesEnabled">\n <a ui-sref="settings.roles.create" type="button" class="button button-alpha button-fab">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="hidden" translate>role.add_role</span>\n </a>\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <div custom-roles class="main-col">\n\n <div class="alert" ng-show="!rolesEnabled" translate="feature_limits.view_unavailable" translate-values="{value: \'Custom roles\'}"></div>\n\n <div class="alert" ng-hide="roles.length">\n <p ng-hide="roles.length"><em translate>empty.role</em></p>\n </div>\n\n <div class="listing card" ng-show="roles.length" ng-show="rolesEnabled">\n <div class="listing-item" ng-repeat="role in roles | orderBy:\'role\'">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.roles.edit({id: role.id})">{{role.display_name}}</a></h2>\n </div>\n </div>\n </div>\n </div>\n </main>\n</div>\n'},function(e,t,n){e.exports='<div ui-view>\n <div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.webhooks</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n \x3c!-- toolbar --\x3e\n <div class="toolbar">\n <div class="fab" ng-show="webhooksEnabled">\n <a ui-sref="settings.webhooks.create" type="button" class="button button-alpha button-fab">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#plus"></use>\n </svg>\n <span class="hidden" translate>webhook.add_webhook</span>\n </a>\n </div>\n </div>\n \x3c!-- end toolbar --\x3e\n\n <div custom-webhooks class="main-col">\n\n <div class="alert" ng-show="!webhooksEnabled" translate="feature_limits.view_unavailable" translate-values="{value: \'Custom webhooks\'}"></div>\n\n <div ng-show="webhooksEnabled">\n <div class="alert" ng-hide="webhooks.length">\n <p ng-hide="webhooks.length"><em translate>empty.webhook</em></p>\n </div>\n\n <div class="listing card" ng-show="webhooks.length">\n <div class="listing-item" ng-repeat="webhook in webhooks | orderBy:\'webhook\'">\n <div class="listing-item-primary">\n <h2 class="listing-item-title"><a ui-sref="settings.webhooks.edit({id: webhook.id})">{{webhook.name}}</a></h2>\n </div>\n </div>\n </div>\n\n <uib-pagination ng-model="currentPage" items-per-page="itemsPerPage" total-items="totalItems" ng-change="pageChanged()" max-size="5" boundary-links="false" rotate="false"></uib-pagination>\n </div>\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$q","$scope","$rootScope","$location","$translate","ConfigEndpoint","DataProviderEndpoint","FormEndpoint","FormAttributeEndpoint","Notify","_","Features",function(e,s,t,n,i,a,o,r,l,c,d,u){if(!1===t.hasManageSettingsPermission())return n.path("/");t.setLayout("layout-c"),s.$emit("event:mode:change","settings"),s.saving=!1,s.settings={},s.available_providers=[],s.formEnabled=[],s.surveys={},s.formsSubmitted={},s.panelVisible={},s.forms={},s.selectedForm={},s.savedProviders={},i("settings.data_sources.data_sources").then(function(e){s.title=e,s.$emit("setPageTitle",e)}),s.allowedTypeMapping=function(e,t){if(e===t)return!0;return!("text"!==e||!d.contains(["text","varchar","title","description","markdown"],t))},s.getFormAttributes=function(e,t){s.selectedForm[t]=e,s.selectedForm[t].attributes||(s.selectedForm[t].attributes=[],l.query({formId:e.id}).$promise.then(function(e){s.selectedForm[t].attributes=[],d.each(e,function(e){"title"===e.type||"description"===e.type?e.post_key="title"===e.type?e.type:"content":e.post_key="values."+e.key,s.selectedForm[t].attributes.push(e)})}))},s.setSelectedForm=function(e,t){s.settings[t].form_id=e.id,s.selectedForm[t]=e,s.getFormAttributes(e,t)},s.isSelectedForm=function(e,t){return!(!s.settings[t]||!s.settings[t].form_id)&&s.settings[t].form_id===e},s.toggleFormAssociation=function(e){s.formEnabled[e]&&s.settings[e]&&(s.settings[e].form_id=void 0,s.selectedForm[e]=void 0),s.formEnabled[e]=!s.formEnabled[e]},s.saveProviderSettings=function(t){if(s.saving)return!1;s.forms[t].$valid?(s.saving=!0,t in s.savedProviders||(s.settings.providers[t]=!0),s.settings.id="data-provider",a.saveCache(s.settings).$promise.then(function(e){s.saving=!1,c.notify("notify.datasource.save_success"),p(t)},function(e){c.apiErrors(e)}),s.formsSubmitted[t]=!1):(s.formsSubmitted[t]=!0,s.panelVisible[t]=!0)};var p=function(e){s.savedProviders[e]||(s.savedProviders[e]=!0)};e.all([o.queryFresh().$promise,a.get({id:"data-provider"}).$promise,r.query().$promise,u.loadFeatures()]).then(function(e){s.providers=e[0],s.settings=e[1],s.surveys=e[2],s.available_providers=e[3]["data-providers"],d.forEach(s.settings,function(t,e){if(t.form_id){s.toggleFormAssociation(e);var n=d.find(s.surveys,function(e){return e.id===t.form_id});s.setSelectedForm(n,e)}}),s.savedProviders={},d.forEach(s.providers.results,function(e){s.settings[e.id]&&p(e.id)})})}]},function(e,t,n){e.exports='<div>\n <div class="mode-context init">\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.data_sources</h1>\n </header>\n\n <span class="mode-context-trigger">\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n <div class="main-col">\n\n <div class="alert">\n <p><em translate>settings.data_sources.hint_turn_on_off</em></p>\n </div>\n\n <div class="listing card">\n\n \x3c!-- TODO: fix active class toggle --\x3e\n <div class="listing-item active" ng-repeat="provider in providers.results | orderBy:\'name\'" is-open="panelVisible[provider.id]" dropdown auto-close="disabled" ng-if="available_providers[provider.id]">\n\n <div class="listing-item-secondary">\n <button type="button" class="button-beta button-flat listing-item-toggle" dropdown-toggle>\n <svg class="iconic">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="button-label" translate>settings.data_sources.configure</span>\n </button>\n </div>\n\n <div class="listing-item-primary">\n <h2 class="listing-item-title">\n {{provider.name}}\n <span class="status-indicator" ng-class="{ \'green\' : available_providers[provider.id] && settings.providers[provider.id] }"></span>\n </h2>\n </div>\n\n <div class="listing-item-body" dropdown-menu>\n\n <div class="alert error" ng-if="forms[provider.id].$invalid">\n <p translate>settings.data_sources.hint_plugin_needs_configuring</p>\n </div>\n\n <div class="alert" ng-if="!available_providers[provider.id]">\n <p translate translate-values="{value: \'{{provider.name}}\'}">\n settings.data_sources.unavailable\n </p>\n </div>\n\n <form name="forms.{{provider.id}}" ng-submit="saveProviderSettings(provider.id)" ng-if="available_providers[provider.id]">\n\n <div class="form-field switch" ng-if="forms[provider.id].$valid">\n <label translate>settings.data_sources.enable_provider_message</label>\n <div class="toggle-switch">\n <input class="tgl" id="{{provider.id}}_enable" type="checkbox" ng-model="settings.providers[provider.id]" ng-change="saveProviderSettings(provider.id)">\n <label class="tgl-btn" for="{{provider.id}}_enable"></label>\n </div>\n </div>\n <div class="form-field switch" ng-if="forms[provider.id].$valid">\n <label translate="settings.data_sources.associate_with_form">Import to survey</label>\n <div class="toggle-switch">\n <input class="tgl" id="{{provider.id}}_form_enable" type="checkbox" ng-checked="formEnabled[provider.id]" ng-click="toggleFormAssociation(provider.id)">\n <label class="tgl-btn" for="{{provider.id}}_form_enable"></label>\n </div>\n <div data-fieldgroup-target="import_to_survey-survey" class="init active">\n <p data-fieldgroup-target="hide-author-message" class="init" ng-class="{\'active\' : formEnabled[provider.id]}" translate-values="{ datasource_type: provider.name }" translate="survey.choose_survey_field_desc" >\n <em>\n All incoming data from {{provider.name}} will be used to create responses to the survey you choose.\n </em>\n </p>\n\n <fieldset ng-show="formEnabled[provider.id]" class="custom-fieldset init" dropdown auto-close="outsideClick">\n <legend class="dropdown-trigger init" dropdown-toggle>\n <span class="legend-label">\n <span tranlate="data_import.import_to">\n Import to\n </span>\n <span class="custom-fieldset-value" ng-show="!selectedForm[provider.id]" translate="data_import.which_survey">\n which survey?\n </span>\n <span class="custom-fieldset-value" ng-show="selectedForm[provider.id]">\n {{selectedForm[provider.id].name}}\n </span>\n </span>\n <svg class="iconic chevron">\n <use xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n </legend>\n\n <div class="dropdown-menu init" dropdown-menu>\n <div class="form-field radio"\n ng-repeat="form in surveys"\n ng-class="{\'checked\' : isSelectedForm(form.id, provider.id)}"\n ng-click="setSelectedForm(form, provider.id);$event.stopPropagation()">\n <input\n id="import-to-{{form.id}}"\n name="import-to"\n ng-checked="isSelectedForm(form.id, provider.id)"\n type="radio">\n <label for="import-to-{{form.id}}">\n {{form.name}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset data-fieldgroup-target="import_to_survey-fields" class="init active" ng-show="selectedForm[provider.id] && formEnabled">\n <legend translate="survey.choose_survey_field">Choose what should be assigned to each survey field</legend>\n <p translate="survey.choose_survey_field_desc" translate-values="{ datasource_type: provider.name }">Each of the survey\'s fields are listed below. Choose the data from {{provider.name}} that you\'d like to use to populate each of those fields.</p>\n <table>\n <thead>\n <tr>\n <th>{{provider.name}} data</th>\n <th translate="survey.survey_field">Survey field</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="(field, field_type) in provider.inbound_fields">\n <td>\n <span>\n {{field}}\n </span>\n </td><td>\n <div class="custom-select">\n <select ng-model="settings[provider.id][\'inbound_fields\'][field]">\n <option selected="selected" value="" translate="data_import.leave_empty">\n Leave empty\n </option>\n <option\n ng-repeat="attribute in selectedForm[provider.id].attributes"\n ng-show="allowedTypeMapping(field_type, attribute.type)"\n value="{{attribute.post_key}}"\n label="{{attribute.label}}"\n ng-class="{\'required\' : attribute.required}">\n </select>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </fieldset>\n </div>\n </div>\n\n <div ng-repeat="(option_key, option) in provider.options track by option_key" ng-class="{ error : formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid, \'form-field\' : option.input !== \'radio\', \'required\' : option.rules.indexOf(\'required\') > -1 }">\n\n <div class="" ng-if="option.input == \'read-only-text\'">\n <label ng-if="option.label" ng-bind-html="option.label" class="input-label"></label>\n <p ng-bind-html="option.description"></p>\n </div>\n\n <div class="form-field" ng-if="option.input == \'text\'">\n <p ng-if="option.label">\n {{option.label}}\n </p>\n\n <p ng-if="option.description">\n {{option.description}}\n </p>\n\n <input ng-if="option.rules.indexOf(\'number\') > -1" id="{{provider.id}}_{{option_key}}" name="{{option_key}}" type="number" ng-pattern="/^\\d+$/" ng-model="settings[provider.id][option_key]" ng-required="option.rules.indexOf(\'required\') > -1" ng-disabled="saving" ng-class="{error:formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid}">\n <input ng-if="option.rules.indexOf(\'email\') > -1" id="{{provider.id}}_{{option_key}}" name="{{option_key}}" type="email" ng-pattern="/^[a-z]+[a-z0-9._]+@[a-z]+\\.[a-z.]{2,5}$/" ng-model="settings[provider.id][option_key]" ng-required="option.rules.indexOf(\'required\') > -1" ng-disabled="saving" ng-class="{error:formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid}">\n <input ng-if="option.rules.indexOf(\'password\') > -1" id="{{provider.id}}_{{option_key}}" name="{{option_key}}" type="password" ng-model="settings[provider.id][option_key]" ng-required="option.rules.indexOf(\'required\') > -1" ng-disabled="saving" ng-class="{error:formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid}">\n <input ng-if="option.rules.indexOf(\'number\') == -1 && option.rules.indexOf(\'email\') == -1 && option.rules.indexOf(\'password\') == -1" id="{{provider.id}}_{{option_key}}" name="{{option_key}}" type="{{option.input}}" ng-model="settings[provider.id][option_key]" ng-required="option.rules.indexOf(\'required\') > -1" ng-disabled="saving" ng-class="{error:formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid}">\n </div>\n\n <fieldset ng-if="option.input == \'radio\'">\n <label ng-if="option.label">\n {{option.label}}\n </label>\n\n <p ng-if="option.description">\n {{option.description}}\n </p>\n\n <div class="form-field radio" ng-repeat="radio_option in option.options track by $index">\n <label for="{{provider.id}}_{{option_key}}_{{$index}}">\n <input id="{{provider.id}}_{{option_key}}_{{$index}}" type="{{option.input}}" name="{{option_key}}" ng-value="radio_option" ng-model="settings[provider.id][option_key]" ng-required="option.rules.indexOf(\'required\') > -1" ng-disabled="saving">{{radio_option}}\n </label>\n </div>\n </fieldset>\n\n <div class="alert error" ng-if="formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid">\n <p translate>settings.generic_field_error</p>\n </div>\n\n </div>\n\n <button type="submit" class="button-alpha">\n <div class="loading" ng-show="saving">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n <span ng-hide="saving" translate>app.save</span>\n </button>\n\n </form>\n\n </div>\n\n </div>\n\n </div>\n\n </div>\n </main>\n</div>\n'},function(e,t,n){"use strict";e.exports=["$scope","$translate","$rootScope","CONST","ConfigEndpoint","Notify",function(n,e,s,t,i,a){var o={free:{plan:"Mapper",newPlan:"Ushahidi Demo"},surveyor:{plan:"Surveyor",newPlan:"Ushahidi Basic"},responder:{plan:"Responder",newPlan:"Ushahidi Basic"},"free-pre-jun-2016":{plan:"Mapper (Legacy)",newPlan:"Ushahidi Demo"},zerorated:{plan:"Social Impact",newPlan:"Ushahidi Basic"}};s.setLayout("layout-c"),n.switchTab=function(e){n.activeTab&&(angular.element(document.getElementById(n.activeTab)).removeClass("active"),angular.element(document.getElementById(n.activeTab+"-li")).removeClass("active"));angular.element(document.getElementById(e)).addClass("active"),angular.element(document.getElementById(e+"-li")).addClass("active"),n.activeTab=e},n.activeTab="demo",e("nav.plan_settings").then(function(e){n.title=e,s.$emit("setPageTitle",e)}),i.get({id:"site"}).$promise.then(function(e){n.tier=e.tier;var t="You have the <strong>"+o[n.tier].plan+"</strong> plan. This plan is now out of date and has been replaced by <strong>"+o[n.tier].newPlan+"</strong>. ";if(!s.isAdmin()||"zerorated"!==n.tier&&"surveyor"!==n.tier&&"responder"!==n.tier){if(s.isAdmin()&&("free"===n.tier||"free-pre-jun-2016"===n.tier)){a.notifyPermanent(t+"Your account will be migrated to Ushahidi Demo between 8 October 2018 and 12 October 2018. ")}}else{a.notifyPermanent(t+"Your deployment will be upgraded, at no additional cost, to the new Ushahidi Basic plan. This change will occur between 8 October 2018 and 12 October 2018.")}}),n.username=encodeURIComponent((s.currentUser||{}).email),n.cloudDomain="undefined"!=typeof deploymentsDomain?deploymentsDomain:"ushahidi.io",n.subdomain="undefined"!=typeof apiDomain?t.BACKEND_URL.replace("."+apiDomain,"").replace(/http[s]?:\/\//,""):t.BACKEND_URL}]},function(e,t,n){e.exports='<div>\n <div class="mode-context init" dropdown>\n\n <header class="mode-context-header">\n <ol class="breadcrumbs">\n <li><a href="/" ng-controller="navigation as nav">{{nav.site.name}}</a></li>\n <li><a href="/settings" translate>app.settings</a></li>\n </ol>\n <h1 class="mode-context-title" translate>app.plans</h1>\n </header>\n\n <span class="mode-context-trigger" dropdown-toggle>\n <svg class="iconic">\n <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(0)+'#chevron-bottom"></use>\n </svg>\n <span class="label hidden" translate>app.show_more_less</span>\n </span>\n </div>\n\n <main role="main">\n\n <div class="wrapper">\n <div class="tiers" role="article">\n <nav class="tabs-menu init" data-tabs="pricing-tabs">\n <ul>\n <li id="demo-li" class="active">\n <a href="#" ng-click="switchTab(\'demo\')">\n Ushahidi Demo\n <span class="tabs-label">Self Service</span>\n </a>\n\n </li>\n <li id="basic-li" >\n <a href="#" ng-click="switchTab(\'basic\')">\n Ushahidi Basic\n <span class="tabs-label">Self Service</span>\n </a>\n\n </li>\n <li id="enterprise-single-li" >\n <a href="#" ng-click="switchTab(\'enterprise-single\')">\n Single Deployment\n <span class="tabs-label alt">Enterprise</span>\n </a>\n\n </li>\n <li id="enterprise-multiple-li" >\n <a href="#" ng-click="switchTab(\'enterprise-multiple\')">\n Multiple Deployment\n <span class="tabs-label alt">Enterprise</span>\n </a>\n </li>\n </ul>\n </nav>\n\n <div class="tier pricing-tabs active tabs-target" id="demo">\n <span class="tier-label">Self Service</span>\n\n <div class="tier-summary">\n <h2 class="tier-name">Ushahidi Demo</h2>\n <p class="small">limited use - 1 month</p>\n <p>Test out the Ushahidi crowdsourcing and situation awareness platform.</p>\n <strong class="tier-price">Free</strong>\n <a class="button button-alpha" disabled ng-show="tier == \'demo_1\'">✓ Subscribed</a>\n <a href="//{{ cloudDomain }}/settings/login?subdomain={{ subdomain }}&username={{ username }}&tier=demo_1" class="button button-alpha" ng-hide="tier == \'demo_1\'">Sign up</a>\n </div>\n\n <div class="show-on-mobile">\n <div class="tier-features">\n <div class="tier-feature">\n <h3 class="tier-heading">Free Software, Hosting, and Maintenance</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Embeddable web form, email, SMSsync, data collection online/offline iOS and Android App. Map and Timeline data visualization <br> Roles/Permissions. Email, SMS, Twitter. Private Deployments. Analytics Visualization Page. Import/Export Data.</h3>\n <a href="#5355">Find out more about data collection</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">1 Deployment</h3>\n <a href="#5348">What’s a deployment?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">25 admins and/or custom roles</h3>\n <a href="#5349">What’s an admin?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">25 posts maximum</h3>\n <a href="#5352">What’s a post?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Deployments appear in Ushahidi iOS/Android App</h3>\n <a href="#5728">Learn more about our app</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Crowdsourced surveys</h3>\n <a href="#5350">What’s a crowdsourced survey?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">No targeted surveys</h3>\n <a href="#5351">What’s a targeted survey?</a>\n </div>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">One-time Support Services not available for demo</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">On-going support services not available for demo</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Custom feature development not available for demo</h3>\n </div>\n </div>\n </div>\n\n <div class="tier pricing-tabs tabs-target" id="basic">\n <span class="tier-label">Self Service</span>\n <div class="tier-summary">\n <h2 class="tier-name">Ushahidi Basic</h2>\n <p class="small hide-on-mobile" style="visibility: hidden;">this is a line break hack</p>\n <p>Collect, monitor, analyze, and respond to real time incidents and engage with stakeholders.</p>\n <strong class="tier-price">$499 <em>/mo</em></strong>\n <a class="button button-alpha" ng-show="tier == \'level_1\'" disabled ng-show="tier == \'level_1\'">✓ Subscribed</a>\n <a href="//{{ cloudDomain }}/settings/login?subdomain={{ subdomain }}&username={{ username }}&tier=level_1" class="button button-alpha" ng-hide="tier == \'level_1\'">Sign up</a>\n </div>\n\n <div class="show-on-mobile">\n <div class="tier-features">\n <div class="tier-feature">\n <h3 class="tier-heading">$499/month for Software, Hosting, and Maintenance</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Embeddable web form, email, SMSsync, data collection online/offline iOS and Android App. Map and Timeline data visualization <br> Roles/Permissions. Email, SMS, Twitter. Private Deployments. Analytics Visualization Page. Import/Export Data.</h3>\n <a href="#5355">Find out more about data collection</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">1 Deployment</h3>\n <a href="#5348">What’s a deployment?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">25 admins and/or custom roles</h3>\n <a href="#5349">What’s an admin?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Unlimited posts</h3>\n <a href="#5352">What’s a post?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Deployments appear in Ushahidi iOS/Android App</h3>\n <a href="#5728">Learn more about our app</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Crowdsourced surveys</h3>\n <a href="#5350">What’s a crowdsourced survey?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">No targeted surveys</h3>\n <a href="#5351">What’s a targeted survey?</a>\n </div>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">One-time Support Services not available for basic</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">On-going support services not available for basic</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Custom feature development not available for basic</h3>\n </div>\n </div>\n </div>\n\n <div class="tier pricing-tabs tabs-target" id="enterprise-single">\n <span class="tier-label alt">Enterprise</span>\n <div class="tier-summary">\n <h2 class="tier-name">Ushahidi Enterprise: Single Deployment</h2>\n <p>Ushahidi platform capabilities, technical expertise, ongoing support, and customizations.</p>\n <p class="hide-on-mobile" style="visibility: hidden;"> this is a line break hack. this is a line break hack. this is a line break hack. this is a line break hack.</p>\n <p class="form-heading">Contact us about Enterprise Services for your organization</p>\n\n </div>\n\n <form id="form7" name="form7" class="wufoo topLabel" accept-charset="UTF-8" autocomplete="off" enctype="multipart/form-data" method="post" novalidate="" action="https://ushah.wufoo.com/forms/pb6wq340260j75/#public">\n\n <div class="form-field">\n <label class="desc" id="title1" for="Field1">Your name <span id="req_1" class="req">*</span></label>\n <input placeholder="Your name" id="Field1" name="Field1" type="text" class="field text medium" value="" maxlength="255" tabindex="1" onkeyup="" required="">\n </div>\n\n <div class="form-field">\n <label class="desc nodisplay" id="title2" for="Field2">Your email <span id="req_2" class="req">*</span></label>\n <input placeholder="[email protected]" id="Field2" name="Field2" type="email" spellcheck="false" class="field text medium" value="" maxlength="255" tabindex="2" required="">\n </div>\n\n <div class="form-field">\n <label class="desc nodisplay" id="title3" for="Field5">Phone number <span id="req_5" class="req">*</span></label>\n <input id="Field5" class="field text medium" name="Field5" tabindex="3" onkeyup="handleInput(this);" onchange="handleInput(this);" required="" type="tel" maxlength="255" value="" style="display: block; width: 100%;">\n </div>\n\n <div class="form-field">\n <label class="desc nodisplay" id="title3" for="Field3">Your organization</label>\n <input placeholder="Your organization" id="Field3" name="Field3" type="text" class="field text medium" value="" maxlength="255" tabindex="3" onkeyup="">\n </div>\n\n <div class="form-field">\n <button id="saveForm" name="saveForm" class="button btTxt submit" type="submit" onclick="ga(\'send\',\'event\',\'links\',\'contact\', \'plan-solutions\',1);">Continue</button>\n </div>\n\n <div class="nodisplay">\n <label for="comment">Do Not Fill This Out</label>\n <textarea name="comment" id="comment" rows="1" cols="1"></textarea>\n <input type="hidden" id="idstamp" name="idstamp" value="zkhl5vdgevIPMx9QV0j5WIpon8aq8lW5GuXOYyAWb/k=">\n </div>\n </form>\n\n <div class="tier-features">\n <div class="tier-feature">\n <strong class="tier-price">Base Pricing</strong>\n <p class="small">(1 Deployment)</p>\n <h3 class="tier-heading">\n Set-up\n <br>\n $15,000+\n <br><br>\n 1 Remote Training\n <br>\n $1,500+\n <br><br>\n Software, Hosting & Maintenance\n <br>\n $999+/month\n <br><br>\n Ongoing Technical Support\n <br>\n $1500+/month\n <br><br>\n <p class="small">*pricing modified based upon circumstances and customizations</p>\n </h3>\n </div>\n </div>\n\n <div class="show-on-mobile">\n <div class="tier-features">\n <div class="tier-feature">\n <h3 class="tier-heading">$999+/month for Software, Hosting, and Maintenance</h3>\n <p class="small">*subject to increase with customizations</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">All of Ushahidi Basic + 25 admins. SMS targeted surveys. Automated sorting capabilities.</h3>\n <a href="#5355">Find out more about data collection</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">1 Deployment</h3>\n <a href="#5348">What’s a deployment?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">25 admins and/or custom roles</h3>\n <a href="#5349">What’s an admin?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Unlimited posts</h3>\n <a href="#5352">What’s a post?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Deployments appear in Ushahidi iOS/Android App</h3>\n <a href="#5728">Learn more about our app</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Crowdsourced surveys</h3>\n <a href="#5350">What’s a crowdsourced survey?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Access to targeted surveys and the ability to gather and upload contacts and send multi-question SMS surveys. Contact for pricing based on country location and survey sizes</h3>\n <a href="#5351">What’s a targeted survey?</a>\n </div>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">One-time Support Services</h3>\n <a href="#5729">Find out more about one-time services</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">On-going support services</h3>\n <a href="#5730">Find out more about on-going services</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Custom feature development</h3>\n <p class="small">*contact for scoping and pricing</p>\n <a href="#5731">Find out more about custom feature development</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Collaborative Discovery Session</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Platform set-up\n <br>\n $15,000+\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Survey configuration - Contact for pricing</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Training of project administrators\n <br>\n $1500+\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Training of trainers, Training of monitors or field staff, Stakeholder Engagement Toolkit, White Labeling, Translation</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Ongoing technical support account manager\n <br>\n $1500+/month\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Long-term embedded Ushahidi platform administrator(s)</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Long-term embedded Ushahidi platform community engagement officer(s)</h3>\n <p class="small">*contact for pricing</p>\n </div>\n </div>\n </div>\n\n <div class="tier pricing-tabs tabs-target" id="enterprise-multiple">\n <span class="tier-label alt">Enterprise</span>\n <div class="tier-summary">\n <h2 class="tier-name">Ushahidi Enterprise: Multiple Deployments</h2>\n <p>Ushahidi platform capabilities, technical expertise, ongoing support, and customizations.</p>\n <p>Integrate Ushahidi across your organization or project activities by using multiple Ushahidi platform deployments.</p>\n <p class="form-heading">Contact us about Enterprise Services for your organization</p>\n\n </div>\n\n <form id="form7" name="form7" class="wufoo topLabel" accept-charset="UTF-8" autocomplete="off" enctype="multipart/form-data" method="post" novalidate="" action="https://ushah.wufoo.com/forms/pb6wq340260j75/#public">\n\n <div class="form-field">\n <label class="desc" id="title1" for="Field1">Your name <span id="req_1" class="req">*</span></label>\n <input placeholder="Your name" id="Field1" name="Field1" type="text" class="field text medium" value="" maxlength="255" tabindex="1" onkeyup="" required="">\n </div>\n\n <div class="form-field">\n <label class="desc nodisplay" id="title2" for="Field2">Your email <span id="req_2" class="req">*</span></label>\n <input placeholder="[email protected]" id="Field2" name="Field2" type="email" spellcheck="false" class="field text medium" value="" maxlength="255" tabindex="2" required="">\n </div>\n\n <div class="form-field">\n <label class="desc nodisplay" id="title3" for="Field5">Phone number <span id="req_5" class="req">*</span></label>\n <input id="Field5" class="field text medium" name="Field5" tabindex="3" onkeyup="handleInput(this);" onchange="handleInput(this);" required="" type="tel" maxlength="255" value="" style="display: block; width: 100%;">\n </div>\n\n <div class="form-field">\n <label class="desc nodisplay" id="title3" for="Field3">Your organization</label>\n <input placeholder="Your organization" id="Field3" name="Field3" type="text" class="field text medium" value="" maxlength="255" tabindex="3" onkeyup="">\n </div>\n\n <div class="form-field">\n <button id="saveForm" name="saveForm" class="button btTxt submit" type="submit" onclick="ga(\'send\',\'event\',\'links\',\'contact\', \'plan-solutions\',1);">Continue</button>\n </div>\n\n <div class="nodisplay">\n <label for="comment">Do Not Fill This Out</label>\n <textarea name="comment" id="comment" rows="1" cols="1"></textarea>\n <input type="hidden" id="idstamp" name="idstamp" value="zkhl5vdgevIPMx9QV0j5WIpon8aq8lW5GuXOYyAWb/k=">\n </div>\n </form>\n\n <div class="tier-features">\n <div class="tier-feature">\n <strong class="tier-price">Base Pricing</strong>\n <p class="small">(5 Deployments)</p>\n <p class="small">*contact us for pricing for 10, 25, or custom deployment packages</p>\n <h3 class="tier-heading">\n Set-up\n <br>\n $50,000+\n <br><br>\n 5 Remote Trainings\n <br>\n $6,000+\n <br><br>\n Software, Hosting & Maintenance\n <br>\n $2000+/month\n <br><br>\n Ongoing Technical Support\n <br>\n $3,000+/month\n <br><br>\n <p class="small">*pricing modified based upon circumstances and customizations</p>\n </h3>\n </div>\n </div>\n\n <div class="show-on-mobile">\n <div class="tier-features">\n <div class="tier-feature">\n <h3 class="tier-heading">$2000+/month for Software, Hosting, and Maintenance</h3>\n <p class="small">*subject to increase with customizations</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">All of Ushahidi Basic + Unlimited admins. SMS targeted surveys. Automated sorting capabilities.</h3>\n <a href="#5355">Find out more about data collection</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">5 Deployments</h3>\n <p class="small">*contact us for pricing for 10, 25, or custom deployment packages</p>\n <a href="#5348">What’s a deployment?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Unlimited admins</h3>\n <a href="#5349">What’s an admin?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Unlimited posts</h3>\n <a href="#5352">What’s a post?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Deployments appear in Ushahidi iOS/Android App</h3>\n <a href="#5728">Learn more about our app</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Crowdsourced surveys</h3>\n <a href="#5350">What’s a crowdsourced survey?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Access to targeted surveys and the ability to gather and upload contacts and send multi-question SMS surveys. Contact for pricing based on country location and survey sizes</h3>\n <a href="#5351">What’s a targeted survey?</a>\n </div>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">One-time Support Services</h3>\n <a href="#5729">Find out more about one-time services</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">On-going support services</h3>\n <a href="#5730">Find out more about on-going services</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Custom feature development</h3>\n <p class="small">*contact for scoping and pricing</p>\n <a href="#5731">Find out more about custom feature development</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Collaborative Discovery Session</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Platform set-up\n <br>\n $50,000+\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Survey configuration - Contact for pricing</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Training of project administrators\n <br>\n $7500+\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Training of trainers, Training of monitors or field staff, Stakeholder Engagement Toolkit, White Labeling, Translation</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Ongoing technical support account manager\n <br>\n $3000+/month\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Long-term embedded Ushahidi platform administrator(s)</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Long-term embedded Ushahidi platform community engagement officer(s)</h3>\n <p class="small">*contact for pricing</p>\n </div>\n </div>\n </div>\n </div>\n\n <div class="tiers hide-on-mobile" role="article">\n\n <div class="tier-label">Platform Technology</div>\n\n <div class="tier">\n <div class="tier-features">\n <div class="tier-feature">\n <h3 class="tier-heading">Free Software, Hosting, and Maintenance</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Embeddable web form, email, SMSsync, data collection online/offline iOS and Android App. Map and Timeline data visualization <br> Roles/Permissions. Email, SMS, Twitter. Private Deployments. Analytics Visualization Page. Import/Export Data.</h3>\n <a href="#5355">Find out more about data collection</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">1 Deployment</h3>\n <a href="#5348">What’s a deployment?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">25 admins and/or custom roles</h3>\n <a href="#5349">What’s an admin?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">25 posts maximum</h3>\n <a href="#5352">What’s a post?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Deployments appear in Ushahidi iOS/Android App</h3>\n <a href="#5728">Learn more about our app</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Crowdsourced surveys</h3>\n <a href="#5350">What’s a crowdsourced survey?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">No targeted surveys</h3>\n <a href="#5351">What’s a targeted survey?</a>\n </div>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-features">\n <div class="tier-feature">\n <h3 class="tier-heading">$499/month for Software, Hosting, and Maintenance</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Embeddable web form, email, SMSsync, data collection online/offline iOS and Android App. Map and Timeline data visualization <br> Roles/Permissions. Email, SMS, Twitter. Private Deployments. Analytics Visualization Page. Import/Export Data.</h3>\n <a href="#5355">Find out more about data collection</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">1 Deployment</h3>\n <a href="#5348">What’s a deployment?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">25 admins and/or custom roles</h3>\n <a href="#5349">What’s an admin?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Unlimited posts</h3>\n <a href="#5352">What’s a post?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Deployments appear in Ushahidi iOS/Android App</h3>\n <a href="#5728">Learn more about our app</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Crowdsourced surveys</h3>\n <a href="#5350">What’s a crowdsourced survey?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">No targeted surveys</h3>\n <a href="#5351">What’s a targeted survey?</a>\n </div>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-features">\n <div class="tier-feature">\n <h3 class="tier-heading">$999+/month for Software, Hosting, and Maintenance</h3>\n <p class="small">*subject to increase with customizations</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">All of Ushahidi Basic + 25 admins. SMS targeted surveys. Automated sorting capabilities.</h3>\n <a href="#5355">Find out more about data collection</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">1 Deployment</h3>\n <a href="#5348">What’s a deployment?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">25 admins and/or custom roles</h3>\n <a href="#5349">What’s an admin?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Unlimited posts</h3>\n <a href="#5352">What’s a post?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Deployments appear in Ushahidi iOS/Android App</h3>\n <a href="#5728">Learn more about our app</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Crowdsourced surveys</h3>\n <a href="#5350">What’s a crowdsourced survey?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Access to targeted surveys and the ability to gather and upload contacts and send multi-question SMS surveys. Contact for pricing based on country location and survey sizes</h3>\n <a href="#5351">What’s a targeted survey?</a>\n </div>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-features">\n <div class="tier-feature">\n <h3 class="tier-heading">$2000+/month for Software, Hosting, and Maintenance</h3>\n <p class="small">*subject to increase with customizations</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">All of Ushahidi Basic + Unlimited admins. SMS targeted surveys. Automated sorting capabilities.</h3>\n <a href="#5355">Find out more about data collection</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">5 Deployments</h3>\n <p class="small">*contact us for pricing for 10, 25, or custom deployment packages</p>\n <a href="#5348">What’s a deployment?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Unlimited admins</h3>\n <a href="#5349">What’s an admin?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Unlimited posts</h3>\n <a href="#5352">What’s a post?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Deployments appear in Ushahidi iOS/Android App</h3>\n <a href="#5728">Learn more about our app</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Crowdsourced surveys</h3>\n <a href="#5350">What’s a crowdsourced survey?</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Access to targeted surveys and the ability to gather and upload contacts and send multi-question SMS surveys. Contact for pricing based on country location and survey sizes</h3>\n <a href="#5351">What’s a targeted survey?</a>\n </div>\n </div>\n </div>\n\n <div class="tier-label">Cataloug of Services</div>\n\n <div class="tier-label blank">One-time Support Services</div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">One-time Support Services not available for demo</h3>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">One-time Support Services not available for basic</h3>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">One-time Support Services</h3>\n <a href="#5729">Find out more about one-time services</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Collaborative Discovery Session</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Platform set-up\n <br>\n $15,000+\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Survey configuration - Contact for pricing</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Training of project administrators\n <br>\n $1500+\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Training of trainers, Training of monitors or field staff, Stakeholder Engagement Toolkit, White Labeling, Translation</h3>\n <p class="small">*contact for pricing</p>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">One-time Support Services</h3>\n <a href="#5729">Find out more about one-time services</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Collaborative Discovery Session</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Platform set-up\n <br>\n $50,000+\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Survey configuration - Contact for pricing</h3>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Training of project administrators\n <br>\n $7500+\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Training of trainers, Training of monitors or field staff, Stakeholder Engagement Toolkit, White Labeling, Translation</h3>\n <p class="small">*contact for pricing</p>\n </div>\n </div>\n\n <div class="tier-label blank">Ongoing support services</div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">Ongoing support services not available for demo</h3>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">Ongoing support services not available for demo</h3>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">Ongoing support services</h3>\n <a href="#5730">Find out more about ongoing services</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Ongoing technical support account manager\n <br>\n $1500+/month\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Long-term embedded Ushahidi platform administrator(s)</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Long-term embedded Ushahidi platform community engagement officer(s)</h3>\n <p class="small">*contact for pricing</p>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">Ongoing support services</h3>\n <a href="#5730">Find out more about ongoing services</a>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">\n Ongoing technical support account manager\n <br>\n $3000+/month\n </h3>\n <p class="small">*required for base Enterprise Partnership</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Long-term embedded Ushahidi platform administrator(s)</h3>\n <p class="small">*contact for pricing</p>\n </div>\n\n <div class="tier-feature">\n <h3 class="tier-heading">Long-term embedded Ushahidi platform community engagement officer(s)</h3>\n <p class="small">*contact for pricing</p>\n </div>\n </div>\n\n <div class="tier-label blank">Custom feature development</div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">Custom feature development not available for demo</h3>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">Custom feature development not available for basic</h3>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">Custom feature development</h3>\n <p class="small">*contact for scoping and pricing</p>\n <a href="#5731">Find out more about custom feature development</a>\n </div>\n </div>\n\n <div class="tier">\n <div class="tier-feature">\n <h3 class="tier-heading">Custom feature development</h3>\n <p class="small">*contact for scoping and pricing</p>\n <a href="#5731">Find out more about custom feature development</a>\n </div>\n </div>\n </div>\n </div>\n\n <section>\n <div class="wrapper">\n <div class="case-studies-group">\n <div class="case-studies-item">\n <h2 class="section-heading">Grassroots projects</h2>\n <p><em>Apply for a free Basic plan</em></p>\n <p>Small non profits and grassroots organizations that are aligned with Ushahidi\'s mission and can demonstrate a yearly operating budget of less than $250k USD per year are invited to apply for a free Basic plan.</p>\n <p>You can still try out Ushahidi platform by signing up for the free Ushahidi Demo version.</p>\n <a href="pricing/apply-for-free" class="button" onclick="ga(\'send\',\'event\',\'links\',\'select\',\'social impact\',1);">Continue</a>\n </div>\n\n <div class="case-studies-item">\n <h2 class="section-heading">Ushahidi code</h2>\n <p><em>Self-host & customize Ushahidi on your own</em></p>\n <p>Ushahidi is an open source product, meaning that all the code that runs it is available for all admins to download and modify. If you\'d like to download Ushahidi, customize it, and host it on your own servers, it is available on GitHub.</p>\n <a href="https://ushah.wufoo.com/forms/make-ushahidi-even-better/" class="button" onclick="ga(\'send\',\'event\',\'links\',\'download\', \'ushahidi\',1);">Continue</a>\n </div>\n\n <div class="case-studies-item">\n <h2 class="section-heading">International Development, Humanitarian, University or Research Organization</h2>\n <p><em>On Enterprise a catalogue of technical services is on offer</em></p>\n <p>We can assist with the technical set-up, survey design, a variety of targeted trainings, metrics and analysis, programmatic management, ongoing technical support, and custom feature development. We want you to be able to focus on your project goals and impact and let us stress about the technology.</p>\n <a href="enterprise-partnerships" class="button">Continue</a>\n </div>\n\n <div class="case-studies-item">\n <h2 class="section-heading">Foundation or Potential Funder</h2>\n <p><em>We have loads of ideas for how to improve the Ushahidi platform - so let’s talk!</em></p>\n <p>From incorporating machine learning, automation, and new data sources, to making the platform more secure in high-risk situations and reaching last-mile users - we’re constantly working to improve our core services and functionality.</p>\n <p>We’re also always seeking core funding for sustainability from organizations who believe in our mission and impact.</p>\n <a href="impact-report" class="button">Continue</a>\n </div>\n </div>\n </div>\n </section>\n\n <section class="section-faq">\n <h1 class="section-title">Frequently asked questions</h1>\n <div class="wrapper">\n <div class="faq-grid">\n <div id="5727" class="faq">\n <h3>How is Ushahidi funded?</h3>\n <p class="small lt-color"></p><p>Ushahidi is a nonprofit, open source, software as a service (SaaS) organization, but we operate as a social enterprise. We are both grant funded and revenue generating.\n </p><p>We build and sell a replicable, scalable, and sustainable software platform called Ushahidi. (And a new emergency management check-in product called TenFour) to both grassroots organizations and international development and humanitarian agencies, but also make the code base to the Ushahidi platform available open source.\n </p><p></p>\n </div>\n <div id="5348" class="faq">\n <h3>What is a deployment?</h3>\n <p class="small lt-color"></p><p>A deployment is an instance of the Ushahidi platform for your particular project.</p><p></p>\n </div>\n <div id="5349" class="faq">\n <h3>What’s an project admin?</h3>\n <p class="small lt-color"></p><p>An project admin is someone on your team who will manage and run your deployment by logging into the deployment to view and manage unpublished reports, create custom user roles, and edit deployment settings. You may have multiple admins on you staff to run your deployment.</p><p></p>\n </div>\n <div id="5350" class="faq">\n <h3>What’s a crowdsourced survey?</h3>\n <p class="small lt-color"></p><p>A crowdsourced survey is a customizable set of questions available for anyone to answer on the platform that, when completed, creates a post accessible on the timeline and map pages. Multiple crowdsourced surveys with different sets of questions can be configured on the same deployment, allowing you to collect and compare different types of information.</p><p></p>\n </div>\n <div id="5351" class="faq">\n <h3>What’s a targeted survey?</h3>\n <p class="small lt-color"></p><p>A targeted survey is set of questions that can be drafted within the Ushahidi platform and sent to a pre populated list of phone numbers. You can therefore send a survey to your beneficiaries, stakeholders, or field staff (who you have the cell phone numbers for) in order to collect and analyze their answers to targeted questions as part of your project. Currently targeted surveys are available on the Ushahidi platform via SMS only.</p><p></p>\n </div>\n <div id="5352" class="faq">\n <h3>What’s a post?</h3>\n <p class="small lt-color"></p><p>Posts come in two forms: crowdsourced and targeted. A crowdsourced post is a piece of unstructured or semistructured data from a public author via any enabled data source such as web form, mobile application, email, Twitter, or SMS. A targeted post is a piece of unstructured or semistructured data from a particular author, such as the recipient of a targeted SMS survey.</p><p></p>\n </div>\n <div id="5353" class="faq">\n <h3>Is there a limit to the number of crowdsourced survey responses I can receive?</h3>\n <p class="small lt-color"></p><p>There is no limit to the number of people or posts via the Ushahidi Basic self service plan, an Enterprise Partnership, or a Grassroots Social Impact License! There is a limit of 25 posts for the Ushahidi Demo self service plan.</p><p></p>\n </div>\n <div id="5728" class="faq">\n <h3>What’s the Ushahidi mobile app?</h3>\n <p class="small lt-color"></p><p>The Ushahidi mobile app is available via iOS or Android. It allows users to search for deployment, add a deployment, respond to a survey, and view other posts on a deployment.</p><p></p>\n </div>\n <div id="5354" class="faq">\n <h3>Does the self service Ushahidi Demo plan have a time limit?</h3>\n <p class="small lt-color"></p><p>Yes, the Ushahidi Demo self service plan can be used for 1 month.</p><p></p>\n </div>\n <div id="5355" class="faq">\n <h3>What are data sources: embeddable web form, app, email, Twitter, and SMS?</h3>\n <p class="small lt-color"></p><p>Data collection sources are the different channels that can be used to gather crowdsourced reports in a deployment. We currently enable posts to be completed via embeddable web forms, a native Android and iOS app, Twitter, email, and SMS. SMSsync, Twilio, and Nexmo are SMS gateways that can be configured to transfer inbound messages to a deployment. </p><p></p>\n </div>\n <div id="5723" class="faq">\n <h3>Are the costs to send and receive SMS messages included in the price of the Ushahidi platform?</h3>\n <p class="small lt-color"></p><p>No, the cost to send and receive SMS messages is not included in the price of the Ushahidi platform. Our team will help you to set up an account with one of our supported SMS gateways and the cost will be paid through them.</p><p></p>\n </div>\n <div id="5724" class="faq">\n <h3>What does “Import and Export data” mean?</h3>\n <p class="small lt-color"></p><p>Data can be uploaded to or downloaded from an Ushahidi platform deployment via CSV file. Existing data sets can be uploaded to a deployment in bulk, and data can be downloaded from the deployment either in full or based on a specific filter criteria.</p><p></p>\n </div>\n <div id="5725" class="faq">\n <h3>What are roles and permissions?</h3>\n <p class="small lt-color"></p><p>Roles and permissions allow you to assign your registered admins on your team different levels of access to the deployment data and settings. An admin can have permissions to five different controls: Manage Users, Manage Posts, Manage Settings, Bulk Data Import, Edit their own posts. For example, some may be granted view-only rights to unpublished posts, while others may have edit rights, and still others may have the ability to change settings such as data sources or survey questions.</p><p></p>\n </div>\n <div id="5726" class="faq">\n <h3>What are private deployments?</h3>\n <p class="small lt-color"></p><p>Private deployments require a registered user to login before accessing any of the deployment data. Therefore your deployment could be made private within you team or organization.</p><p></p>\n </div>\n <div id="5729" class="faq">\n <h3>What are One-time services?</h3>\n <p class="small lt-color"></p><p>Ushahidi provides a catalogue of services and expertise available via enterprise partnership in order to support our partners in the use of the Ushahidi platform. One-time services available include platform setup, a variety of virtual or in person trainings, survey configuration support, and others. We want you to focus on your project goals and impact. Our team will worry about the technology.</p><p></p>\n </div>\n <div id="5730" class="faq">\n <h3>What are On-going services?</h3>\n <p class="small lt-color"></p><p>Ushahidi provides a catalogue of services and expertise available via enterprise partnership in order to support our partners in the use of the Ushahidi platform. On-going services include platform hosting and maintenance, technical support, and others. We want you to focus on your project goals and impact. Our team will worry about the technology.</p><p></p>\n </div>\n <div id="5731" class="faq">\n <h3>What is Custom feature development?</h3>\n <p class="small lt-color"></p><p>Ushahidi can scope out and provide a budget for customizations to the existing Ushahidi platform if desired by Enterprise partners. These customizations can include new features, new data sources, additionally language capabilities, and other requests or features.</p><p></p>\n </div>\n </div>\n </div>\n </section>\n </main>\n</div>\n'},,,function(e,t,n){}]));
//# sourceMappingURL=app.7b9f5a9d833c267bb2a3.js.map