"))}).promise()}}}),define("durandal/viewLocator",["durandal/system","durandal/viewEngine"],function(o,a){return{useConvention:function(e,t,n){e=e||"viewmodels",t=t||"views",n=n||t;var r=new RegExp((e+"").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1"),"gi");this.convertModuleIdToViewId=function(e){return e.replace(r,t)},this.translateViewIdToArea=function(e,t){return t&&"partial"!=t?n+"/"+t+"/"+e:n+"/"+e}},locateViewForObject:function(e,t,n){var r,i;return e.getView&&(r=e.getView())?this.locateView(r,t,n):e.viewUrl?this.locateView(e.viewUrl,t,n):(i=o.getModuleId(e))?this.locateView(this.convertModuleIdToViewId(i),t,n):this.locateView(this.determineFallbackViewId(e),t,n)},convertModuleIdToViewId:function(e){return e},determineFallbackViewId:function(e){var t=/function (.{1,})\(/.exec(e.constructor.toString());return"views/"+(t&&1{for(var n=0;n{setTimeout(function(){u.deactivateItem(e,o).then(function(){n++,a.remove(e),n==r&&t.resolve()})},1)})(e[i])}).promise():t()},u},u},isActivator:function(e){return e&&e.__activator__}}}),define("durandal/composition",["durandal/system","durandal/viewLocator","durandal/binder","durandal/viewEngine","durandal/activator","jquery","knockout"],function(d,o,l,c,a,s,u){var p={},m="data-active-view",f=[],h=0,v="durandal-composition-data",g=["model","view","transition","area","strategy","activationData","onError"],n="durandal-visibility-data",y=["compose:"];function b(e,t,n){try{if(e.onError)try{e.onError(t,n)}catch(e){d.error(e)}else d.error(t)}finally{C(e,n,!0)}}function C(t,n,e){var r;0===--h&&(r=f,f=[],e||setTimeout(function(){for(var e=r.length;e--;)try{r[e]()}catch(e){b(t,e,n)}},1)),delete t.activeView}function T(t,n){if((t=this).activeView&&t.activeView.removeAttribute(m),t.child)try{t.model&&t.model.attached&&(t.composingNewView||t.alwaysTriggerAttach)&&t.model.attached(t.child,t.parent,t),t.attached&&t.attached(t.child,t.parent,t),t.child.setAttribute(m,!0),t.composingNewView&&t.model&&t.model.detached&&u.utils.domNodeDisposal.addDisposeCallback(t.child,function(){try{t.model.detached(t.child,t.parent,t)}catch(e){b(t,e,n)}})}catch(e){b(t,e,n)}t.triggerAttach=d.noop}function w(e){for(var t=0,n=e.length,r=[];t{var t=e.getAttribute("data-bind");if(t)for(var n=0,r=y.length;n{if(d.isString(e.transition)){if(e.activeView){if(e.activeView==e.child)return;if(!e.child)return 1;if(e.skipTransitionOnSameViewId)return e.activeView.getAttribute("data-view")!=e.child.getAttribute("data-view")}return 1}})(t)?(r=this.convertTransitionToModuleId(t.transition),d.acquire(r).then(function(e){(t.transition=e)(t).then(function(){var e;t.cacheViews?t.activeView&&((e=l.getBindingInstruction(t.activeView))&&null!=e.cacheViews&&!e.cacheViews?u.removeNode(t.activeView):S(t.activeView)):t.child?i(t):u.virtualElements.emptyNode(t.parent),t.child&&A(t.child),t.triggerAttach(t,n),C(t,n)})}).fail(function(e){b(t,"Failed to load transition ("+r+"). Details: "+e.message,n)})):(t.child!=t.activeView&&(t.cacheViews&&t.activeView&&(!(e=l.getBindingInstruction(t.activeView))||null!=e.cacheViews&&!e.cacheViews?u.removeNode(t.activeView):S(t.activeView)),t.child?(t.cacheViews||i(t),A(t.child)):t.cacheViews||u.virtualElements.emptyNode(t.parent)),t.triggerAttach(t,n),C(t,n)):(t.cacheViews||u.virtualElements.emptyNode(t.parent),t.triggerAttach(t,n),C(t,n))},bindAndShow:function(t,n,r,e){r.child=t,(r.parent.__composition_context=r).composingNewView=!r.cacheViews||-1==u.utils.arrayIndexOf(r.viewElements,t);var i,o=r,a=function(){if(r.parent.__composition_context==r){if(delete r.parent.__composition_context,r.binding&&r.binding(r.child,r.parent,r),r.preserveContext&&r.bindingContext)r.composingNewView&&(r.parts&&I(r),S(t),u.virtualElements.prepend(r.parent,t),l.bindContext(r.bindingContext,t,r.model,r.as));else if(t){var e=r.model||p;if(u.dataFor(t)!=e){if(!r.composingNewView)return u.removeNode(t),void c.createView(t.getAttribute("data-view")).then(function(e){x.bindAndShow(e,n,r,!0)});r.parts&&I(r),S(t),u.virtualElements.prepend(r.parent,t),l.bind(e,t)}}x.finalize(r,n)}else C(r,n)},s=n;if(e)a();else if(o.activate&&o.model&&o.model.activate)try{(i=d.isArray(o.activationData)?o.model.activate.apply(o.model,o.activationData):o.model.activate(o.activationData))&&i.then?i.then(a,function(e){b(o,e,s),a()}):i||void 0===i?a():C(o,s)}catch(e){b(o,e,s)}else a()},defaultStrategy:function(e){return o.locateViewForObject(e.model,e.area,e.viewElements)},getSettings:function(e,t){var n,r=e(),i=u.utils.unwrapObservable(r)||{},o=a.isActivator(r);if(d.isString(i))return i=c.isViewUrl(i)?{view:i}:{model:i,activate:!o};if(d.getModuleId(i))return i={model:i,activate:!o};for(n in!o&&i.model&&(o=a.isActivator(i.model)),i)-1!=u.utils.arrayIndexOf(g,n)?i[n]=u.utils.unwrapObservable(i[n]):i[n]=i[n];return o?i.activate=!1:void 0===i.activate&&(i.activate=!0),i},executeStrategy:function(t,n){t.strategy(t).then(function(e){x.bindAndShow(e,n,t)})},inject:function(t,n){t.model?t.view?o.locateView(t.view,t.area,t.viewElements).then(function(e){x.bindAndShow(e,n,t)}):(t.strategy||(t.strategy=this.defaultStrategy),d.isString(t.strategy)?d.acquire(t.strategy).then(function(e){t.strategy=e,x.executeStrategy(t,n)}).fail(function(e){b(t,"Failed to load view strategy ("+t.strategy+"). Details: "+e.message,n)}):this.executeStrategy(t,n)):this.bindAndShow(null,n,t)},compose:function(t,n,e,r){h++,(n=r?n:x.getSettings(function(){return n},t)).compositionComplete&&f.push(function(){n.compositionComplete(n.child,n.parent,n)}),f.push(function(){n.composingNewView&&n.model&&n.model.compositionComplete&&n.model.compositionComplete(n.child,n.parent,n)});var i=(e=>{for(var t=[],n={childElements:t,activeView:null},r=u.virtualElements.firstChild(e);r;)1==r.nodeType&&(t.push(r),r.getAttribute(m))&&(n.activeView=r),r=u.virtualElements.nextSibling(r);return n.activeView||(n.activeView=t[0]),n})(t);n.activeView=i.activeView,n.parent=t,n.triggerAttach=T,n.bindingContext=e,n.cacheViews&&!n.viewElements&&(n.viewElements=i.childElements),n.model?d.isString(n.model)?d.acquire(n.model).then(function(e){n.model=d.resolveObject(e),x.inject(n,t)}).fail(function(e){b(n,"Failed to load composed module ("+n.model+"). Details: "+e.message,t)}):x.inject(n,t):n.view?(n.area=n.area||"partial",n.preserveContext=!0,o.locateView(n.view,n.area,n.viewElements).then(function(e){x.bindAndShow(e,t,n)})):this.bindAndShow(null,t,n)}};return u.bindingHandlers.compose={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t,n,r,i){var o,a,s=x.getSettings(t,e);s.mode&&((a=u.utils.domData.get(e,v))||(o=u.virtualElements.childNodes(e),a={},"inline"===s.mode?a.view=c.ensureSingleElement(o):"templated"===s.mode&&(a.parts=w(o)),u.virtualElements.emptyNode(e),u.utils.domData.set(e,v,a)),"inline"===s.mode?s.view=a.view.cloneNode(!0):"templated"===s.mode&&(s.parts=a.parts),s.preserveContext=!0),x.compose(e,s,i,!0)}},u.virtualElements.allowedBindings.compose=!0,x}),define("durandal/events",["durandal/system"],function(s){function t(){}function o(e,t){this.owner=e,this.events=t}var l=/\s+/;return o.prototype.on=o.prototype.then=function(e,t){return this.callback=e||this.callback,this.context=t||this.context,this.callback&&this.owner.on(this.events,this.callback,this.context),this},o.prototype.off=function(){return this.owner.off(this.events,this.callback,this.context),this},t.prototype.on=function(e,t,n){var r,i;if(t){for(r=this.callbacks||(this.callbacks={}),e=e.split(l);i=e.shift();)(r[i]||(r[i]=[])).push(t,n);return this}return new o(this,e)},t.prototype.off=function(e,t,n){var r,i,o,a;if(i=this.callbacks)if(e||t||n)for(e=e?e.split(l):s.keys(i);r=e.shift();)if((o=i[r])&&(t||n))for(a=o.length-2;0<=a;a-=2)t&&o[a]!==t||n&&o[a+1]!==n||o.splice(a,2);else delete i[r];else delete this.callbacks;return this},t.prototype.trigger=function(e){var t,n,r,i,o,a,s,d;if(n=this.callbacks){for(d=[],e=e.split(l),i=1,o=arguments.length;i').hide().appendTo("body")[0].contentWindow,u.navigate(t,!1)),u._hasPushState?s(window).on("popstate",u.checkUrl):u._wantsHashChange&&"onhashchange"in window&&!r?s(window).on("hashchange",u.checkUrl):u._wantsHashChange&&(u._checkUrlInterval=setInterval(u.checkUrl,u.interval)),u.fragment=t,u.location),o=i.pathname.replace(/[^\/]$/,"$&/")===u.root;if(u._wantsHashChange&&u._wantsPushState){if(!u._hasPushState&&!o)return u.fragment=u.getFragment(null,!0),u.location.replace(u.root+u.location.search+"#"+u.fragment),!0;u._hasPushState&&o&&i.hash&&(this.fragment=u.getHash().replace(d,""),this.history.replaceState({},document.title,u.root+u.fragment+i.search))}if(!u.options.silent)return u.loadUrl(e.startRoute)},u.deactivate=function(){s(window).off("popstate",u.checkUrl).off("hashchange",u.checkUrl),clearInterval(u._checkUrlInterval),u.active=!1},u.checkUrl=function(){var e=u.getFragment();if((e=e===u.fragment&&u.iframe?u.getFragment(u.getHash(u.iframe)):e)===u.fragment)return!1;u.iframe&&u.navigate(e,!1),u.loadUrl()},u.loadUrl=function(e){var t=u.fragment=u.getFragment(e);return!!u.options.routeHandler&&u.options.routeHandler(t)},u.navigate=function(e,t){if(!u.active)return!1;if(void 0===t?t={trigger:!0}:a.isBoolean(t)&&(t={trigger:t}),e=u.getFragment(e||""),u.fragment!==e){u.fragment=e;var n=u.root+e;if(""===e&&"/"!==n&&(n=n.slice(0,-1)),u._hasPushState)u.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!u._wantsHashChange)return u.location.assign(n);i(u.location,e,t.replace),u.iframe&&e!==u.getFragment(u.getHash(u.iframe))&&(t.replace||u.iframe.document.open().close(),i(u.iframe.location,e,t.replace))}return t.trigger?u.loadUrl(e):void 0}},u.navigateBack=function(){u.history.back()},u}),define("plugins/router",["durandal/system","durandal/app","durandal/activator","durandal/events","durandal/composition","plugins/history","knockout","jquery"],function(C,T,w,e,s,I,S,a){var A,t=/\((.*?)\)/g,x=/(\(\?)?:\w+/g,n=/\*\w+/g,r=/[\-{}\[\]+?.,\\\^$|#\s]/g,R=/\/$/,i=!1,D="/",E="/";function k(e){return e=e.replace(r,"\\$&").replace(t,"(?:$1)?").replace(x,function(e,t){return t?e:"([^/]+)"}).replace(n,"(.*?)"),new RegExp("^"+e+"$",i?void 0:"i")}function M(e){var t=e.indexOf(":"),n=0 Close this window and continue using the selected ABN.",confirmAbn:"After changing to a different Australian Business Number (ABN), you will not be able to access the other tabs or windows you currently have open. Are you sure you want to change entity?",confirmRan:"After changing to a different registered agent number(RAN), you will not be able to access the other tabs or windows you currently have open. Are you sure you want to change the RAN?",confirmForeignInvestor:"After changing to a different foreign investor, you will not be able to access the other tabs or windows you currently have open. Are you sure you want to change investor?",forbidden:"You don't have permission to access this page using the credentials you supplied.",foreignInvestorChanged:"Your foreign investor selection has changed since you last accessed this tab or window. Close this window and continue.",logout:"Logging out of your current window will log you out of all other open tabs and windows. Are you sure you want to logout?",loggedOut:"You have logged out since you last accessed this tab or window. Your session has ended. You may close this tab or window.",ranChanged:"Your registered agent number(RAN) has changed since you last accessed this tab or window. Close this window and continue using the selected RAN.",sessionUsurped:"Another session has been opened. Click the button below to log in again.",sessionExpired:"Your session has timed out. To retain the information you have already completed, keep this browser open and login again.",sessionExpiredIndividual:"Your session has timed out. To ensure the security of your personal information you will need to log in again. Do not close your browser.
You will not lose the information you have already completed."),n=a()||o()?e.observable("Session time out"):e.observable("Time Out");function o(){return t.isBusiness()}function a(){return t.isAgent()}function s(){return t.isForeignInvestor()}function d(){return t.isNonResident()}function l(e){void 0===e&&(r(!1),void 0!==$.unblockUI)&&$.unblockUI();var t=$("#modal_ReAuth");return t.length||setTimeout(function(){l()},1e3),t.modal(e)}return{Modal:l,SuccessEvent:r,modalTitle:n,modalMessage:i,ReauthButtonClicked:function(){var t=((e,t,n,r)=>{var i=0,o=0;void 0!==window.screenLeft?(i=window.screenLeft,o=window.screenTop):void 0!==window.screenX&&(i=window.screenX,o=window.screenY);var a,s={toolbar:"no",location:"no",directories:"no",left:i+($(window).width()-t)/2,top:o+($(window).height()-n)/2,status:"yes",menubar:"no",scrollbars:"yes",resizable:"no",width:t,height:n},d=[];for(a in s)d.push(a+"="+s[a]);var l=d.join(","),c=window.open(e,r,l);return c&&c.focus(),c})(a()?"/OnlineServices/Reauthenticate":o()?"/Business/Reauthenticate":s()?"/ForeignInvestor/Reauthenticate":d()?"/Non-Resident/Reauthenticate":"/Individual/Reauthenticate",600,600,"ReauthenticateAtoOnline"),n=setInterval(function(){i("There was no response for reauthentication. Please relogin")},3e5);window.addEventListener("message",function(e){"Reauthentication complete"===e.data&&(t.close(),l("hide"),clearInterval(n),r(!0))},!1)}}}),define("framework/components/ProcessMessageMapper",["require","./Logger"],function(e){var n=e("./Logger"),t={ERROR:1,WARNING:2,INFORMATION:3,SUCCESS:4},r={mappings:a};function i(e){switch(e){case"1":case"E":return t.ERROR;case"2":case"W":return t.WARNING;case"3":case"I":return t.INFORMATION;case"4":case"S":return t.SUCCESS;default:throw new Error("Message severity "+e+" is not valid.")}}function o(e){e&&e instanceof Array&&e.forEach(function(e){e.severity&&(e.severity=i(e.severity));var t=a[e.id];t?(e.message=t.description,t.severity&&(e.severity=i(t.severity))):n.logError("Unable to find mapping for ProcessMessage.","ProcessMessageMapper",e)})}var a={0:{description:"The operation completed successfully.",severity:"S"},1:{description:"The operation completed successfully.",severity:"S"},40:{description:"Lower IP - Not high enough",severity:"E"},41:{description:"Higher IP - Upgraded the user to a higher level",severity:"S"},42:{description:"Disabled for ATO Online",severity:"E"},89:{description:"Form cannot be submitted as a field contains a % symbol without a following space or an invalid character. If you are unable to resolve this error contact usOpens in a new window.",severity:"E"},666:{description:"The Other Previous Name must be at most 40 characters long. Coming from the server",severity:"E"},10112:{description:"There are no suspended tasks for the user who's currently logged on.",severity:"E"},11020:{description:"The ABN is invalid. Enter a valid superannuation ABN using numbers only.",severity:"E"},11065:{description:"This account does not exist for this client.",severity:"E"},12065:{description:"No accounts found\n You do not currently have an active income tax account.\n If you believe you do have an active income tax account, contact us on 13 28 61 between 8:00am and 6:00pm Monday to Friday to speak to a customer service representative. Have three pieces of information ready to establish your identity.",severity:"E"},14073:{description:"No lodgment",severity:"E"},14160:{description:"Multiple rows returned.",severity:"E"},18003:{description:"Your changes did not work due to a recent update. Check your details and try again if necessary.",severity:"E"},20001:{description:"Phone number must be in the format (999)999-9999",severity:"E"},20002:{description:"Name is a required field (test)",severity:"E"},20003:{description:"Name must be less than 10 characters",severity:"E"},20004:{description:"Must be 18 years or older",severity:"E"},20005:{description:"Start Number must be less than End Number",severity:"E"},22152:{description:"No linked clients found.",severity:"I"},25262:{description:"You must provide an account number",severity:"E"},25264:{description:"You must provide an account name",severity:"E"},30001:{description:"We cannot provide this information as we cannot access the date of birth record we hold for you.\n Try again later.",severity:"E"},39994:{description:"Lodgment cycle not populated",severity:"E"},40001:{description:"We cannot assist with a transfer request to your chosen destination fund.\n If you want to transfer to this fund, print and complete a ‘Request to transfer whole balance of superannuation benefits between funds’ form.\n Alternatively you can choose a different fund to transfer.",severity:"E"},40002:{description:"External Id is populated and Id Type is not populated.",severity:"E"},40003:{description:"External Id Type is populated and Id is not populated.",severity:"E"},40006:{description:"Select a state/territory from the list",severity:"E"},40008:{description:"Other country is not a valid country.",severity:"E"},40015:{description:"Select a state/territory from the list",severity:"E"},40016:{description:"Before you can proceed you must provide a valid address. Update your address then try again.",severity:"E"},40018:{description:"Before you can proceed you must provide a valid address. Update your address then try again.",severity:"E"},40020:{description:"Postcode must be in the range of 0200-0299, 0800-7499, and 7800-9799",severity:"E"},40024:{description:"Enter an address",severity:"E"},40025:{description:"Address appears incorrect or has an invalid character, check your details or enter new address",severity:"E"},40026:{description:"Address appears incorrect or has an invalid character, check your details or enter new address",severity:"E"},40028:{description:"Suburb appears incorrect or may contain an invalid character, review your details or enter a new suburb/town/locality",severity:"E"},40029:{description:"Select a state/territory from the list",severity:"E"},40030:{description:"Enter a postcode",severity:"E"},40032:{description:"Postcode may contain an invalid character, check your details or enter a new postcode",severity:"E"},40033:{description:"Address appears incorrect or has an invalid character, check your details or enter new address",severity:"E"},40034:{description:"Address appears incorrect or has an invalid character, check your details or enter new address",severity:"E"},40035:{description:"Address appears incorrect or has an invalid character, check your details or enter new address",severity:"E"},40036:{description:"Suburb appears incorrect or may contain an invalid character, review your details or enter a new suburb/town/locality",severity:"E"},40037:{description:"Address appears incorrect or has an invalid character, check your details or enter new address",severity:"E"},40038:{description:"Address appears incorrect or has an invalid character, check your details or enter new address",severity:"E"},40039:{description:"Postcode must be in the range of 0200-0299, 0800-7499, and 7800-9799",severity:"E"},40040:{description:"Enter an address",severity:"E"},40041:{description:"Enter an address",severity:"E"},40042:{description:"Enter an area code",severity:"E"},40043:{description:"Enter an area code",severity:"E"},40044:{description:"Enter a phone number, enter numbers or letters only",severity:"E"},40045:{description:"Enter an area code using numbers only",severity:"E"},40047:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40048:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40049:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40050:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40051:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40052:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40053:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40054:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40055:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40057:{description:"Before you can proceed you must provide a valid address. Update your address then try again.",severity:"E"},40077:{description:"Start Date must be a valid date",severity:"E"},40078:{description:"End Date must be a valid date",severity:"E"},40106:{description:"Internal Id must be a valid value.",severity:"E"},40107:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40109:{description:"Email address not valid, check your details or enter new email address",severity:"E"},40110:{description:"The same address already exists.",severity:"E"},40119:{description:"Link type does not exist.",severity:"E"},40120:{description:"Link Record not found.",severity:"I"},40198:{description:"More records exist than listed.",severity:"I"},40216:{description:"Enter an address",severity:"E"},40221:{description:"An advice is unable to be lodged for this record. If you need to complete a non-lodgment advice, phone us on 13 28 61.",severity:"E"},40292:{description:"Account Id is required when Role is populated.",severity:"E"},40296:{description:"You are not eligible to create a payment plan",severity:"E"},40510:{description:"Your financial institution BSB is required",severity:"W"},40527:{description:"The BSB does not appear to belong to a bank in Australia, enter a new BSB using numbers only",severity:"E"},40528:{description:"The account number appears incorrect or may contain an invalid character, enter numbers and letters only",severity:"E"},40529:{description:"You must provide an account number",severity:"E"},40530:{description:"The account number appears incorrect or may contain an invalid character, enter numbers and letters only",severity:"E"},40531:{description:"We cannot use the account you have provided, enter a new account. For further assistance, contact us on 13 28 61 between 8:00am and 6:00pm Monday to Friday to speak to a customer service representative. Have three pieces of information ready to establish your identity.",severity:"E"},40540:{description:"You must provide a BSB, enter numbers only",severity:"E"},40554:{description:"Client type must be a valid client type.",severity:"E"},40572:{description:"Before you can proceed you must provide a valid address. Update your address then try again.",severity:"E"},40680:{description:"An income tax return or non-lodgment advice has already been received for this year. If you believe this is not correct, phone us on 13 28 61.",severity:"E"},40716:{description:"The account name appears incorrect or may contain an invalid character, check your details or enter a new address",severity:"E"},40720:{description:"An advice is unable to be lodged for this record. If you need to complete a non-lodgment advice, phone us on 13 28 61.",severity:"E"},40721:{description:"An advice is unable to be lodged for this record. If you need to complete a non-lodgment advice, phone us on 13 28 61.",severity:"E"},40723:{description:"You selected 'other', enter a country using letters only",severity:"E"},40744:{description:"An advice is unable to be lodged for this record. If you need to complete a non-lodgment advice, phone us on 13 28 61.",severity:"E"},40746:{description:"Residential address must be a street address. Postal address needs a 'Care of' term in Address line 1 if a 'Post office' term is entered in Address line 2.",severity:"E"},40747:{description:"Residential address must be a street address",severity:"E"},40748:{description:"'Care of' cannot be used in Address line 2.",severity:"E"},40782:{description:"An advice is unable to be lodged for this record. If you need to complete a non-lodgment advice, phone us on 13 28 61.",severity:"E"},40796:{description:"The Income Tax account has no active Income Tax roles.",severity:"E"},41037:{description:"Where a Client Internal ID is provided, a Client ID or Client ID type should not be provided",severity:"E"},41083:{description:"End Date cannot be a future date",severity:"E"},41118:{description:"Input Channel Type code is invalid",severity:"E"},41144:{description:"External identifier not supplied or invalid",severity:"E"},41152:{description:"The ABN is invalid. Enter a valid superannuation ABN using numbers only.",severity:"E"},41301:{description:"Invalid Next Key.",severity:"E"},41302:{description:"Client TFN or ABN is not valid.",severity:"W"},41303:{description:"Invalid Client Category Type",severity:"E"},41304:{description:"Invalid document group code",severity:"E"},41305:{description:"You do not have authorisation to view client details. Check permission with your administrator.",severity:"E"},41306:{description:"No client identifiers input",severity:"E"},41307:{description:"Invalid client identifier combination",severity:"E"},41308:{description:"Invalid date range",severity:"E"},41309:{description:"No correspondence found for search criteria.",severity:"I"},41312:{description:"You do not have authorisation to view client details. Check permission with your administrator.",severity:"E"},47770:{description:"Enter an area code using numbers only",severity:"E"},48039:{description:"There are too many records to display.",severity:"E"},48040:{description:"There are too many records to display.",severity:"E"},48109:{description:"At least one occurrence in field array is required.",severity:"E"},50148:{description:"You are not authorised to view this client",severity:"E"},50149:{description:"You are not authorised to view the related client.",severity:"E"},59099:{description:"Unexpected Exception",severity:"E"},60154:{description:"Enter new bank account details or select another payment method",severity:"E"},60191:{description:"An active payment plan already exists for this account",severity:"E"},60208:{description:"Payment plan not found",severity:"I"},60253:{description:"You did not satisfy the criteria to make a payment arrangement online, but we still want to assist you.\n To discuss payment of your account, contact us on 13 11 42 between 8:00am and 6:00pm Monday to Friday to speak to a customer service representative. Have three pieces of information ready to establish your identity.",severity:"E"},60372:{description:"We've identified that your address is incorrect. Update your address and try again",severity:"E"},60403:{description:"You are not eligible to create a payment plan for the selected account",severity:"E"},60489:{description:"Your offer is too low. Enter a new amount and/or change the frequency",severity:"E"},60641:{description:"First instalment date is required",severity:"W"},60700:{description:"The fund ABN is invalid, select a different fund",severity:"E"},60720:{description:"You did not satisfy the criteria to make a payment arrangement online, but we still want to assist you.\n To discuss payment of your account, contact us on 13 11 42 between 8:00am and 6:00pm Monday to Friday to speak to a customer service representative. Have three pieces of information ready to establish your identity.",severity:"E"},60721:{description:"You did not satisfy the criteria to make a payment arrangement online, but we still want to assist you.\n To discuss payment of your account, contact us on 13 11 42 between 8:00am and 6:00pm Monday to Friday to speak to a customer service representative. Have three pieces of information ready to establish your identity.",severity:"E"},60726:{description:"You are not eligible to create a payment plan for the selected account",severity:"E"},60755:{description:"You are not eligible to create a payment plan",severity:"E"},60796:{description:"Date must not be a weekend or public holiday, enter a new date",severity:"E"},61125:{description:"An advice is unable to be lodged for this record. If you need to complete a non-lodgment advice, phone us on 13 28 61.",severity:"E"},67775:{description:"Phone number is incorrect, enter numbers and letters only",severity:"E"},67777:{description:"Enter a phone number, enter numbers or letters only",severity:"E"},67778:{description:"Enter a phone number, enter numbers or letters only",severity:"E"},67780:{description:"An incorrect phone number has been entered, enter numbers and letters only",severity:"E"},67781:{description:"Email address not valid, check your details or enter new email address",severity:"E"},67783:{description:"You must provide at least one phone number or an email address",severity:"E"},90320:{description:"Description of main business activity must be completed",severity:"E"},91674:{description:"Check percentage. Percentage must be greater than zero and cannot be greater than 100%",severity:"E"},91815:{description:"Enter a name using letters, hyphen, apostrophe or spaces",severity:"E"},91823:{description:"The BSB does not appear to belong to a bank in Australia, enter a new BSB using numbers only",severity:"E"},91824:{description:"Enter an address",severity:"E"},91866:{description:"There are too many records to display.",severity:"E"},91903:{description:'You have selected "other", you must enter the type of relationship',severity:"E"},91910:{description:"Phone number is incorrect, enter numbers and letters only",severity:"E"},91911:{description:"Enter an area code using numbers only",severity:"E"},91912:{description:"Phone number is incorrect, enter numbers and letters only",severity:"E"},91913:{description:"Enter an area code using numbers only",severity:"E"},91914:{description:"An incorrect phone number has been entered, enter numbers and letters only",severity:"E"},91915:{description:"An incorrect phone number has been entered, enter numbers and letters only",severity:"E"},91920:{description:"Internal or External ID must be present.",severity:"E"},91921:{description:"Instalment amount is required",severity:"W"},91922:{description:"Instalment frequency is required",severity:"W"},91923:{description:"Either overdue amount or account balance only is required",severity:"W"},91929:{description:"Enter a date between seven and 30 days in the future",severity:"E"},91927:{description:"Instalment amount exceeds the plan amount",severity:"E"},91938:{description:"You are not eligible to create a payment plan for the selected account",severity:"E"},91940:{description:"An active payment plan already exists for this account",severity:"E"},91941:{description:"You did not satisfy the criteria to make a payment arrangement online, but we still want to assist you.\n To discuss payment of your account, contact us on 13 11 42 between 8:00am and 6:00pm Monday to Friday to speak to a customer service representative. Have three pieces of information ready to establish your identity.",severity:"E"},91942:{description:"Your offer is too low. Change the amount or frequency and recalculate",severity:"E"},91946:{description:"Instalment frequency is required",severity:"W"},91947:{description:"First instalment date is required",severity:"W"},91954:{description:"Your financial institution account name is required",severity:"W"},91955:{description:"Your financial institution account number required",severity:"W"},91964:{description:"\n Before you can proceed you must provide a valid address. Update your address then try again.\n ",severity:"E"},91965:{description:"You are not eligible to create a payment plan",severity:"E"},91966:{description:"You did not satisfy the criteria to make a payment arrangement online, but we still want to assist you.\n To discuss payment of your account, contact us on 13 11 42 between 8:00am and 6:00pm Monday to Friday to speak to a customer service representative. Have three pieces of information ready to establish your identity.",severity:"E"},91995:{description:"Client identifiers do not match the same client.",severity:"E"},92024:{description:"You are not eligible to create a payment plan for the selected account",severity:"E"},92100:{description:"First instalment date is outside the allowable range",severity:"W"},92101:{description:"First instalment amount is too small",severity:"W"},92102:{description:"First instalment amount not applicable for instalment frequency",severity:"W"},92109:{description:"Registration date is not populated",severity:"E"},95167:{description:"You do not have any accounts eligible for transfer. This may be because your accounts have a pending transfer request.",severity:"E"},95168:{description:"We cannot retrieve some of your personal details (for example name, date of birth or gender), which are required to start the transfer process.\n Try again later.",severity:"E"},95169:{description:"The selected accounts cannot be the same. Change either your From account or your To account.",severity:"E"},95171:{description:"We cannot prefill details for this fund, enter fund name, fund phone number and your membership or account number to continue.\n Or choose a different destination fund.",severity:"E"},95172:{description:"The fund ABN is invalid, select a different fund",severity:"E"},95665:{description:"We cannot transfer to your chosen destination fund. Visit www.ato.gov.au for more information.\n Or choose a different destination fund.",severity:"E"},95666:{description:"We cannot transfer to your chosen destination fund. Visit www.ato.gov.au for more information.\n Or choose a different destination fund.",severity:"E"},95667:{description:"To fund has a pending transfer request",severity:"E"},96421:{description:"Response required - Will entity pay royalties or is an investment body paying",severity:"E"},96463:{description:"The main industry the entity operates must be selected",severity:"E"},96446:{description:"GST turnover must be supplied",severity:"E"},96448:{description:"GST accounting method must be supplied",severity:"E"},96449:{description:"Entity must advise if it imports goods into Australia",severity:"E"},96452:{description:"Date from which entity is eligible for fuel tax credits must be provided",severity:"E"},96453:{description:"Date of eligibility for FTC cannot be before their GST registration date or FTC commencement date",severity:"E"},96454:{description:"At least one fuel type must be selected",severity:"E"},96458:{description:"PAYG withholding commencement date can not be blank",severity:"E"},96459:{description:"The number of employees the entity estimates it will pay must be provided",severity:"E"},96460:{description:"The amount expected to be withheld from payments to employees each year must be provided",severity:"E"},96461:{description:"Entity must advise how it will provide its PAYG withholding summary annual report to the ATO",severity:"E"},96462:{description:"Entity must advise how it will provide payment summaries to its payees",severity:"E"},96465:{description:"An active LCT role already exists for the entity",severity:"E"},96466:{description:"Provide date entity will/did become involved in luxury car manufacture, wholesale, import or retail",severity:"E"},96467:{description:"At least one activity type must be selected",severity:"E"},96468:{description:"A percentage value must be provided for the entity’s main LCT activity",severity:"E"},96469:{description:"Date entity is eligible for WET cannot be prior to GST registration date or WET commencement date",severity:"E"},96470:{description:"Estimated annual luxury car tax liability must be provided",severity:"E"},96474:{description:"Date entity involved in manufacture, wholesale, import or export of alcoholic beverages required",severity:"E"},96476:{description:"A percentage value must be provided for at least one product type",severity:"E"},96481:{description:"The total percentage of all product types can not exceed 100",severity:"E"},96489:{description:"An error occurred during the account balance calculation.",severity:"E"},99992:{description:"As a former temporary resident you are unable to use this online service to withdraw or transfer your super account balances, but we still want to assist you.",severity:"E"},"002":{description:"The are one or more error(s) on the page, see below for details.",severity:"E"},"010":{description:"{0} must be an integer.",severity:"E"},"011":{description:"Your task has been successfully suspended. Please note the date and time you suspended it - {0}. This will identify your task when you resume it.",severity:"S"},14014:{description:"No transactions found for this account.",severity:"3"},14245:{description:"No transactions found for this account.",severity:"3"},92013:{description:"The account has pending transactions that may affect the final balance.",severity:"3"},"00010":{description:"An error occurred during the account balance calculation.",severity:"2"},"00001":{description:"No financial transactions exist for this account.",severity:"3"},11:{description:"An error has occurred in calculating GIC for this account.",severity:"2"},60145:{description:"An error has occurred in calculating GIC for this account.",severity:"2"},5:{description:"No financial transactions exist to estimate GIC.",severity:"3"},4:{description:"GIC does not apply for this account type.",severity:"3"},96493:{description:"GIC does not apply for this account type.",severity:"3"},40751:{description:"Input Array\tState/Territory code cannot be entered in Locality.",severity:"E"},60686:{description:"Maximum Duration for Payment Plan exceeded",severity:"E"},40686:{description:"Unexpected Exception",severity:"E"},39972:{description:"Invalid Start Date for Case creation",severity:"E"},61047:{description:"User Unauthorised to View the Account",severity:"E"},25153:{description:"A Client Id Type must be provided",severity:"E"},50059:{description:"Record Start Number not provided",severity:"E"},50007:{description:"Rows per Page not provided",severity:"E"},40189:{description:"Your transaction cannot be completed online. We apologise for any inconvenience. Refer to Troubleshooting for tax practitioners or contact us",severity:"E"},60369:{description:"Your transaction cannot be completed online. We apologise for any inconvenience. Refer to Troubleshooting for tax practitioners or contact ",severity:"E"},25181:{description:"The Date of Birth is required",severity:"E"},41046:{description:"Your transaction cannot be completed online. We apologise for any inconvenience. Refer to Troubleshooting for tax practitioners or contact us",severity:"E"},18030:{description:"User Unauthorised to View the Account",severity:"E"},40629:{description:"User Unauthorised to View the Account",severity:"E"},60526:{description:"User Unauthorised to View the Account",severity:"E"},80015:{description:"Additional information - Client is deceased",severity:"I"},80016:{description:"Additional information - Client has an ABN that is end dated.",severity:"I"},80017:{description:"Your transaction cannot be completed online. We apologise for any inconvenience. Refer to Troubleshooting for tax practitioners or contact us ",severity:"E"},80018:{description:"Client is linked to more than one TFN",severity:"E"},71714:{description:"Please check your email address. Correct if necessary, or confirm by selecting SAVE.",severity:"E"},71768:{description:"The email address provided is not valid. Please provide a valid email address before continuing.",severity:"E"},96578:{description:"Invalid BSB.",severity:"E"},96530:{description:"ABN does not exist.",severity:"E"},APE1001:{description:"No data found for client.",severity:"E"}};return{mapModel:function(e){o(e.processMessages)},map:o,severities:t,"-private":r}}),define("framework/context/CookieService",["require","../modules/ato-context.umd"],function(e){var i=e("../modules/ato-context.umd"),o={setCookie:function(e,t,n,r){i.CookieService.set(e,t,n,"Lax",!1,r)},readCookie:function(e,t){return i.CookieService.get(e,t)},removeCookie:function(e,t){i.CookieService.remove(e,t)},readObjectCookie:function(e,t){var n=o.readCookie(e,t);n=null!==n?JSON.parse(n):{};return n},updateObjectCookie:function(e,t,n,r){{var i;t&&((i=o.readObjectCookie(e,r))[t]=n,o.setCookie(e,JSON.stringify(i),0,r))}},haveCookies:function(){return 0{var n;if(e)return n=/(\d+)-(\d+)\/(\d+)/i,e.match(/(\d+)-(\d+)\/(\d+)/g).map(function(e){var t=e.match(n);if(t&&4===t.length)return{startRecord:Number(t[1]),endRecord:Number(t[2]),totalCount:Number(t[3])}}).filter(function(e){return!!e})})(t))}else{var n,r=null;for(n in e.data.d.ProcessMessages)(r=e.data.d.ProcessMessages[n]).severity=r.Severity.toString(),delete r.Severity,r.fdfFieldSequence=r.FdfFieldSequence,delete r.FdfFieldSequence,r.fdfSectionId=r.FdfSectionId,delete r.FdfSectionId,r.id=r.Id,delete r.Id,r.indicators=r.Indicators,delete r.Indicators,r.message=r.Message,delete r.Message,r.messageCategoryCode=r.MessageCategoryCode,delete r.MessageCategoryCode,r.messageFieldName=r.MessageFieldName,delete r.MessageFieldName,r.messageModuleId=r.MessageModuleId,delete r.MessageModuleId;e.data.d.processMessages=e.data.d.ProcessMessages,o.mapModel(e.data.d)}return e}),n},setDefaultAjaxHeaders:y,"-private":{addContextForAgentsAndBusiness:C},setRequestContext:T,setRequestContextForABN:w,setRequestContextForARN:I,getDocumentUrl:function(){return document.URL},isReAuthCallsExist:function(){return 0{var t;try{var n=l.parseXML(e);t="Saml Pre-request"===l.trim(n.getElementsByTagName("title")[0].text)&&"redirectform"===n.getElementsByTagName("form")[0].id&&void 0!==n.getElementsByName("RelayState")[0]}catch(e){t=!1}return t})(o)?(r=s,i=d,c.Modal(),v.unshift([r,i])):s.reject({data:o,textStatus:t,jqXHR:e,errorThrown:n})})}function C(e){if(e.isAddContextForTapEnabled&&!m.isNonResident()&&!m.isStaffAction()){var t,n,r,i,o=m.getCurrentUser();if(null!==o.secondaryContext&&o.secondaryContext.isTAN()&&(t=o.secondaryContext.identifierInFocus.clientIdentifierValueID),null!==o.primaryContext&&(o.primaryContext.isABN()?n=o.primaryContext.identifierInFocus.clientIdentifierValueID:o.primaryContext.isARN()&&(r=o.primaryContext.identifierInFocus.clientIdentifierValueID)),r&&!t)e.url=I(e.url,r);else if(n&&!t)e.url=w(e.url,n);else if(t)e.url=T(e.url,t,n);else if(void 0===t)return;if(e.data){try{i=JSON.parse(e.data)}catch(e){return}Object.prototype.hasOwnProperty.call(i,"requests")&&(a.utils.arrayForEach(i.requests,function(e){n&&!t?e.url=w(e.url,n):t&&(e.url=T(e.url,t,n))}),e.data=JSON.stringify(i))}}}function T(e,t,n){var r="Context='TAN%3d"+t,i=(n?r=r+"%2cABN%3d"+n+"'":r+="'",-1!==e.indexOf("?")?"&":"?");return e+i+r}function w(e,t){var n="Context='",r=(t&&(n=n+"ABN%3d"+t+"'"),-1!==e.indexOf("?")?"&":"?");return e+r+n}function I(e,t){var n="Context='",r=(t&&(n=n+"ARN%3d"+t+"'"),-1!==e.indexOf("?")?"&":"?");return e+r+n}return h}),define("services/LogException/v1/Client",["require","framework/utilities/ServiceUtilities","./models/Models","framework/components/Service","framework/components/Logger"],function(e){var n=e("framework/utilities/ServiceUtilities"),r=e("./models/Models"),o=e("framework/components/Service"),a=e("framework/components/Logger"),s={name:"LogExceptions",methods:{logException:{name:"logException",httpmethod:"PUT",url:"/api/v1/Logging/{exceptionCode}"}},logException:function(e){var t=s.methods.logException;return((e,t,n,r)=>{var i;if(n)return i=s.name+e,a.logInfo("Service called",i),a.logDebug("Request",i),t.resourceVersion=void 0,t.isAddContextForTapEnabled=!0,o.ajax(t).then(function(e){var t=new n(e.data);return a.logDebug("Response",i,t),t},function(e){if(r)return r instanceof Function&&r(e),e});throw"Mapper is required for"+e})("logException",{url:n.formatRoute(e,t.url),method:t.httpmethod,data:e.exceptionMessageText},r.LogExceptionRequestViewModel)},models:r};return s}),define("framework/context/RedirectService",["require","framework/context/ContextManager","framework/modules/ato-context.umd"],function(e){var t=e("framework/context/ContextManager"),n=e("framework/modules/ato-context.umd"),r=new n.RedirectService(t);return r.urlRedirect=n.RedirectService.urlRedirect,r}),define("framework/handlers/ErrorHandler",["knockout","durandal/system","durandal/app","../components/Logger","../common/Constants","../common/Utilities","../context/ModalManager","./BeforeUnloadHandler","services/LogException/v1/Client","framework/context/ContextManager","framework/context/RedirectService"],function(u,p,m,f,h,v,g,y,a,b,C){function T(){this.toString=function(){return s}}var e=require("framework/common/ImportNormalisation"),s=(p=e.normaliseDefaultModuleImport(p),m=e.normaliseDefaultModuleImport(m),"HandledError"),w="ErrorPage",I={requiresRedirectToErrorPage:x,additionalQueryStrings:{},onError:t,errCode:function(e){return((e=b.isSimulator()?"SIMU":e)||"ATOO")+"-"+(new Date).getTime().toString()},isStaffViewForbiddenWarningVisible:!1,fatalErrorCount:0};function S(e,t,n,r){var i=void 0!==t.serviceExceptionCode?t.serviceExceptionCode:void 0!==r?I.errCode(r):I.errCode(),o={exceptionCode:i,exceptionMessageText:{timestamp:(new Date).getTime(),querystring:e,href:window.location.href,userAgent:window.navigator.userAgent,error:t}};console.log(o);try{n||a.logException(new a.models.LogExceptionRequestViewModel(o))}catch(e){f.log("Error logging exception:"+e)}return i}function A(e,t,n,r){var i,o,a=S(e,t,n,r);if(b.isStaffView()&&t&&403==+t.status)I.isStaffViewForbiddenWarningVisible=!0,g.promiseActionForbiddenPopup(function(){I.isStaffViewForbiddenWarningVisible=!1}).done(),m.trigger("atoLoading:end");else if(p.debug())f.logError("Would have redirected due to error","ErrorHandler.navigateToErrorPage",{queryStrings:e,error:t});else{var s,d=window.location.hash.replace("#",""),l=window.location.pathname,c=l.substring(l.lastIndexOf("/")+1);if(e.p=c,e.r=d,e.e=a,!(0{var t,n="";for(t in e){var r=e[t];null!=r&&((r=r.toString?r.toString():r).substring&&"http://"===r.substring(0,7)&&(r=r.substring(r.indexOf("/",7)+1)),n+=encodeURIComponent(t)+"="+encodeURIComponent(r)+"&")}return n})(e)),i=s,setTimeout(function(){y.disable(),window.location.href=i},500))}}}function t(e,t,n,r,i){var o;i&&i instanceof T||e===s||(o={message:e,url:t||window.location.pathname,line:n,col:r,error:i},I.fatalErrorCount++,1===I.fatalErrorCount?(f.logError("Redirecting due to unhandled error","ErrorHandler.onError",o),A({f:t,l:n,c:r},o)):(f.logError("An excessive errors number of errors are being caught","ErrorHandler.onError",o),o.message="Exception logging repetition detected. "+o.message,5===I.fatalErrorCount&&S({f:t,l:n,c:r},o)))}function x(e){return!("rejected"===(t=e).state&&0===t.status&&"error"===t.statusText&&""===t.responseText);var t}return{initialise:function(){window.onerror=t},handleServiceError:function(e,t,n,r,i,o){var a="";try{var s=JSON.parse(n.responseText);s&&s.exception&&(a=s.exception.uniqueIdentifier)}catch(e){console.log("JSON parse exception:"+e.message)}""===a&&(a=I.errCode(o));var d={service:e,serviceRequest:r,url:t,status:n.status,statusText:n.statusText,state:n.state(),responseText:n.responseText,serviceExceptionCode:a};n.staffViewRestrictedAcess&&(d.staffViewRestrictedAcess=!0);if(x(d)){var l=(t=>{var e;try{var n,r=(e=JSON.parse(t)).d?e.d.ProcessMessages:e.processMessages;return r?(n=[],u.utils.arrayForEach(r,function(e){n.push(e.Id||e.id)}),{pm:n}):!window.ato||window.ato.netInsightLogServiceErrorResponseJSON?{js:t}:{js:"JSON-off"}}catch(e){return!window.ato||window.ato.netInsightLogServiceErrorResponseText?{njs:t}:{njs:"text-off"}}})(d.responseText),c=(f.logError("Redirecting due to unhandled server error","ErrorHandler.handleServiceError",d),{sn:e,st:d.statusText,pm:l.pm?l.pm.join("-"):null});if(!i)throw A(c,d,500!==n.status),new T;S(c,d,!i,o)}},handlePromiseRejection:function(n){return function(e){if(e instanceof T)throw e;var t={source:n,type:e.name,errorMsg:e.message,stack:e.stack,url:window.location.pathname};throw f.logError("Redirecting due to unhandled code error","ErrorHandler.handlePromiseRejection",t),A({ps:n},t),new T}},addAdditionalQueryString:function(e,t){I.additionalQueryStrings[e]=t},createAndLogError:S,throwHandledError:function(){throw new T},navigateToErrorPage:A,"-private":I}}),define("framework/common/ArrayUtils",["knockout"],function(n){return{uniqueFilter:function(e,t,n){return n.indexOf(e)===t},getUniqueByPropertyFilter:function(t){function i(e){return"function"==typeof t?t(e):e[t]}return function(t,e,n){var r=n.filter(function(e){return i(e)===i(t)})[0];return n.indexOf(r)===e}},objectValues:function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(e[t]);return n},includes:function(e,t){return 0=s.getFinancialYearCutoff(n-1)&&t=s.getFinancialYearCutoff(n-1)&&t=s.getFinancialYearCutoff(t)&&n++;return n},convertDisplayDateToServerDate:t,convertServerDateToDisplayDate:function(e,t=!1){return e&&(t?e.split("-").reverse().join("/"):o(e,a.systemDateFormat).format(a.defaultDateFormat))},convert24hDateToServerDate:function(e){return e&&o(e,a.defaultDateTimeFormat24Hrs).format(a.systemDateFormat)},isDisplayDateInFinancialYear:function(e,t){return 0===s.isDateInFinancialYearRange(e,t)},isDateInFinancialYearRange:function(e,t){var n=o(e,a.defaultDateFormat),r=s.getFinancialYearCutoff(t-1),i=s.getFinancialYearCutoff(t);return i<=n?1:n{a.utils.arrayForEach(t,function(e){n=C(e.TaxonomyPath),function e(t,n,r){var i=n.shift();{var o;0===n.length?t._TaxonomyItems[i]=r:(o=(o=t[i])||(t[i]={_Downloaded:!g.useTaxonomyService(),_TaxonomyItems:{}}),e(o,n,r))}}(g.cache,n,e)});var n,r=T(e);if(null!==r)return r._Downloaded=!0;throw new Error("Cant find taxonomy '"+e+"'")})(t,e.TaxonomyItems),g.fetching[t]=void 0),g.useTaxonomyService()||(e.TaxonomyItems=w(T(t))),e},function(e){l.handleServiceError(y.name,y.url,e.jqXHR)}).fail(l.handlePromiseRejection("TaxonomyService.downloadTaxonomy")),g.fetching[t]=r)}function b(e){var t,n,r=new f(e),i=r;return i.TaxonomyItems&&(t=/\/ui/g,n=m.getCDNBasePath()+"/ui",i.TaxonomyItems.forEach(function(e){e.Content&&(e.Content=e.Content.replace(t,n))})),r}function C(e){var t=e.toLowerCase().split("/");return""===t[0]&&t.shift(),t}function T(e){var t=C(e);return function e(t,n){var r=n.shift();return 0===n.length?Object.prototype.hasOwnProperty.call(t,r)?t[r]:t._TaxonomyItems&&Object.prototype.hasOwnProperty.call(t._TaxonomyItems,r)?t._TaxonomyItems[r]:null:Object.prototype.hasOwnProperty.call(t,r)?e(t[r],n):null}(g.cache,t)}function w(e){var t=[];return function e(t,n){if(n instanceof h)return void t.push(n);for(var r in n._TaxonomyItems){var i=n._TaxonomyItems[r];t.push(i)}for(r in n){var o=n[r];"_"!==r.charAt(0)&&e(t,o)}}(t,e),t}function I(){return window.ato&&void 0!==window.ato.enableTaxonomyService&&window.ato.enableTaxonomyService}function S(e){var n,r,i;!I()&&window.ato.spaID&&"ComponentsV3"!==window.ato.spaID&&(n="Taxonomy {0} is not configured for {1} {2}. Please update the taxonomy item.",r=t.getUserTypes(),i=[p.userTypes.Default].concat(r),a.utils.arrayForEach(e,function(e){var t;if(e.SPAs.indexOf(window.ato.spaID)<0?t=n.format(e.TaxonomyPath,"SPA",window.ato.spaID):c.hasIntersection(e.UserTypes,i)||(t=n.format(e.TaxonomyPath,"user type",JSON.stringify(r))),t){if(window.ato.enableDebugging)throw new Error(t);console.log(t)}}))}return y}),define("services/ClientBase",["require","durandal/app","framework/common/ImportNormalisation","q","framework/components/Logger","framework/handlers/ErrorHandler","framework/utilities/ServiceUtilities","framework/components/Service","framework/components/State","framework/context/ContextManager","framework/common/Constants","framework/context/RouteContextHelper"],function(e){var m=e("durandal/app"),m=e("framework/common/ImportNormalisation").normaliseDefaultModuleImport(m),f=e("q"),h=e("framework/components/Logger"),v=e("framework/handlers/ErrorHandler"),g=e("framework/utilities/ServiceUtilities"),y=e("framework/components/Service"),b=e("framework/components/State"),C=e("framework/context/ContextManager"),T=e("framework/common/Constants"),w=e("framework/context/RouteContextHelper");function r(e){this.isAddContextForTapEnabled=e}function i(e){if(0<=y.apiGateWays.indexOf(e))return this.apiGateway=e,this;throw"ERROR: Service client for"+this.name+" does not support gateway="+e}function o(e){if(void 0===e)this.supportedResourceVersions.CurrentVersion=void 0;else{if(!this.supportedResourceVersions)throw"ERROR: Service client for "+this.name+" does not support Resource Versioning";if(!Object.prototype.hasOwnProperty.call(this.supportedResourceVersions,"Rv"+e))throw"ERROR: Service client for"+this.name+" does not support Resource Version="+e;this.modelContracts=this.supportedResourceVersions["Rv"+e],this.supportedResourceVersions.CurrentVersion=e}return this}function I(){return this.supportedResourceVersions?this.supportedResourceVersions.CurrentVersion:void 0}function S(e,t,n){return(e.methods&&e.methods[t]&&e.methods[t].url?e.methods[t]:n).url}function u(i,o,n,a,e,r,t,s){if(!n)throw"Mapper is required for "+i;var d=this,l=d.name+i;if(h.logInfo("Service called",l),h.logDebug("Request",l),o.resourceVersion=I.apply(d),o.isAddContextForTapEnabled=d.isAddContextForTapEnabled,o.apiGateway=d.apiGateway||window.ato.apiGateway||y.defaultApiGateway,!t&&o.data&&g.detectHTML(o.data))throw new Error("HTML detected in service payload");e&&(o.cache=!1);var c,u=new f.promise(function(e){var t;window.ato.jsServiceTimeout&&(t=parseInt(window.ato.jsServiceTimeout.toString(),10)),isNaN(t)&&(t=60),setTimeout(function(){y.isReAuthCallsExist()||e(new Error("JS service timeout"))},1e3*t)}),p=f.defer();return p.resolve(f.race([y.ajax(o).then(function(e){e.jqXHR&&422==+e.jqXHR.status&&e.data&&e.data.processMessages&&0=t},maxLength:function(e,t){return void 0===e||(e===+e?e.toString():e).length<=t},doesNotStartWithSpace:function(e){return void 0===e||" "!==e[0]},doesNotStartWithCharacter:function(e,t){return void 0===e||String(e)[0]!==String(t)},doesNotHaveConsecutiveSpaces:function(e){return void 0===e||!a.regEx.consecutiveSpaces.test(e)},doesNotHaveConsecutiveSymbols:function(e,t){if(void 0!==e&&""!==e){for(var n=t.split(""),r="",i=0;i=t&&e.length<=n&&r.test(e)},validTFN:function(e){if(!e)return!0;e=(e=e.toString()).replace(/\s/g,"");var t=!1,n=a.regEx.invalidTFN;{var r,i,o;8<=e.length&&e.length<=9&&!n.test(e)&&(r=10*parseInt(e.charAt(0))+7*parseInt(e.charAt(1))+8*parseInt(e.charAt(2))+4*parseInt(e.charAt(3))+6*parseInt(e.charAt(4))+3*parseInt(e.charAt(5))+5*parseInt(e.charAt(6)),8{var n=!0,r=(0===(e=String(e)).length&&(n=!1),e.replace(/\D+/g,""));return!0===t?"-"===e[0]&&(r="-"+r):Number(e)<0&&(n=!1),n=(n=n&&e!==r?!1:n)&&isNaN(parseInt(e,10))?!1:n})(e=(e=e.toString()).replace(/\s/g,""))&&0Tooltip"),e.tooltip(t),m(window).on("resize",function(e){clearTimeout(r),r=setTimeout(function(){var e=m("[id^=tooltip]");e.hasClass("in")&&m("[aria-describedby='"+e.attr("id")+"']").tooltip("show")},200)})}f.bindingHandlers.fadeVisible={init:function(e,t){var n=m(e);f.utils.unwrapObservable(t())?n.show():(n.hide(),f.bindingHandlers.fadeVisible.setOpacity(n,0,0,"ease"))},update:function(e,t){var n=f.unwrap(t()),r=m(e),i="transitionend webkitTransitionEnd oTransitionEnd otransitionend";r.off(i),clearTimeout(e.cssFadeVisible),n?(r.show(),e.cssFadeVisible=setTimeout(function(){f.bindingHandlers.fadeVisible.setOpacity(r,1,500,"ease-in"),r.on(i,function(e){r.show(),r[0]===e.target&&r.data("focus")&&(r.is(":input")?r:r.attr("tabindex",-1)).focus()})},50)):e.cssFadeVisible=setTimeout(function(){r.is(":visible")?(f.bindingHandlers.fadeVisible.setOpacity(r,0,500,"ease-out"),r.on(i,function(e){r[0]===e.target&&r.hide()})):(r.hide(),r.css("opacity",0))},0)},setOpacity:function(n,r,e,i){var o=e/1e3;m.each(["-webkit-","-moz-","-o-,","-ms-",""],function(e,t){n.css("opacity",r).css(t+"transition","opacity "+o+"s "+i)})}},f.bindingHandlers.ektron={init:function(e,t,n,r,i){var o=b(t()),a=o.Path,s=o.Item,d=m(e);p.logInfo("Start Binding ektron","BindingHandlers.ektron",{taxonomy:a,item:s}),window.ato.enableHelp?h.getTaxonomyItem(a,s).then(function(e){var t=C(e,a,s,o.Field,o.Replace);t?d.append(t):d.hide()}).done():d.append("Help content: path="+a+"/"+s)},update:function(e,t,n,r,i){}},f.bindingHandlers.ektronTooltip={init:function(e,t,n,r,i){var o,a,s,d=m(e),l={},c=f.unwrap(t());!(c=Array.isArray(c)?y.selectConfigByUserType(c)||{}:c).Path&&c.Text?(f.utils.extend(l,f.bindingHandlers.ektronTooltip.options),f.utils.extend(l,c),T(d,l,c.Text)):(o=b(c),a=o.Path,s=o.Item,f.utils.extend(l,f.bindingHandlers.ektronTooltip.options),f.utils.extend(l,o),p.logInfo("Start Binding ektron","BindingHandlers.ektronTooltip",{taxonomy:a,item:s}),window.ato.enableHelp?h.getTaxonomyItem(a,s).then(function(e){var t=C(e,a,s,o.Field);t&&T(d,l,t)}).done():T(d,l,"Help content: path="+a+"/"+s)),d.manager=new g(d),f.utils.domNodeDisposal.addDisposeCallback(e,function(){d.tooltip("destroy"),d.manager.dispose()})},update:function(e,t,n,r,i){},options:{animation:!0,html:!1,placement:"auto top",selector:!1,title:"",trigger:"ontouchstart"in window?"click":"hover focus click",delay:0,container:!1,template:'
'}},f.bindingHandlers.abbrTooltip={init:function(e,t,n,r,i){var o,a=f.unwrap(t());(!a.touchOnly||"ontouchstart"in window)&&(f.utils.extend(o={},f.bindingHandlers.ektronTooltip.options),f.utils.extend(o,a),m(e).tooltip(o))}},f.bindingHandlers.datePicker={init:function(n,e){function t(e){0!==m(e.target).closest(".datetimepicker").length||m.contains(n,e.target)||!e.target.parentElement&&(m(e.target).hasClass("year")||m(e.target).hasClass("month"))||m(n).datetimepicker("hide")}var r=f.unwrap(e()),i={},o=[];f.utils.extend(i,f.bindingHandlers.datePicker.options),f.utils.extend(i,r),f.isObservable(r.startDate)&&(i.startDate=f.unwrap(r.startDate),o.push(r.startDate.subscribe(function(e){m(n).datetimepicker("setStartDate",e)}))),f.isObservable(r.endDate)&&(i.endDate=f.unwrap(r.endDate),o.push(r.endDate.subscribe(function(e){m(n).datetimepicker("setEndDate",e)}))),o.push(f.computed(function(){m(n).datetimepicker(f.unwrap(r.disabled)?"remove":i)})),r.currentDate&&f.isObservable(r.currentDate)&&o.push(r.currentDate.subscribe(function(e){!1!==e&&m(n).datetimepicker("update",e)}));m(n).on("show.dp",function(e){m(document).on("touchend",t),m(document).one("focusin",function(){var e,t=m(n);m(document.activeElement).closest(".datetimepicker").length||(e=n.querySelector("input"),document.activeElement!==e&&t.datetimepicker("hide"))})}),m(n).on("hide.dp",function(e){m(document).off("touchend",t)}),f.utils.domNodeDisposal.addDisposeCallback(n,function(){m(n).datetimepicker("remove"),f.utils.arrayForEach(o,function(e){e.dispose()})})},options:{weekStart:!0,todayBtn:!0,startDate:new Date,autoclose:!0,todayHighlight:!0,startView:2,minView:2,forceParse:0,pickerPosition:"bottom-left",format:"dd/mm/yyyy",zIndex:l.zIndex.DatePicker}},f.bindingHandlers.refText={update:function(t,e){var n=f.unwrap(e());if(!n.table)throw new Error("No table specified in refText bindingHandler");if(!n.value&&!n.filter)throw new Error("No value or filter specified in refText bindingHandler");if(!n.codeField)throw new Error("No codeField specified in refText bindingHandler");if(!n.decodeField)throw new Error("No decodeField specified in refText bindingHandler");var r=f.unwrap(n.table),i=String(f.unwrap(n.value)).toUpperCase(),o=n.codeField,a=n.decodeField,s=n.filter||function(e){return String(e[o]).toUpperCase()===i},d=f.unwrap(n.serverFilter);c.getRefData(r,{client:s,server:d}).then(function(e){e&&m(t).text(e[a])}).done()}},f.bindingHandlers.refValue={update:function(t,e){var n=f.unwrap(e());if(!n.table)throw new Error("No table specified in refValue bindingHandler");if(!n.value&&!n.filter)throw new Error("No value or filter specified in refValue bindingHandler");if(n.value&&n.filter)throw new Error("Both value and filter specified in refValue bindingHandler");if(!n.codeField)throw new Error("No codeField specified in refValue bindingHandler");if(!n.decodeField)throw new Error("No decodeField specified in refValue bindingHandler");var r=f.unwrap(n.table),i=f.unwrap(n.value),o=f.unwrap(n.codeField),a=f.unwrap(n.decodeField),s=n.filter||function(e){return String(e[o]).toUpperCase()===i},d=f.unwrap(n.serverFilter);c.getRefData(r,{client:s,server:d}).then(function(e){if(void 0===e)throw new Error("table:{0}:code:{1}:notfound".format(r,i));m(t).val(e[a])}).done()}},f.bindingHandlers.refOptions={init:function(n,e,r){var t,i,o,a,s,d=f.unwrap(e());if(!d.table)throw new Error("No table specified in refOptions bindingHandler");if(!d.codeField)throw new Error("No codeField specified in refOptions bindingHandler");if(!d.decodeField)throw new Error("No decodeField specified in refOptions bindingHandler");t=f.unwrap(d.table),s=f.unwrap(d.caption),o=d.codeField,a=d.decodeField,d.filter&&(i=d.filter);var l=f.unwrap(d.serverFilter);c.getRefDataCollection(t,{client:i,server:l}).then(function(e){var t=m(n);s&&t.append(m("").attr("value","").text(s)),f.utils.arrayForEach(e,function(e){t.append(m("").attr("value",String(e[o]).toUpperCase()).text(e[a]))}),d.value?f.bindingHandlers.value.init(n,function(){return d.value},r):d.selectedOptions&&f.bindingHandlers.selectedOptions.init(n,function(){return d.selectedOptions},r)}).done()}},f.bindingHandlers.id={init:function(e,t,n,r,i){var o=t(),a="";if(!o)throw new Error("BindingHandlers.id: Value passed in is undefined");var s=m(e),d=s.attr("id");if(d)throw new Error("BindingHandlers.id: Element already has an id attribute ("+d+")");var l=o;if(f.isObservable(l))d=v.getIdForObservable(l);else{if("object"!=typeof o)throw new Error("BindingHandlers.id: label passed in is not an observable");if(l=o.field,void 0!==o.prefix&&(a=o.prefix),!f.isObservable(l))throw new Error("BindingHandlers.id: Value object passed in does not have an observable the field property");d=v.getOrCreateIdForObservable(l,o.instance)}s.attr("id",a+d);var c=[];c.push(f.computed(function(){u.isRequired(l)?(s.attr("required","required"),s.attr("aria-required","true")):(s.removeAttr("required"),s.removeAttr("aria-required"))})),f.utils.domNodeDisposal.addDisposeCallback(e,function(){f.utils.arrayForEach(c,function(e){e.dispose()}),c=void 0})}},f.bindingHandlers.uniqid={init:function(e,t,n,r,i){var o=t();if(!o)throw new Error("BindingHandlers.id: Value passed in is undefined");var a=m(e);if(d=a.attr("id"))throw new Error("BindingHandlers.id: Element already has an id attribute ("+d+")");var s=o.toString(),d=v.createIdForField(s,!0);a.attr("id",d)}},f.bindingHandlers.name={init:function(e,t,n,r,i){var o=t();if(!o)throw new Error("BindingHandlers.name: Value passed in is undefined");var a=m(e),s=a.attr("name");if(s)throw new Error("BindingHandlers.name: Element already has a name attribute ("+s+")");if(f.isObservable(o))s=v.getIdForObservable(o);else if("object"==typeof o){if(!o.field||!f.isObservable(o.field))throw new Error("BindingHandlers.name: Value object passed in does not have an observable the field property");s=v.getOrCreateIdForObservable(o.field,o.instance)}else{if("string"!=typeof o)throw new Error("BindingHandlers.name: Value passed in is not an observable");s=o}a.attr("name",s)}},f.bindingHandlers.label={init:function(e,t,n,r,i){var o=t(),a="";if(!o)throw new Error("BindingHandlers.label: Value passed in is undefined");var s=m(e),d=s.attr("for");if(d)throw new Error("BindingHandlers.label: Element already has a for attribute ("+d+")");var l=[],c=o;if(f.isObservable(c))d=v.getIdForObservable(c);else{if("object"!=typeof o)throw new Error("BindingHandlers.name: label passed in is not an observable");if(c=o.field,void 0!==o.prefix&&(a=o.prefix),!f.isObservable(c))throw new Error("BindingHandlers.label: Value object passed in does not have an observable the field property");d=v.getOrCreateIdForObservable(c,o.instance)}s.attr("for",a+d),l.push(f.computed(function(){s.html(c.label()),u.isRequired(c)&&s.append(' *')})),f.utils.domNodeDisposal.addDisposeCallback(e,function(){f.utils.arrayForEach(l,function(e){e.dispose()})})}},f.bindingHandlers.atoValidationMessage={init:function(e,t,n,r,i){var o,a=t(),s=null,s=a instanceof Array?a:[a],d=n().processMessageViewModel,l=(d instanceof Array&&(d=(o=d)[0]),f.utils.arrayForEach(s,function(e){if(!e||!f.isObservable(e))throw new Error("BindingHandlers.atoValidationMessage: Value passed in is not a observable");if(!e.isField)throw new Error("BindingHandlers.atoValidationMessage: Mapped to observable which has not been setup with field extender");d.setupObservable(e,o)}),f.computed(function(){var n=[];return f.utils.arrayForEach(s,function(t){var e;t(),t.htmlElementId&&t.htmlElementId[0]&&(f.bindingHandlers.atoValidationMessage.findErrorConfig(d,t)||(e=f.bindingHandlers.atoValidationMessage.getErrorConfig(d,t),d.AtoValidationMessagesCollection.push(e))),t.hasClientErrorsComputed()&&n.push({label:t.label,msg:t.error}),t.hasServerErrorsComputed()&&f.utils.arrayForEach(t.relatedProcessMessages(),function(e){n.push({label:t.label,msg:e.Message()})})}),n})),c=m(e),u=l.subscribe(function(e){f.bindingHandlers.atoValidationMessage.updateMessages(c,e)}),p=(l.notifySubscribers(l()),c.attr("aria-live","polite"),c.attr("aria-atomic","true"),d.hasUserSubmitted.subscribe(function(e){c.attr("aria-live",e?"off":"polite")}));f.utils.domNodeDisposal.addDisposeCallback(e,function(){u.dispose(),p.dispose(),l.dispose(),f.utils.arrayForEach(s,function(e){var t;d.forgetObservable(e)&&e.htmlElementId&&e.htmlElementId[0]&&(t=v.getIdForObservable(e),d.AtoValidationMessagesCollection.remove(function(e){return e.elementId===t}))})})},updateMessages:function(n,e){n.empty(),0'+f.unwrap(e.label)+""+f.unwrap(e.msg)+"");n.append(t)})},findErrorConfig:function(e,t){var n=v.getIdForObservable(t),r=f.utils.arrayFirst(e.AtoValidationMessagesCollection(),function(e){return e.elementId===n});return r&&!f.isObservable(t.error)&&r.message(t.error),r},getErrorConfig:function(e,t){var n,r={elementId:v.getIdForObservable(t),isValid:t.isValid,label:void 0!==t.errorLabel?t.errorLabel:t.label,message:f.isObservable(t.error)?t.error:f.observable(t.error)};return t.errorGroup&&t.errorGroup.htmlElementId&&t.errorGroup.htmlElementId[0]&&(n=(n=f.bindingHandlers.atoValidationMessage.findErrorConfig(e,t.errorGroup))||f.bindingHandlers.atoValidationMessage.getErrorConfig(e,t.errorGroup),r.parent=n),r}},f.bindingHandlers.fieldValidation={init:function(e,t,n,r,i){var o,a=t(),s=null,s=a instanceof Array?a:[a],d=n().processMessageViewModel,l=(d instanceof Array&&(d=(o=d)[0]),f.utils.arrayForEach(s,function(e){if(!e||!f.isObservable(e))throw new Error("BindingHandlers.atoValidationMessage: Value passed in is not a observable or an array of observables");if(!e.isField)throw new Error("BindingHandlers.atoValidationMessage: Mapped to observable which has not been setup with field extender");d.setupObservable(e,o)}),f.computed(function(){var t=!1;return f.utils.arrayFirst(s,function(e){if(e.hasErrorsComputed())return t=!0}),t})),c=m(e),u=null;l.subscribe(function(e){e!==u&&(c.hasClass("table-error-container")?c.toggleClass("table-error",e):(c.toggleClass("field-error",e),c.find("input, select, textarea").not("input[type=radio]").attr("aria-invalid",e)),u=e)}),l.notifySubscribers(l()),f.utils.domNodeDisposal.addDisposeCallback(e,function(){l.dispose(),f.utils.arrayForEach(s,function(e){d.forgetObservable(e)})})}},f.bindingHandlers.loadingButton={update:function(e,t,n){var r=f.unwrap(t());if(m(e).off("click",f.bindingHandlers.loadingButton.click),r){if(void 0===r.useSpinner&&(r.useSpinner=o.isAgent()||a.isNonResident()),r.useSpinner&&!m.blockUI)throw new Error("BindingHandler.loadingButton: requires jQuery BlockUI plugin dependency");var i=f.bindingHandlers.loadingButton.getOptions(r);if(i.buttonDisableState=n().attr?n().attr.disabled:null,void 0!==i.click){if("function"!=typeof i.click)throw new Error("BindingHandler.loadingButton: Value passed in does not contain a click event handler or click event handler is not a function");m(e).click(i,f.bindingHandlers.loadingButton.click)}}},getOptions:function(e){var t,n={},r=e.useSpinner?{spinner:"teal",title:"Processing",blockConfig:{showOverlay:!1,baseZ:1e3,fadeIn:0,fadeOut:200,blockMsgClass:"block-element",centerX:!1,centerY:!1,css:{border:"none",left:"auto",top:"12px",right:"12px",width:"initial",backgroundColor:"none","border-color":"unset",outline:"unset","-webkit-box-shadow":"unset","-moz-box-shadow":"unset","box-shadow":"unset"}}}:{text:"Processing...",title:"Button will be unavailable while processing"};return m.extend(!0,n,r),m.extend(!0,n,e),n.blockConfig&&!n.blockConfig.message&&(t=u.createCDN("/ui/images/loader-"+n.spinner+".png"),n.blockConfig.message=''),n},click:function(e){var t,n,r=m(this),i=e.data,o=!!i.text,a=(o&&(t=r.contents().detach(),r.text(f.unwrap(i.text))),n=r.prop("title"),r.prop("title",i.title),i.buttonDisableState);i.blockConfig?(r.addClass("block-element-container"),i.blockConfig.onBlock=function(){s.fcall(i.click).then(function(){var e={};f.utils.extend(e,i.blockConfig,!0),e.onUnblock=function(){r.removeClass("block-element-container"),o&&r.empty().append(t),r.prop("title",n),r.prop("disabled",!!f.unwrap(a)),!r.is(":visible")||document.activeElement&&"BODY"!==document.activeElement.nodeName||r.focus()},r.unblock(e)}).done()},r.prop("disabled",!0),r.block(i.blockConfig),r.find(".blockUI.block-element.blockElement").attr("tabindex",-1).focus()):(r.prop("disabled",!0),s.fcall(i.click).then(function(){o&&r.empty().append(t),r.prop("title",n),r.prop("disabled",!!f.unwrap(a))}).done())}},f.bindingHandlers.PromiseLoader={init:function(e,t,n){var r=f.unwrap(t()),i={};if(f.utils.extend(i,f.bindingHandlers.PromiseLoader.options),f.utils.extend(i,r),f.utils.extend(i,{enable:n().enable}),!i.promise||"function"!=typeof i.promise.then)throw new Error("BindingHandler.PromiseLoader: missing or invalid promise");var o=m(e),a=(o.children().hide(),o.prop("tagName").toLowerCase());if("tbody"!==a)throw new Error('BindingHandler.PromiseLoader: not implemented for element type: "{0}". Use the PromiseLoader Widget.'.format(a));o.prepend(i.loaderTableRowHtml.format(i.text))},options:{text:"Loading...",loaderTableRowHtml:'
\r\n\r\n"}),define("components/heading-help-link/heading-help-link",["framework/common/Utilities"],function(t){return function(e){this.title=e.title||e.routeInfo.title,this.sectionLevel=+e.sectionLevel||2,this.routeInfo=e.routeInfo,this.processMessageVM=e.processMessageVM,this.focusOnNavigation=t.observableFromParam(e.focusOnNavigation,!0)}}),define("framework/documentmodels/ProcessMessageDocumentModel",["require","knockout"],function(e){function t(e){this.FdfFieldSequence=n.observable(),this.FdfSectionId=n.observable(),this.Id=n.observable(),this.Message=n.observable(),this.MessageFieldName=n.observable(),this.Severity=n.observable(),this.RuleId=n.observable(),this.Ektron=n.observable(),this.Field=null,this.Label=null,e&&"object"==typeof e&&this.mapFromModel(e),n.editable(this)}var n=e("knockout");return t.prototype.mapFromModel=function(e){void 0!==e.FdfFieldSequence&&this.FdfFieldSequence(e.FdfFieldSequence),void 0!==e.FdfSectionId&&this.FdfSectionId(e.FdfSectionId),void 0!==e.Id&&this.Id(e.Id),void 0!==e.Message&&this.Message(e.Message),void 0!==e.MessageFieldName&&this.MessageFieldName(e.MessageFieldName),void 0!==e.Severity&&this.Severity(e.Severity),void 0!==e.Ektron&&this.Ektron(e.Ektron),void 0!==e.fdfFieldSequence&&this.FdfFieldSequence(e.fdfFieldSequence),void 0!==e.fdfSectionId&&this.FdfSectionId(e.fdfSectionId),void 0!==e.id&&this.Id(e.id),void 0!==e.message&&this.Message(e.message),void 0!==e.messageFieldName&&this.MessageFieldName(e.messageFieldName),void 0!==e.severity&&this.Severity(e.severity),void 0!==e.ruleId&&this.RuleId(e.ruleId)},t.prototype.mapToModel=function(e){this.FdfFieldSequence.hasChanges()&&(e.FdfFieldSequence=this.FdfFieldSequence()),this.FdfSectionId.hasChanges()&&(e.FdfSectionId=this.FdfSectionId()),this.Id.hasChanges()&&(e.Id=this.Id()),this.Message.hasChanges()&&(e.Message=this.Message()),this.MessageFieldName.hasChanges()&&(e.MessageFieldName=this.MessageFieldName()),this.Severity.hasChanges()&&(e.Severity=this.Severity()),this.Ektron.hasChanges()&&(e.Ektron=this.Ektron()),this.FdfFieldSequence.hasChanges()&&(e.fdfFieldSequence=this.FdfFieldSequence()),this.FdfSectionId.hasChanges()&&(e.fdfSectionId=this.FdfSectionId()),this.Id.hasChanges()&&(e.id=this.Id()),this.Message.hasChanges()&&(e.message=this.Message()),this.MessageFieldName.hasChanges()&&(e.messageFieldName=this.MessageFieldName()),this.Severity.hasChanges()&&(e.severity=this.Severity()),this.RuleId.hasChanges()&&(e.ruleId=this.RuleId())},t}),define("framework/viewmodels/partials/ProcessMessageViewModel",["require","knockout","../../documentmodels/ProcessMessageDocumentModel","../../common/Constants"],function(e){function t(e,t){var n=this;this.hasUserSubmitted=a.observable(!1),this.hasUserFixedClientSideErrors=a.observable(!1),this.hasUserFixedAtoValidationErrors=a.observable(!1),this.severityLevelLimit=1,this.header=a.observable("Fix the following errors:"),this.showErrorPanelTrigger=a.observable(),this.ProcessMessageCollection=a.observableArray(),this.ValidationObjectCollection=a.observableArray(),this.AtoValidationMessagesCollection=a.observableArray(),a.utils.arrayForEach(e||[],function(e){if(!a.isObservable(e))throw new Error("ProcessMessageViewModel.ctor: One of the validators passed in is not observable");n.ValidationObjectCollection.push(e)}),this.includeWarningsAsErrors=t,this.hasServerErrors=a.computed(function(){return!!a.utils.arrayFirst(this.ProcessMessageCollection(),function(e){return 1===e.Severity()||n.includeWarningsAsErrors&&2===e.Severity()})},this),this.hasClientErrors=a.computed(function(){return this.hasUserSubmitted()&&!!a.utils.arrayFirst(this.ValidationObjectCollection(),function(e){return!e()})},this),this.hasClientErrors.subscribe(function(e){n.hasUserFixedClientSideErrors()||e||n.hasUserFixedClientSideErrors(!0)}),this.hasAtoValidationErrors=a.computed(function(){return this.hasUserSubmitted()&&!!a.utils.arrayFirst(this.AtoValidationMessagesCollection(),function(e){return!e.isValid()})},this),this.hasErrors=a.computed(function(){return n.hasServerErrors()||n.hasClientErrors()||n.hasAtoValidationErrors()},this),this.hasAtoValidationErrors.subscribe(function(e){n.hasUserFixedAtoValidationErrors()||e?n.hasUserFixedAtoValidationErrors()&&e&&n.hasUserFixedAtoValidationErrors(!1):(n.hasUserSubmitted(!1),n.hasUserFixedAtoValidationErrors(!0))})}var a=e("knockout"),s=e("../../documentmodels/ProcessMessageDocumentModel"),n=e("../../common/Constants");function d(e,t,n){var r=null,i=null;if(Object.prototype.hasOwnProperty.call(n,"display"))n.display&&l(e,t);else if(Object.prototype.hasOwnProperty.call(n,"ektron"))n.ektron&&l(e,new s({Ektron:n.ektron}));else{if(a.isObservable(n)?r=n:n.field&&(r=n.field,n.labelOverride)&&(i=n.labelOverride),!a.isObservable(r))throw new Error("ProcessMessageViewModel.mapProcessMessages: called with mapping where field is not an observable");if(!r.isField)throw new Error('ProcessMessageViewModel.mapProcessMessages: called with mapping where field has not been setup with a "field" extender');i=i||r.label(),t.Field=r,t.Label=i,l(e,t),r.modifiedSinceLastSubmit()&&r.modifiedSinceLastSubmit(!1)}}function l(e,t){a.utils.arrayFirst(e,function(e){return e.Id()===t.Id()&&e.Field===t.Field&&e.Label===t.Label})||e.push(t)}t.prototype.wasServiceRequestSuccessful=function(e){var n=this;return!a.utils.arrayFirst(e,function(e){var t=e.severity?parseInt(e.severity):parseInt(a.unwrap(e.Severity));return 1===t||n.includeWarningsAsErrors&&2===t})},t.prototype.submit=function(){this.ProcessMessageCollection.removeAll(),this.hasUserSubmitted(!1),this.hasUserSubmitted(!0),this.hasUserFixedClientSideErrors(!this.hasClientErrors()),this.hasUserFixedAtoValidationErrors(!this.hasAtoValidationErrors())},t.prototype.reset=function(){this.hasUserSubmitted(!1),this.hasUserFixedClientSideErrors(!1),this.hasUserFixedAtoValidationErrors(!1),this.clearProcessMessages()},t.prototype.clearProcessMessages=function(){this.ProcessMessageCollection.removeAll()};var c=["FdfFieldSequence","FdfSectionId","MessageFieldName","RuleId"];return t.prototype.mapProcessMessages=function(e,r,t){this.ProcessMessageCollection.valueWillMutate();var i=this.ProcessMessageCollection(),o=t||this.severityLevelLimit;a.utils.arrayForEach(e,function(e){var n,t;(e.severity?parseInt(e.severity):parseInt(e.Severity))<=o&&(n=new s(e),(t=r[n.Id()])?t instanceof Array?t.forEach(function(t){c.every(function(e){return void 0===t[e]||n[e]()===t[e]})&&(t.field?d(i,n,t):l(i,n))}):d(i,n,t):l(i,n))}),i.sort(function(e,t){return t.Field?e.Field?0:1:-1}),this.ProcessMessageCollection.valueHasMutated()},t.prototype.mapFormValidationError89=function(e){var t;e instanceof Array&&((t=e.filter(function(e){return e.id===n.processMessageErrorId.formFieldValidationError})).forEach(function(e){e.message=e.message.replace(/\<\;/g,"<")}),0");e.semiStructuredGeographicAddressLine2()&&(t+=e.semiStructuredGeographicAddressLine2()+" ");(e.structuredGeographicAddressLocalityName()||e.structuredGeographicAddressStateCode()||e.structuredGeographicAddressPostcode())&&(t+=[e.structuredGeographicAddressLocalityName(),e.structuredGeographicAddressStateCode(),e.structuredGeographicAddressPostcode()].join(" ")+" ");return t+=e.getCountryName()},setTabPosition:function(e,t,n){i.State.get(o.documents.FormDocumentModel).applicantType().isVendor()===o.yesNoOptions.yes?(e.tabPosition(t),e.spaTabs(s(!0))):(e.tabPosition(n),e.spaTabs(s(!1)))}};function s(e){var t=o.spaWizard;return e&&(t=o.spaWizardVend),n.utils.arrayMap(t,function(e){return e.click=function(){a.routeTo(e.route)},e})}return a}),define("viewmodels/documentmodels/IndividualApplicationDetailsDocumentModel",["require","knockout","common/Constants","common/RefData","common/CalculationHelpers","framework/common/Constants"],function(e){var r=e("knockout"),i=e("common/Constants"),o=e("common/RefData"),a=e("common/CalculationHelpers"),s=e("framework/common/Constants");return function(e,t){var n=this;this.isMigrated=r.observable().extend({component:{field:"Are you migrating and settling in Australia?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:function(){return e()===i.entityTypes.individual.code&&t()}}}),this.isMigratedNoOption=r.computed(function(){return n.isMigrated()===s.common.No}),this.isAusReturn=r.observable().extend({component:{field:"Are you an Australian returning to live in Australia?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.isMigratedNoOption}}),this.isAusReturnNoOption=r.computed(function(){return n.isAusReturn()===s.common.No}),this.isStayAusRequired=r.computed(function(){return n.isMigratedNoOption()&&n.isAusReturnNoOption()}),this.isStayAus=r.observable().extend({component:{field:"Have you stayed or do you intend to stay in Australia for six months or more?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.isStayAusRequired}}),this.isStayAusYesOption=r.computed(function(){return n.isStayAus()===s.common.Yes}),this.isStayAusNoOption=r.computed(function(){return n.isStayAus()===s.common.No}),this.residencyPurposeRequired=r.computed(function(){return n.isMigratedNoOption()&&n.isAusReturnNoOption()&&n.isStayAusYesOption()}),this.residencyPurpose=r.observable().extend({component:{field:"What is your main purpose for being in Australia?",dataType:s.dataType.Lookup,dataSourceConfig:o.cdn.generic.subsets.RESIDENCY_MAIN_PURPOSE_CODES,caption:"Select main purpose"},atoRequired:{onlyIf:n.residencyPurposeRequired}}),this.residencyPurposeReason=r.computed(function(){var e=i.residencyPurposeArray;return!(!n.residencyPurpose||-1===[e.contractOrPermanent.code,e.exchangeProgramOrResearch.code,e.fullTimeEducation.code,e.casualEmployment.code,e.visitFriendsOrRelatives.code].indexOf(n.residencyPurpose()))}),this.residencyPurposeSubFieldsRequired=r.computed(function(){return n.isMigratedNoOption()&&n.isAusReturnNoOption()&&n.isStayAusYesOption()&&n.residencyPurposeReason()}),this.isStayAusMoreSixMonths=r.observable().extend({component:{field:"Have you stayed or do you intend to stay in a particular place continuously for six months or more?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.residencyPurposeSubFieldsRequired}}),this.isStayAusMoreSixMonthsRequired=r.computed(function(){return n.residencyPurposeSubFieldsRequired()}),this.livingLocationAustralia=r.observable().extend({component:{field:"Where do you live in Australia?",dataType:s.dataType.Lookup,dataSourceConfig:o.cdn.generic.subsets.RESIDENCY_LOCATION_CODES,caption:"Select location"},atoRequired:{onlyIf:n.residencyPurposeSubFieldsRequired}}),this.livingLocationAustraliaRequired=r.computed(function(){return n.livingLocationAustralia()}),this.haveSpouseOrChildren=r.observable().extend({component:{field:"Do you have a spouse and/or dependent children?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.residencyPurposeSubFieldsRequired}}),this.haveSpouseOrChildrenRequired=r.computed(function(){return n.residencyPurposeSubFieldsRequired()&&n.haveSpouseOrChildren()}),this.haveSpouseOrChildrenSubFieldsRequired=r.computed(function(){return n.haveSpouseOrChildren()===s.common.Yes}),this.spouseOrChildrenLocation=r.observable().extend({component:{field:"Where are your spouse and/or dependent children?",dataType:s.dataType.Lookup,dataSourceConfig:o.cdn.generic.subsets.RESIDENCY_FAM_LOCATION_CODES,caption:"Select location"},atoRequired:{onlyIf:n.haveSpouseOrChildrenSubFieldsRequired}}),this.spouseOrChildrenLocationRequired=r.computed(function(){return n.haveSpouseOrChildrenSubFieldsRequired()}),this.whereHoldMajorityAssets=r.observable().extend({component:{field:"Where do you hold the majority of your assets?",dataType:s.dataType.Lookup,dataSourceConfig:o.statics.WHERE_MAJORITY_ASSETS_HELD},atoRequired:{onlyIf:n.residencyPurposeSubFieldsRequired}}),this.whereHoldMajorityAssetsRequired=r.computed(function(){return n.residencyPurposeSubFieldsRequired()}),this.memberOfGroups=r.observable().extend({component:{field:"Are you a member of any clubs, churches, community groups or organisations in Australia?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.residencyPurposeSubFieldsRequired}}),this.memberOfGroupsRequired=r.computed(function(){return n.residencyPurposeSubFieldsRequired()}),this.greater183Required=r.computed(function(){var e;if(n.memberOfGroups())return""!==(e=a.calculateWeights(n))&&parseInt(e)<=0&&n.residencyPurposeSubFieldsRequired()}),this.greater183=r.observable().extend({component:{field:"Have you actually been in Australia, either continuously or intermittently, for 183 days or more in the income year?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.greater183Required}}),this.abodeRequried=r.computed(function(){return n.greater183()===s.common.Yes&&n.greater183Required()}),this.abode=r.observable().extend({component:{field:"Is your usual place of abode outside Australia?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.abodeRequried}}),this.intentRequired=r.computed(function(){return n.abode()===s.common.Yes&&n.greater183Required()}),this.intent=r.observable().extend({component:{field:"Do you intend to take up residence in Australia?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.intentRequired}}),this.socialTiesOtherCountryRequired=r.computed(function(){return n.isMigratedNoOption()&&n.isAusReturnNoOption()&&n.isStayAusNoOption()}),this.hasSocialTiesOtherCountry=r.observable().extend({component:{field:"Do you have social or economic ties to a country other than Australia?",dataType:s.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:n.socialTiesOtherCountryRequired}}),this.weight=r.observable(),this.result=r.observable(),this.stepComplete=r.observable(!1)}}),define("viewmodels/documentmodels/CompanyApplicationDetailsDocumentModel",["require","knockout","common/Constants","common/RefData","framework/common/Constants"],function(e){var r=e("knockout"),i=e("common/Constants"),o=e("common/RefData"),a=e("framework/common/Constants");return function(e,t){var n=this;this.isIncorporatedInAustralia=r.observable().extend({component:{field:"Is the company incorporated in Australia?",dataType:a.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:function(){return e()===i.entityTypes.company.code&&t()}}}),this.subFieldsRequired=r.computed(function(){return n.isIncorporatedInAustralia()===a.common.No}),this.carriesOnBusinessInAustralia=r.observable().extend({component:{field:"Does the company carry on business in Australia?",dataType:a.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:this.subFieldsRequired}}),this.isCentralManagementInAustralia=r.observable().extend({component:{field:"Is the company's central management and control in Australia?",dataType:a.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:this.subFieldsRequired}}),this.votingControlledInAustralia=r.observable().extend({component:{field:"Is the company's voting power controlled by shareholders who are resident in Australia?",dataType:a.dataType.Lookup,dataSource:o.yesOrNo()},atoRequired:{onlyIf:this.subFieldsRequired}}),this.stepComplete=r.observable(!1)}}),define("viewmodels/documentmodels/ApplicationDetailsDocumentModel",["require","knockout","common/Constants","viewmodels/documentmodels/IndividualApplicationDetailsDocumentModel","viewmodels/documentmodels/CompanyApplicationDetailsDocumentModel"],function(e){var r=e("knockout"),t=e("common/Constants"),i=e("viewmodels/documentmodels/IndividualApplicationDetailsDocumentModel"),o=e("viewmodels/documentmodels/CompanyApplicationDetailsDocumentModel");return function(e){var n=this;this.entityType=e,n.showApplicationDetailsQuestions=r.observable(),this.individualApplicationDetails=r.observable(new i(e,n.showApplicationDetailsQuestions)),this.companyApplicationDetails=r.observable(new o(e,n.showApplicationDetailsQuestions)),this.entityType.subscribe(function(){n.entityType()===t.entityTypes.individual.code?(n.individualApplicationDetails(new i(e,n.showApplicationDetailsQuestions)),n.companyApplicationDetails(null)):n.entityType()===t.entityTypes.company.code&&(n.individualApplicationDetails(null),n.companyApplicationDetails(new o(e,n.showApplicationDetailsQuestions)))}),this.supportingDocumentsAttributes=r.observableArray().extend({component:{field:"Attach any documentation relevant to this application. (file types .doc, .docx, .rtf, .xls, .xlsx, .pdf, .jpg, .tif, .bmp, .png, or .gif)"}}),this.stepComplete=r.observable(!1),this.stepInProgress=r.observable(!1),this.hasPrintAttachments=!1,this.printAttachmentList=r.pureComputed(function(){var t="";return r.utils.arrayForEach(n.supportingDocumentsAttributes(),function(e){t+=e.Title()+" "}),n.hasPrintAttachments=""!==t,t}).extend({component:{field:"Supporting documents"}})}}),define("viewmodels/ApplicationDetails",["require","knockout","q","framework/AtoFramework","common/Constants","common/Common","common/Services","common/CalculationHelpers","framework/viewmodels/partials/ProcessMessageViewModel","../viewmodels/documentmodels/ApplicationDetailsDocumentModel"],function(e){var t=e("knockout"),n=e("q"),r=e("framework/AtoFramework"),i=e("common/Constants"),o=e("common/Common"),a=e("common/Services"),s=e("common/CalculationHelpers"),d=e("framework/viewmodels/partials/ProcessMessageViewModel"),l=e("../viewmodels/documentmodels/ApplicationDetailsDocumentModel"),c={spaTabs:t.observable(),tabPosition:t.observable(),spaTitle:t.observable(i.spaTitle),view:i.views.applicationdetails,title:t.observable(i.views.applicationdetails.title),constants:i,routeInfo:i.views.applicationdetails,supportingDocumentsFileService:a.FileService,attachment:i.attachment,displayApplicationDetailsQuestions:u,processMessageVM:t.observable(),formDM:t.observable(),documentModel:null,documentModelValidation:null,canActivate:function(){var e=r.State.get(i.documents.FormDocumentModel);return e&&e.vendorDetails().stepComplete()?(c.formDM(e),!0):{redirect:i.views.launch.route}},activate:function(){var e=c.formDM().applicationDetails();e||(e=new l(c.formDM().vendorDetails().entityType),c.formDM().applicationDetails(e));c.documentModel=e,c.documentModelValidation=t.validatedObservable(c.documentModel),c.processMessageVM(new d([c.documentModelValidation.isValid],!1)),c.processMessageVM().reset(),c.documentModel.showApplicationDetailsQuestions(u()),c.documentModel.stepInProgress(!0),o.setTabPosition(c,2,3),c.ektronPath=c.setEktronPath(c.formDM().vendorDetails().entityType())},tempViewResidencyToolResult:function(){s.determineResidency(c.documentModel.individualApplicationDetails())},back:function(){c.documentModel.stepInProgress(!1),r.Navigator.navigate(i.views.vendordetails.route)},next:function(){return c.processMessageVM().reset(),c.processMessageVM().submit(),c.processMessageVM().hasClientErrors()?(c.documentModelValidation.errors.showAllMessages(),n.fcall(function(){})):(c.documentModel.stepComplete(!0),c.documentModel.stepInProgress(!1),c.documentModel.entityType()===i.entityTypes.individual.code&&s.determineResidency(c.documentModel.individualApplicationDetails()),c.formDM().applicationDetails(c.documentModel),r.State.set(i.documents.FormDocumentModel,c.formDM()),r.Navigator.navigate(i.views.declaration.route))},ektronPath:null,setEktronPath:function(e){if(!c.documentModel.showApplicationDetailsQuestions())return i.taxonomyPaths.applicationDetails+"/Other";var t="";switch(e){case i.entityTypes.company.code:t="/Company";break;case i.entityTypes.individual.code:t="/Individual"}return i.taxonomyPaths.applicationDetails+t}};function u(){var e,t=c.formDM().vendorDetails();return-1!==[i.entityTypes.individual.code,i.entityTypes.company.code].indexOf(t.entityType())&&((e=t.vendorQuestions()).residencyStatus()===i.yesNoOptions.yes||e.lodgedTaxReturn()===i.yesNoOptions.no)}return c}),define("viewmodels/Confirmation",["require","knockout","framework/AtoFramework","../common/Constants"],function(e){var t=e("knockout"),n=e("framework/AtoFramework"),r=e("../common/Constants"),i={Constants:r,routeInfo:r.views.confirmation,ektronPath:r.taxonomyPaths.confirmation,spaTitle:t.observable(r.spaTitle),formDM:t.observable(),canActivate:function(){var e=n.State.get(r.documents.FormDocumentModel);return e&&e.confirmationReference()?(i.formDM(e),!0):{redirect:r.views.launch.route}},canDeactivate:function(){return n.State.remove(r.documents.FormDocumentModel),!0}};return i}),define("viewmodels/documentmodels/DeclarationDocumentModel",["require","knockout","../../common/Constants","framework/viewmodels/partials/ProcessMessageViewModel"],function(e){var t=e("knockout"),n=e("../../common/Constants"),r=e("framework/viewmodels/partials/ProcessMessageViewModel");return function(){var e=this;e.isIndividualDeclaration=t.observable(!1),e.captcha=t.observable(!1).extend({component:{field:"reCaptcha"},atoRequired:!0}),e.grecaptchaClientID=t.observable(0),e.declarationIndividual=t.observable().extend({component:{field:"I declare that I am authorised to complete this form and the information contained in this form is true and correct",errorLabel:"Declaration"},atoRequired:{onlyIf:function(){return e.isIndividualDeclaration()},message:n.validationMessages.declarationCheckedRequired}}),e.declarationAgent=t.observable().extend({component:{field:"I declare that:",errorLabel:"Declaration"},atoRequired:{onlyIf:function(){return!e.isIndividualDeclaration()},message:n.validationMessages.declarationCheckedRequired}}),e.stepComplete=t.observable(!1),e.validation=t.validatedObservable(e),e.isValid=e.validation.isValid,e.processMessageVM=new r([e.validation.isValid],!1)}}),define("viewmodels/documentmodels/generated/oTH_FRW_CLEARANCE_CERTIFICATE",["knockout"],function(t){function e(e){this.fRW_CLR_CERT_APP_TYPE_ApplicationTypeApplicationSubmissionRoleTypeIndicator=t.observable().extend({sId:11339,fId:21489,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_TYPE_ApplicationTypeBusinessEventReceiptID=t.observable().extend({sId:11339,fId:21505,type:"Char",maxLength:13}),this.fRW_CLR_CERT_APP_TYPE_ClearanceCertificateApplicationStatusCode=t.observable().extend({sId:11339,fId:21509,type:"Char",maxLength:3,valCV:"GRP-CLEARANCE-CERT-STATUS"}),this.fRW_CLR_CERT_APP_TYPE_ApplicationTypeCorrespondenceTriggeredIndicator=t.observable().extend({sId:11339,fId:23500,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_TYPE_ForeignInvestmentTransactionContractDate=t.observable().extend({sId:11339,fId:16578,type:"Date",maxLength:10,valD:!0}),this.fRW_CLR_CERT_APP_TYPE_ApplicationTypeSettlementDate=t.observable().extend({sId:11339,fId:21510,type:"Date",maxLength:10,valD:!0}),this.fRW_CLR_CERT_APP_TYPE_ApplicationTypeApplicationReceiptDate=t.observable().extend({sId:11339,fId:21515,type:"Date",maxLength:10,valD:!0}),this.fRW_CLR_CERT_APP_TYPE_ApplicationTypeClearanceCertificateExpiryDate=t.observable().extend({sId:11339,fId:21516,type:"Date",maxLength:10,valD:!0}),this.fRW_CLR_CERT_APP_TYPE_ApplicationTypeIndividualIncomeTaxReturnLodgedIndicator=t.observable().extend({sId:11339,fId:21520,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyScopeClientResidentIndicator=t.observable().extend({sId:10335,fId:23507,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientResidentIndicator=t.observable().extend({sId:10335,fId:23508,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyIndividualDeceasedBeforeThresholdIndicator=t.observable().extend({sId:10335,fId:23509,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_IncomeTaxFurtherReturnNotNecessaryIndicator=t.observable().extend({sId:10335,fId:23510,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientMigratingToAustraliaIndicator=t.observable().extend({sId:10335,fId:23511,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientReturningAustralianIndicator=t.observable().extend({sId:10335,fId:23519,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientStayedInAustraliaThresholdIndicator=t.observable().extend({sId:10335,fId:23581,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientSocialEconomicTiesOutsideAustraliaIndicator=t.observable().extend({sId:10335,fId:23612,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyResidencyMainPurposeCode=t.observable().extend({sId:10335,fId:23651,type:"Char",maxLength:3,valCV:"GRP-RESIDENCY-MAIN-PURPOSE"}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyResidencyMainPurposeWeightingNumber=t.observable().extend({sId:10335,fId:23664,type:"SmallInteger",maxLength:8,valQ:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientStayedInParticularPlaceThreasholdIndicator=t.observable().extend({sId:10335,fId:23665,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientStayedInParticularPlaceThreasholdWeightingNumber=t.observable().extend({sId:10335,fId:23666,type:"SmallInteger",maxLength:8,valQ:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyResidencySituationTypeCode=t.observable().extend({sId:10335,fId:23668,type:"Char",maxLength:3,valCV:"GRP-RESIDENCY-LOCATION"}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyResidencySituationWeightingNumber=t.observable().extend({sId:10335,fId:23672,type:"SmallInteger",maxLength:8,valQ:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientSpouseChildDependantIndicator=t.observable().extend({sId:10335,fId:23727,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientSpouseChildDependantWeigtingNumber=t.observable().extend({sId:10335,fId:23729,type:"SmallInteger",maxLength:8,valQ:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientSpouseChildDependentLocationCode=t.observable().extend({sId:10335,fId:23737,type:"Char",maxLength:3,valCV:"GRP-RESIDENCY-FAM-LOCATION"}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientSpouseChildDependentLocationWeightingNumber=t.observable().extend({sId:10335,fId:23738,type:"SmallInteger",maxLength:8,valQ:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyAssetMajorityInAustraliaIndicator=t.observable().extend({sId:10335,fId:23739,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyAssetMajorityInAustraliaWeightageNumber=t.observable().extend({sId:10335,fId:23741,type:"SmallInteger",maxLength:8,valQ:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientOrganisationMemberIndicator=t.observable().extend({sId:10335,fId:23742,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyClientOrganisationMemberWeightingNumber=t.observable().extend({sId:10335,fId:23743,type:"SmallInteger",maxLength:8,valQ:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyResidencyInAustraliaGreaterThanThresholdIndicator=t.observable().extend({sId:10335,fId:23751,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyResidencyNormallyOutsideAustraliaIndicator=t.observable().extend({sId:10335,fId:23752,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyResidencyIntendingInAustraliaIndicator=t.observable().extend({sId:10335,fId:23754,type:"Indicator",maxLength:1,valI:!0}),this.fRW_RESIDENCY_TAX_STATUS_ResidencyResidencyScopePositiveWeightingIndicator=t.observable().extend({sId:10335,fId:23755,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsIndividualTitleTypeCode=t.observable().extend({sId:11345,fId:21523,type:"Char",maxLength:3,valCV:"GRP-TITLE-02"}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsStructuredGivenName=t.observable().extend({sId:11345,fId:21525,type:"Char",valNameG:!0,maxLength:40}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsStructuredFamilyName=t.observable().extend({sId:11345,fId:21526,type:"Char",maxLength:40}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsPostionHeldText=t.observable().extend({sId:11345,fId:21527,type:"Char",maxLength:100}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsBusinessHoursPhoneNumber=t.observable().extend({sId:11345,fId:21529,type:"Char",maxLength:15}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsInternetEmailAddress=t.observable().extend({sId:11345,fId:21532,type:"Char",maxLength:200}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsSemiStructuredGeographicAddressLine1=t.observable().extend({sId:11345,fId:21534,type:"Char",maxLength:38}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsSemiStructuredGeographicAddressLine2=t.observable().extend({sId:11345,fId:21538,type:"Char",maxLength:38}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsStructuredGeographicAddressLocalityName=t.observable().extend({sId:11345,fId:21541,type:"Char",maxLength:60}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsCountryCode=t.observable().extend({sId:11345,fId:21546,type:"Char",maxLength:3,valCV:"GRP-COUNTRY-CODES"}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsStructuredGeographicAddressStateCode=t.observable().extend({sId:11345,fId:21548,type:"Char",maxLength:3}),this.fRW_CLR_CERT_REP_DET_RepresentativeDetailsStructuredGeographicAddressPostcode=t.observable().extend({sId:11345,fId:21549,type:"Char",maxLength:12}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsClientIdentifierTaxFileNumber=t.observable().extend({sId:11346,fId:21551,type:"Char",maxLength:12}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsClientIdentifierAustralianBusinessNumber=t.observable().extend({sId:11346,fId:21580,type:"Char",maxLength:12,valId:"ABN"}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsClientIdentifierAustralianTaxationOfficeReferenceNumber=t.observable().extend({sId:11346,fId:10615,type:"Char",maxLength:12,valId:"ARN"}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsEntityTypeCode=t.observable().extend({sId:11346,fId:21581,type:"Char",maxLength:3,valCV:"GRP-FRW-ENTITY-TYPE"}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsEntityTypeDescription=t.observable().extend({sId:11346,fId:22711,type:"Char",maxLength:60}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsIndividualTitleTypeCode=t.observable().extend({sId:11346,fId:21582,type:"Char",maxLength:3,valCV:"GRP-TITLE-02"}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsIndividualBirthDayNumber=t.observable().extend({sId:11346,fId:21583,type:"Char",maxLength:2}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsIndividualBirthMonthNumber=t.observable().extend({sId:11346,fId:21585,type:"Char",maxLength:2}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsIndividualBirthYear=t.observable().extend({sId:11346,fId:21586,type:"Year",maxLength:4,valY:!0}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsAustralianBusinessRegisterAuthenticationOrganisationLegalName=t.observable().extend({sId:11346,fId:21594,type:"Char",maxLength:200}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsTrusteeUnstructuredFullName=t.observable().extend({sId:11346,fId:21595,type:"Char",maxLength:200}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsUnstructuredFullName=t.observable().extend({sId:11346,fId:24681,type:"Char",maxLength:200}),this.fRW_CLR_CERT_VDR_DET_VendorEntityDetailsUnstructuredFullName=t.observable().extend({sId:11346,fId:21602,type:"Char",maxLength:200}),this.fRW_CLR_CERT_VDR_DET_VendorTradingNameAustralianBusinessRegisterAuthenticationOrganisationTradingName=t.observable().extend({sId:11346,fId:21622,type:"Char",maxLength:200}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsStructuredGivenName=t.observable().extend({sId:11346,fId:21627,type:"Char",valNameG:!0,maxLength:40}),this.fRW_CLR_CERT_VDR_DET_VendorStructuredOtherGivenName=t.observable().extend({sId:11346,fId:16848,type:"Char",maxLength:40}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsStructuredFamilyName=t.observable().extend({sId:11346,fId:21642,type:"Char",valNameF:!0,maxLength:40}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsPostionHeldText=t.observable().extend({sId:11346,fId:21643,type:"Char",maxLength:100}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsBusinessHoursPhoneNumber=t.observable().extend({sId:11346,fId:21645,type:"Char",maxLength:15}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsInternetEmailAddress=t.observable().extend({sId:11346,fId:21650,type:"Char",email:!0,maxLength:200}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsSemiStructuredGeographicAddressLine1=t.observable().extend({sId:11346,fId:21652,type:"Char",valAddrL1:!0,maxLength:38}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsSemiStructuredGeographicAddressLine2=t.observable().extend({sId:11346,fId:21655,type:"Char",valAddrL2:!0,maxLength:38}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsStructuredGeographicAddressLocalityName=t.observable().extend({sId:11346,fId:21656,type:"Char",valAddrSTL:!0,maxLength:60}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsCountryCode=t.observable().extend({sId:11346,fId:21658,type:"Char",valAddrC:!0,maxLength:3,valCV:"GRP-COUNTRY-CODES"}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsStructuredGeographicAddressStateCode=t.observable().extend({sId:11346,fId:21659,type:"Char",valAddrS:!0,maxLength:3}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsStructuredGeographicAddressPostcode=t.observable().extend({sId:11346,fId:21662,type:"Char",valAddrPC:!0,maxLength:12}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsClientResidencyStatusChangedIndicator=t.observable().extend({sId:11346,fId:21663,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsIncomeTaxReturnLodgedWithinThresholdIndicator=t.observable().extend({sId:11346,fId:21666,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_VDR_DET_VendorDetailsNonResidentPropertyHeldIndicator=t.observable().extend({sId:11346,fId:21672,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsCompanyIncorporatedInAustraliaIndicator=t.observable().extend({sId:11348,fId:21673,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsCompanyCarryOnBusinessInAustraliaIndicator=t.observable().extend({sId:11348,fId:21674,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsCompanyCentralManagementControlInAustraliaIndicator=t.observable().extend({sId:11348,fId:21675,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsCompanyShareholderVotingContolledInAustraliaIndicator=t.observable().extend({sId:11348,fId:21676,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsUnitTrustIndictor=t.observable().extend({sId:11348,fId:21678,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsTrustPropertyInAustraliaIndicator=t.observable().extend({sId:11348,fId:21679,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsTrustCarryOnBusinessInAustraliaIndicator=t.observable().extend({sId:11348,fId:21680,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsTrustCentralManagementInAustraliaIndicator=t.observable().extend({sId:11348,fId:21688,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsTrustBeneficialInterestGreaterThanThresholdIndicator=t.observable().extend({sId:11348,fId:21691,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsClientResidentIndicator=t.observable().extend({sId:11348,fId:21699,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsAustralianSuperannuationFundStatusIndicator=t.observable().extend({sId:11348,fId:24122,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsSelfManagedSuperannuationFundAustralianEstablishedConditionMetIndicator=t.observable().extend({sId:11348,fId:21704,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsSelfManagedSuperannuationFundCentralManagementConditionMetIndicator=t.observable().extend({sId:11348,fId:21706,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsSelfManagedSuperannuationFundActiveMemberIndicator=t.observable().extend({sId:11348,fId:21712,type:"Indicator",maxLength:1,valI:!0}),this.fRW_CLR_CERT_APP_DET_ApplicationDetailsSelfManagedSuperannuationFundActiveMemberConditionMetIndicator=t.observable().extend({sId:11348,fId:21716,type:"Indicator",maxLength:1,valI:!0}),this.dOCUMENT_ATTACHMENTS_SectionGroup1s=t.observableArray(),this.processMessages=t.observableArray(),e&&this.mapTo(e)}return e.prototype.dOCUMENT_ATTACHMENTS_SectionGroup1=function(){this.dOCUMENT_ATTACHMENTS_AttachmentID=t.observable(arguments[0]).extend({sId:10747,fId:14717,type:"Char",maxLength:36}),this.dOCUMENT_ATTACHMENTS_AttachmentType=t.observable(arguments[1]).extend({sId:10747,fId:14718,type:"Char",maxLength:3,valCV:"GRP-ATTACH-TYPE"}),this.dOCUMENT_ATTACHMENTS_AttachmentDate=t.observable(arguments[2]).extend({sId:10747,fId:15757,type:"Date",maxLength:10,valD:!0}),this.dOCUMENT_ATTACHMENTS_AttachmentFileName=t.observable(arguments[3]).extend({sId:10747,fId:16443,type:"Char",maxLength:200})},e.prototype.processMessage=function(){this.Id=t.observable(""),this.Severity=t.observable(0),this.MessageFieldName=t.observable(""),this.Message=t.observable(""),this.FdfSectionId=t.observable(""),this.FdfFieldSequence=t.observable(""),this.RuleId=t.observable(0)},e.prototype.newSG=function(e){var t=this[e+"s"];if(void 0===t)throw new Error("Unknown section group: "+e);var n=this[e],r=new(Function.prototype.bind.apply(n,arguments));return t.push(r),r},e.prototype.addSG=function(e,t){var n=this[e+"s"];if(void 0===n)throw new Error("Unknown section group: "+e);return n.push(t),t},e.prototype.deleteSG=function(e,t){var n=this[e+"s"];if(void 0===n)throw new Error("Unknown section group: "+e);var r="object"==typeof t?n.indexOf(t):t;0<=r&&n.splice(r,1)},e.prototype.mapTo=function(e){this.coreProcessingTransactionId=e.coreProcessingTransactionId,this.coreProcessingTransactionStatusCode=e.coreProcessingTransactionStatusCode,this.coreProcessingTransactionLastUpdatedSourceCode=e.coreProcessingTransactionLastUpdatedSourceCode,this.coreProcessingTransactionLastUpdatedById=e.coreProcessingTransactionLastUpdatedById,this.coreProcessingTransactionLastUpdatedDate=e.coreProcessingTransactionLastUpdatedDate,this.coreProcessingTransactionTypeCode=e.coreProcessingTransactionTypeCode,this.fdfFormId=e.fdfFormId,this.formType=e.formType,this.clientInternalId=e.clientInternalId,this.clientAccountId=e.clientAccountId,this.clientRoleTypeCode=e.clientRoleTypeCode,this.clientAccountSequenceNumber=e.clientAccountSequenceNumber,this.formYear=e.formYear,this.formMonthNumber=e.formMonthNumber,this.formPeriodBeginDate=e.formPeriodBeginDate,this.formPeriodEndDate=e.formPeriodEndDate,this.channelTypeCode=e.channelTypeCode,this.formReceivedDate=e.formReceivedDate,this.formCompletedDate=e.formCompletedDate,this.sourceCoreProcessingTransactionId=e.sourceCoreProcessingTransactionId,this.originalReturnCoreProcessingTransactionId=e.originalReturnCoreProcessingTransactionId,this.coreProcessingTransactionLastUpdatedReasonCode=e.coreProcessingTransactionLastUpdatedReasonCode,this.documentId=e.documentId,this.documentTypeCode=e.documentTypeCode,this.formStatusCode=e.formStatusCode,this.formBatchId=e.formBatchId,this.caseId=e.caseId,this.suspendedTransactionHeaderStatusCode=e.suspendedTransactionHeaderStatusCode;for(var t,n,r,i,o,a,s,d,l,c={},u=e.formLineItems,p=0,m=u.length;p{var t=[],n=(e.fdfFormId=a.codes.formTransactionId,e.mapFrom(s.modelContracts));return t.push({data:n}),t})(e),n=p.formDM().grecaptchaClientID(),u.processForm(t,n).then(function(e){var n;p.processMessageVM().wasServiceRequestSuccessful(e.processMessages)?(p.formDM().formDateSubmitted(i.getCurrentMoment().format(o.defaultDateFormat)),p.formDM().confirmationReference(e.coreProcessingTransactionId),r.State.set(a.documents.FormDocumentModel,p.formDM()),r.Navigator.navigate(a.views.confirmation.route)):(n=["92113","96477","90557","90558","14102"],e.processMessages.some(function(t){return n.some(function(e){return e===t.id})})&&r.Navigator.navigate(a.views.unabletoprocess.route))}).fail(r.ErrorHandler.handlePromiseRejection("Submit:submit"))}},back:function(){return r.Navigator.navigate(a.views.applicationdetails.route)},isIndividualCompletingForm:t.computed({read:f,deferEvaluation:!0})};function m(){return window.grecaptcha.render("captchaContainer",{sitekey:window.ato.recaptchaSiteKey,callback:function(){p.documentModel.captcha(!0)},"expired-callback":function(){p.documentModel.captcha(!1)}})}function f(){var e=p.formDM(),t=e.vendorDetails();return!!t&&t.entityType()===a.entityTypes.individual.code&&e.applicantType().isVendor()===a.yesNoOptions.yes}return p}),define("viewmodels/documentmodels/ApplicantContactDocumentModel",["require","knockout","framework/AtoFramework","../../common/Constants","../../common/RefData"],function(e){var n=e("knockout"),r=e("framework/AtoFramework"),i=e("../../common/Constants"),o=e("../../common/RefData");return function(e){var t=this;this.title=n.observable().extend({component:{field:"Title",priorityLabel:"Title",dataType:r.Constants.dataType.Lookup,dataSourceConfig:{rowItems:o.cdn.generic.subsets.ATOTITLE.rowItems},caption:"Select"}}),this.firstName=n.observable().extend({component:{field:"First name",maxLength:41},atoNameIndividual:{}}),this.otherGivenName=n.observable().extend({component:{field:"Other given names",maxLength:41},atoNameIndividual:{}}),this.lastName=n.observable().extend({component:{field:"Last name",maxLength:41},atoNameIndividual:{},atoRequired:!0}),this.jobTitle=n.observable().extend({component:{field:"Job title",maxLength:101},atoMaxLength:{length:100},atoIsAlphaNumericSpaceAndGivenSymbolsOnly:{symbols:i.validationSymbols}}),this.dob=n.observable().extend({component:{field:"Date of birth",dataFormat:r.Constants.dataType.dataFormat},atoRequired:{onlyIf:function(){return e()===i.entityTypes.individual.code}},atoDateOfBirth:{}}),this.emailChk=n.observable(!1).extend({component:{field:"Contact email address (preferred)"}}),this.phoneNumberChk=n.observable(!1).extend({component:{field:"Contact phone number"}}),this.contactSelector=n.observable().extend({component:{field:"Provide at least one contact option",dataSource:n.observableArray([t.emailChk,t.phoneNumberChk])}}),this.emailChkSelected=n.pureComputed(function(){return t.emailChk()}),this.phoneNumberChkSelected=n.pureComputed(function(){return t.phoneNumberChk()}),this.email=n.observable().extend({component:{field:"Contact email address (preferred)",maxLength:201},atoMaxLength:{length:200},atoEmail:{},atoRequired:{onlyIf:t.emailChk}}),this.phoneNumber=n.observable().extend({component:{field:"Contact phone number",maxLength:16},atoPhoneNumber:{},atoRequired:{onlyIf:t.phoneNumberChk}})}}),define("viewmodels/documentmodels/CompanyEntityDocumentModel",["require","knockout","../../common/Constants","./ApplicantContactDocumentModel"],function(e){var t=e("knockout"),n=e("../../common/Constants"),r=e("./ApplicantContactDocumentModel");return function(e){this.name=t.observable().extend({component:{field:"Company name",maxLength:201},atoMaxLength:{length:200},atoIsAlphaNumericSpaceAndGivenSymbolsOnly:{symbols:n.validationSymbols},atoRequired:{onlyIf:function(){return e()===n.entityTypes.company.code}}}),this.tradingName=t.observable().extend({component:{field:"Business name (if applicable)",maxLength:201},atoMaxLength:{length:200},atoIsAlphaNumericSpaceAndGivenSymbolsOnly:{symbols:n.validationSymbols}}),this.holdingCompany=t.observable().extend({component:{field:"Ultimate holding company",maxLength:201},atoMaxLength:{length:200},atoIsAlphaNumericSpaceAndGivenSymbolsOnly:{symbols:n.validationSymbols}}),this.contactDetails=t.observable(new r(e))}}),define("viewmodels/documentmodels/IndividualEntityDocumentModel",["require","knockout","./ApplicantContactDocumentModel"],function(e){var t=e("knockout"),n=e("./ApplicantContactDocumentModel");return function(e){this.contactDetails=t.observable(new n(e))}}),define("viewmodels/documentmodels/OtherEntityDocumentModel",["require","knockout","../../common/Constants","./ApplicantContactDocumentModel"],function(e){var t=e("knockout"),n=e("../../common/Constants"),r=e("./ApplicantContactDocumentModel");return function(e){this.name=t.observable().extend({component:{field:"Entity name",maxLength:201},atoRequired:{onlyIf:function(){return e()===n.entityTypes.other.code}},atoMaxLength:{length:200},atoIsAlphaNumericSpaceAndGivenSymbolsOnly:{symbols:n.validationSymbols}}),this.tradingName=t.observable().extend({component:{field:"Business name (if applicable)",maxLength:201},atoMaxLength:{length:200},atoIsAlphaNumericSpaceAndGivenSymbolsOnly:{symbols:n.validationSymbols}}),this.contactDetails=t.observable(new r(e))}}),define("framework/documentmodels/AddressDocumentModel",["knockout","framework/AtoFramework","framework/common/Constants","framework/viewmodels/partials/ProcessMessageViewModel"],function(s,d,l,c){return function(e,t,n,r,i,o){var a=this;if(void 0===e)throw new Error("AddressDocumentModel: countryCodes parameter required");if(void 0===t)throw new Error("AddressDocumentModel: stateCodes parameter required");n=n||l.countryCodes.Australia,r=r||l.countryCodes.Other,o=o||{},a.isPostalAddress=s.observable(!1),a.isReadOnly=s.observable(!1),a.isRequired=s.observable(!0),a.useCountrySearch=s.observable(!1),a.isSearchConfigured=s.observable(!0),a.userEnteredSearchSelected=s.observable(!1),a.verifiedAddressIsInvalid=s.observable(!1),a.serviceCallFailed=s.observable(!1),a.addressSearchItem=s.observable(),a.countryCode=s.observable(),a.countryCodeSearch=s.observable(),a.isPostCodeRequired=s.observable(!1),a.enableStateCodeInSuburbValidation=s.observable(!1),a.structuredGeographicAddressOtherCountryName=s.observable(),a.semiStructuredGeographicAddressLine1=s.observable(),a.semiStructuredGeographicAddressLine2=s.observable(),a.structuredGeographicAddressLocalityName=s.observable(),a.structuredGeographicAddressStateCode=s.observable(),a.structuredGeographicAddressPostcode=s.observable(),a.hasCountryCode=s.pureComputed(function(){return void 0!==a.countryCode()&&""!==a.countryCode()}),a.isCountryAustralia=s.pureComputed(function(){return+a.countryCode()==+n}),a.isCountryInternational=s.pureComputed(function(){return!a.isCountryAustralia()&&a.hasCountryCode()}),a.isCountryOther=s.pureComputed(function(){return+a.countryCode()==+r}),a.isSearchEnabled=s.pureComputed(function(){return!a.isReadOnly()&&a.isSearchConfigured()&&a.isCountryAustralia()}),a.isAddressEditable=s.pureComputed(function(){return a.isCountryInternational()||a.isCountryAustralia()&&!a.isSearchEnabled()||a.userEnteredSearchSelected()}),a.getCountryName=function(){return a.isCountryOther()?a.structuredGeographicAddressOtherCountryName():a.countryCode.desc()},a.countryCode.subscribe(function(){d.Utilities.resetObservable(a.structuredGeographicAddressOtherCountryName),d.Utilities.resetObservable(a.semiStructuredGeographicAddressLine1),d.Utilities.resetObservable(a.semiStructuredGeographicAddressLine2),d.Utilities.resetObservable(a.structuredGeographicAddressLocalityName),d.Utilities.resetObservable(a.structuredGeographicAddressStateCode),d.Utilities.resetObservable(a.structuredGeographicAddressPostcode)}),a.addressSearchItem.extend({component:{field:"Search address",placeholderText:"e.g. level 15 100 Miller St North Sydney NSW 2060",errorGroup:i},atoRequired:{onlyIf:function(){return(a.isRequired()||a.hasCountryCode())&&!a.isAddressEditable()&&!a.semiStructuredGeographicAddressLine1()}},atoAddressSearch:{}}),a.semiStructuredGeographicAddressLine1.extend({component:{field:"Address line 1",maxLength:38,errorGroup:i},atoRequired:{onlyIf:function(){return(a.isRequired()||a.hasCountryCode())&&a.isAddressEditable()}},atoAddressLine:{},atoNoNumbersSpaceHypenForwardSlash:{},atoNoTripleConsecutiveNonNumericChars:{},atoNoMultipleConsecutiveSpecialChars:{},atoNoPostOfficeReference:{onlyIf:function(){return!a.isPostalAddress()}},atoNoCareOf:{onlyIf:function(){return!a.isPostalAddress()}},atoDoesNotOnlyContainAsAbove:{}}),a.semiStructuredGeographicAddressLine2.extend({component:{field:"Address line 2",maxLength:38,errorGroup:i},atoRequired:{onlyIf:function(){return a.isPostalAddress()&&void 0!==a.semiStructuredGeographicAddressLine1()&&d.Constants.regEx.startsWithCareOf.test(a.semiStructuredGeographicAddressLine1())}},atoAddressLine:{},atoNoNumbersSpaceHypenForwardSlash:{},atoNoTripleConsecutiveNonNumericChars:{},atoNoMultipleConsecutiveSpecialChars:{},atoNoPostOfficeReference:{onlyIf:function(){return!a.isPostalAddress()||a.isPostalAddress()&&!d.Constants.regEx.startsWithCareOf.test(a.semiStructuredGeographicAddressLine1())},message:function(){return a.isPostalAddress()?"Address line 2 cannot contain a post office reference unless Address line 1 contains 'care of'":d.Constants.validationMessage.address.noPOReference}},atoNoCareOf:{message:"Address line 2 cannot contain a 'care of'"},atoDoesNotOnlyContainAsAbove:{},validation:{validator:function(e){return!e||e.toUpperCase()!==a.structuredGeographicAddressLocalityName().toUpperCase()},onlyIf:function(){return a.isPostalAddress()&&a.structuredGeographicAddressLocalityName()},message:"Address line 2 cannot match Suburb/town/province/locality"}}),a.structuredGeographicAddressLocalityName.extend({component:{field:"Suburb/town/province/locality",maxLength:46,errorGroup:i},atoRequired:{onlyIf:function(){return(a.isRequired()||a.hasCountryCode())&&a.isAddressEditable()}},atoSuburb:o,atoNoStateCodeInSuburb:{onlyIf:function(){return a.enableStateCodeInSuburbValidation()}},atoNoTripleConsecutiveNonNumericChars:{},atoNoConsecutiveSymbols:{symbols:"'- ",onlyIf:function(){return a.isPostalAddress()},message:"Must not contain 2 or more repeated consecutive hyphens, apostrophes or spaces"}}),a.countryCode.extend({component:{field:"Country",maxLength:3,dataType:d.Constants.dataType.Lookup,dataSourceConfig:e,formatFunc:a.getCountryName,errorGroup:i},atoRequired:{onlyIf:function(){return a.isRequired()&&!a.useCountrySearch()}}}),a.countryCodeSearch.extend({component:{field:"Country",formatFunc:a.getCountryName,errorGroup:i,placeholderText:l.common.countryPlaceholder},atoRequired:{onlyIf:function(){return a.isRequired()&&a.useCountrySearch()}},validation:{validator:function(e){return!e||void 0!==a.countryCode()},message:"Country not found. Search again."}}),a.structuredGeographicAddressStateCode.extend({component:{field:"State/territory",dataType:d.Constants.dataType.Lookup,dataSourceConfig:t,errorGroup:i},atoRequired:{onlyIf:function(){return a.isCountryAustralia()&&(a.isRequired()||a.hasCountryCode())&&a.isAddressEditable()}}}),a.structuredGeographicAddressPostcode.extend({component:{field:"Postcode/area code/zip code",maxLength:s.pureComputed(function(){return a.isCountryAustralia()?4:12}),errorGroup:i},atoRequired:{onlyIf:function(){return a.isCountryAustralia()&&(a.isRequired()||a.hasCountryCode())&&a.isAddressEditable()||a.isPostCodeRequired()}},atoPostCodeAustralian:{onlyIf:function(){return a.isCountryAustralia()}},atoPostCodeForeign:{onlyIf:function(){return!a.isCountryAustralia()}}}),a.LabelCalc=s.computed(function(){a.isCountryAustralia()?(a.structuredGeographicAddressLocalityName.label("Suburb/town"),a.structuredGeographicAddressPostcode.label("Postcode")):(a.structuredGeographicAddressLocalityName.label("Suburb/town/province/locality"),a.structuredGeographicAddressPostcode.label("Postcode/area code/zip code"))}),a.structuredGeographicAddressOtherCountryName.extend({component:{field:"If other, specify here",maxLength:20,errorGroup:i},atoRequired:{onlyIf:function(){return a.isCountryOther()}},atoCountryName:{}}),a.Validation=s.validatedObservable(a),a.processMessageViewModel=new c([a.Validation.isValid],!1)}}),define("viewmodels/documentmodels/RepresentativeDetailsDocumentModel",["require","framework/common/Constants","framework/documentmodels/AddressDocumentModel","framework/viewmodels/partials/ProcessMessageViewModel","knockout","../../common/Constants","../../common/Common","../../common/RefData"],function(e){var t=e("framework/common/Constants"),n=e("framework/documentmodels/AddressDocumentModel"),r=e("framework/viewmodels/partials/ProcessMessageViewModel"),i=e("knockout"),o=e("../../common/Constants"),a=e("../../common/Common"),s=e("../../common/RefData");return function(){var e=this;e.title=i.observable().extend({component:{field:"Title",dataType:t.dataType.Lookup,dataSourceConfig:s.cdn.generic.subsets.ATOTITLE}}),e.firstName=i.observable().extend({component:{field:"First name",maxLength:41},atoNameIndividual:{}}),e.lastName=i.observable().extend({component:{field:"Last name",maxLength:41},atoNameIndividual:{},atoRequired:!0}),e.jobTitle=i.observable().extend({component:{field:"Job title",maxLength:101},atoMaxLength:{length:100},atoIsAlphaNumericSpaceAndGivenSymbolsOnly:{symbols:o.validationSymbols}}),e.email=i.observable().extend({component:{field:"Contact email address",maxLength:201},atoMaxLength:{length:200},atoEmail:{}}),e.contactPhoneNumber=i.observable().extend({component:{field:"Contact phone number",maxLength:16},atoMaxLength:{length:15},atoPhoneNumber:{}}),e.address=i.observable(new n(s.cdn.TC1COUNTR,s.cdn.TC1STATE)),e.address().isSearchConfigured(!1),e.readOnlyAddress=i.pureComputed(function(){return a.readOnlyAddress(e.address())}).extend({component:{field:"Address",dataType:t.dataType.HTML}}),e.stepComplete=i.observable(!1),e.validation=i.validatedObservable(e),e.isValid=e.validation.isValid,e.processMessageVM=new r([e.validation.isValid],!1)}}),define("viewmodels/documentmodels/VendorDetailsQuestionsDocumentModel",["require","knockout","common/Constants"],function(e){var t=e("knockout"),n=e("common/Constants");return function(e){this.residencyStatus=t.observable().extend({component:{field:"Has your residency status changed since your last tax return or will it change before you sell the property?",dataSource:[{code:n.yesNoOptions.yes,desc:"Yes"},{code:n.yesNoOptions.no,desc:"No"}]},atoRequired:{onlyIf:function(){return!!e()}}}),this.lodgedTaxReturn=t.observable().extend({component:{field:"Have you lodged a tax return for the last two years?",dataSource:[{code:n.yesNoOptions.yes,desc:"Yes"},{code:n.yesNoOptions.no,desc:"No"}]},atoRequired:{onlyIf:function(){return!!e()}}}),this.propertyOwnership=t.observable().extend({component:{field:"Are you holding the property on behalf of a foreign resident or on behalf of other entities that include a foreign resident?",dataSource:[{code:n.yesNoOptions.yes,desc:"Yes"},{code:n.yesNoOptions.no,desc:"No"}]},atoRequired:{onlyIf:function(){return!!e()}}})}}),define("viewmodels/documentmodels/VendorDetailsDocumentModel",["require","knockout","framework/common/Constants","framework/AtoFramework","../../common/Common","../../common/Constants","../../common/RefData","framework/documentmodels/AddressDocumentModel","./IndividualEntityDocumentModel","./CompanyEntityDocumentModel","./OtherEntityDocumentModel","./VendorDetailsQuestionsDocumentModel"],function(e){var t=e("knockout"),r=e("framework/common/Constants"),i=e("framework/AtoFramework"),o=e("../../common/Common"),a=e("../../common/Constants"),s=e("../../common/RefData"),d=e("framework/documentmodels/AddressDocumentModel"),l=e("./IndividualEntityDocumentModel"),c=e("./CompanyEntityDocumentModel"),u=e("./OtherEntityDocumentModel"),p=e("./VendorDetailsQuestionsDocumentModel");return function(){var n=this;this.tfn=t.observable().extend({component:{field:"Tax file number (TFN)",maxLength:12},atoTFN:{}}),this.abn=t.observable().extend({component:{field:"Australian business number (ABN)",maxLength:15},atoABN:{}}),this.entityType=t.observable().extend({component:{field:"Entity type",priorityLabel:"Entity type",dataType:i.Constants.dataType.Lookup,dataSourceConfig:{rowItems:s.getEntityTypes()},caption:"Select"},atoRequired:!0}),this.entityType.subscribe(function(e){var t;switch((t=n).address(new d(s.cdn.TC1COUNTR,s.cdn.TC1STATE)),t.address().isSearchConfigured(!1),t.vendorQuestions(new p(t.entityType)),e){case a.entityTypes.company.code:n.individualEntity(null),n.otherEntity(null),n.companyEntity(new c(n.entityType));break;case a.entityTypes.individual.code:n.companyEntity(null),n.otherEntity(null),n.individualEntity(new l(n.entityType));break;case a.entityTypes.other.code:n.individualEntity(null),n.companyEntity(null),n.otherEntity(new u(n.entityType))}}),this.address=t.observable(new d(s.cdn.TC1COUNTR,s.cdn.TC1STATE)),this.address().isSearchConfigured(!1),this.readOnlyAddress=t.pureComputed(function(){return o.readOnlyAddress(n.address())}).extend({component:{field:"Address",dataType:r.dataType.HTML}}),this.vendorQuestions=t.observable(new p(this.entityType)),this.individualEntity=t.observable(),this.companyEntity=t.observable(),this.otherEntity=t.observable(),this.stepComplete=t.observable(!1)}}),define("viewmodels/PrintViewForm",["durandal/app","framework/AtoFramework","../common/Common","../common/Constants","../common/progressSteps"],function(e,t,n,r,i){var o={Common:n,Constants:r,ProgressSteps:i,activate:function(){o.formDocumentModel=t.State.get(r.documents.FormDocumentModel)},compositionComplete:function(){e.trigger("printCompositionComplete")},ektronPath:r.taxonomyPaths.confirmation};return o}),define("viewmodels/RepresentativeDetails",["require","q","framework/AtoFramework","knockout","../common/Constants","../common/Common","framework/viewmodels/partials/ProcessMessageViewModel","../viewmodels/documentmodels/RepresentativeDetailsDocumentModel"],function(e){var t=e("q"),n=e("framework/AtoFramework"),r=e("knockout"),i=e("../common/Constants"),o=e("../common/Common"),a=e("framework/viewmodels/partials/ProcessMessageViewModel"),s=e("../viewmodels/documentmodels/RepresentativeDetailsDocumentModel"),d={spaTitle:r.observable(i.spaTitle),spaTabs:o.spaTabs(),Constants:i,routeInfo:i.views.representativedetails,view:i.views.representativedetails,title:r.observable(i.views.representativedetails.title),processMessageVM:r.observable(),formDM:r.observable(),representativeDetailsDM:null,valueUpdate:["input","afterkeydown","afterpaste"],representativeDetailsValidation:null,canActivate:function(){var e=n.State.get(i.documents.FormDocumentModel);return e&&e.applicantType().stepComplete()&&e.applicantType().isVendor()!==i.yesNoOptions.yes?(d.formDM(e),!0):{redirect:i.views.launch.route}},activate:function(){var e=d.formDM().representativeDetails();e=e||new s;return d.representativeDetailsDM=e,d.formDM().representativeDetails(d.representativeDetailsDM),d.representativeDetailsValidation=r.validatedObservable(d.representativeDetailsDM),d.processMessageVM(new a([d.representativeDetailsValidation.isValid],!1)),d.processMessageVM().reset(),!0},back:function(){n.Navigator.navigate(i.views.applicanttype.route)},next:function(){return d.processMessageVM().reset(),d.processMessageVM().submit(),d.processMessageVM().hasClientErrors()?(d.representativeDetailsValidation.errors.showAllMessages(),t.fcall(function(){})):(d.representativeDetailsDM.stepComplete(!0),d.formDM().representativeDetails(d.representativeDetailsDM),n.State.set(i.documents.FormDocumentModel,d.formDM()),n.Navigator.navigate(i.views.vendordetails.route))}};return d}),define("viewmodels/shell",["require","framework/components/Navigator","framework/components/Logger","../common/Constants","../common/RefData"],function(e){var n=e("framework/components/Navigator"),r=e("framework/components/Logger"),i=e("../common/Constants"),o=e("../common/RefData");return{canActivate:function(){return!0},activate:function(){r.logInfo("SPA Loaded!","shell.activate");var e=i.views,t=[{route:["",e.applicanttype.route],moduleId:e.applicanttype.moduleId,title:e.applicanttype.title},{route:e.representativedetails.route,moduleId:e.representativedetails.moduleId,title:e.representativedetails.title},{route:e.vendordetails.route,moduleId:e.vendordetails.moduleId,title:e.vendordetails.title},{route:e.applicationdetails.route,moduleId:e.applicationdetails.moduleId,title:e.applicationdetails.title},{route:e.declaration.route,moduleId:e.declaration.moduleId,title:e.declaration.title},{route:e.confirmation.route,moduleId:e.confirmation.moduleId,title:e.confirmation.title},{route:e.unabletoprocess.route,moduleId:e.unabletoprocess.moduleId,title:e.unabletoprocess.title}];return o.retrieveCdnData().then(function(){return n.initialise(t)})}}}),define("viewmodels/UnableToProcess",["require","../common/Constants"],function(e){return{title:e("../common/Constants").views.unabletoprocess.title,canDeactivate:function(){return!1}}}),define("viewmodels/VendorDetails",["require","knockout","framework/AtoFramework","../common/Constants","../common/Common","framework/viewmodels/partials/ProcessMessageViewModel","../viewmodels/documentmodels/VendorDetailsDocumentModel"],function(e){var t=e("knockout"),n=e("framework/AtoFramework"),r=e("../common/Constants"),i=e("../common/Common"),o=e("framework/viewmodels/partials/ProcessMessageViewModel"),a=e("../viewmodels/documentmodels/VendorDetailsDocumentModel"),s={tabPosition:t.observable(),spaTabs:t.observable(),spaTitle:t.observable(r.spaTitle),view:r.views.vendordetails,title:t.observable(r.views.vendordetails.title),constants:r,ektronPath:r.taxonomyPaths.vendorDetails,routeInfo:r.views.vendordetails,processMessageVM:t.observable(),formDM:t.observable(),vendorDetailsDM:null,systemDate:t.observable(),vendorDetailsValidation:null,canActivate:function(){var e=n.State.get(r.documents.FormDocumentModel);return e&&e.applicantType().stepComplete()&&(e.applicantType().isVendor()!==r.yesNoOptions.no||e.representativeDetails().stepComplete())?(s.formDM(e),s.systemDate(window.ServerTime),!0):{redirect:r.views.launch.route}},activate:function(){s.vendorDetailsDM=s.formDM().vendorDetails(),s.vendorDetailsDM||(s.vendorDetailsDM=new a,s.formDM().vendorDetails(s.vendorDetailsDM));s.vendorDetailsValidation=t.validatedObservable(s.vendorDetailsDM),s.processMessageVM()||s.processMessageVM(new o([s.vendorDetailsValidation.isValid],!1));return s.processMessageVM().reset(),i.setTabPosition(s,1,2),!0},next:function(){if(s.processMessageVM().reset(),s.processMessageVM().submit(),!s.processMessageVM().hasClientErrors())return s.vendorDetailsDM.stepComplete(!0),s.formDM().vendorDetails(s.vendorDetailsDM),n.State.set(r.documents.FormDocumentModel,s.formDM()),n.Navigator.navigate(r.views.applicationdetails.route)},back:function(){return s.formDM().applicantType().isVendor()!==r.yesNoOptions.yes?n.Navigator.navigate(r.views.representativedetails.route):n.Navigator.navigate(r.views.applicanttype.route)}};return s}),define("text!views/ApplicantType.html",[],function(){return'\r\n \r\n \r\n \r\n
All fields marked with * are mandatory.
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n If you lodge your application close to the settlement date, we cannot guarantee\r\n we can process it by the settlement date as we will not disadvantage those other\r\n applicants who applied earlier by delaying their application to process yours.\r\n
For transactions involving trusts or superannuation funds, applicants should not use the "other" entity type and doing so may result in delays in processing the application. "Other" entities are where the title holder is neither an individual nor a company.
\r\n'}),define("framework/common/FocusUtils",["jquery","knockout","durandal/app","framework/common/ImportNormalisation"],function(s,i,a,e){a=e.normaliseDefaultModuleImport(a);var t="input, label, select, textarea, button, [tabindex]";function d(e){return s('[id*="'+e+'"]').filter(t)}function n(e){var n=s(t);e.sort(function(e,t){return n.index(d(e.elementId))-n.index(d(t.elementId))})}function l(e,t,n,r){var i,o;0div.collapse"),a=(0'}),define("Components/v3/atoPill/atoPill",["require","knockout","text!./atoPill.html","framework/common/Utilities"],function(e){var n=e("knockout"),t=e("text!./atoPill.html"),r=e("framework/common/Utilities"),i={e:{cssClass:"label-danger",accessibleType:"error indicator"},w:{cssClass:"label-warning",accessibleType:"warning"},s:{cssClass:"label-success",accessibleType:"success"},i:{cssClass:"label-info",accessibleType:"info"},n:{cssClass:"label-neutral",accessibleType:"note"},b:{cssClass:"label-beta",accessibleType:"beta"}};return{viewModel:function(t){var e=this;e.content=t.content,e.isVisible=r.observableFromParam(t.isVisible,!0),e.inverse=r.observableFromParam(t.inverse,!1),e.type=n.pureComputed(function(){var e=i[n.unwrap(t.type)];if(e)return e;throw new Error("ato-pill must be passed with a valid type (e, w, s, i, n, b) - "+n.unwrap(t.type))}),e.cssClass=n.pureComputed(function(){return"ato-pill label "+e.type().cssClass+(e.inverse()?" inverse":"")}),e.accessibleType=n.pureComputed(function(){return void 0!==t.accessibleType?n.unwrap(t.accessibleType):e.type().accessibleType})},template:t}}),define("text!Components/v3/atoErrorSummary/atoErrorSummary.html",[],function(){return'
\r\n \x3c!-- ko if: hasInfo() --\x3e\r\n \r\n \x3c!-- ko if: $parent.hasSingleInfo --\x3e\r\n
\r\n \r\n
\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko ifnot: $parent.hasSingleInfo --\x3e\r\n
\r\n \r\n
\r\n \x3c!-- /ko --\x3e\r\n \r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko if: hasWarnings() --\x3e\r\n \r\n \x3c!-- ko if: $parent.hasSingleWarning --\x3e\r\n
\r\n \r\n
\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko ifnot: $parent.hasSingleWarning --\x3e\r\n
\r\n \r\n
\r\n \x3c!-- /ko --\x3e\r\n \r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko if: hasErrorsServer() --\x3e\r\n \r\n \x3c!-- ko with: $parent.pageErrorCollection --\x3e\r\n