//>>built
define("dojox/mobile/bookmarkable","dojo/_base/array dojo/_base/connect dojo/_base/lang dojo/_base/window dojo/hash dijit/registry ./TransitionEvent ./View ./viewRegistry".split(" "),function(g,p,q,r,t,m,u,v,h){var c={settingHash:!1,transitionInfo:[],getTransitionInfo:function(a,b){return this.transitionInfo[a.replace(/^#/,"")+":"+b.replace(/^#/,"")]},addTransitionInfo:function(a,b,c){this.transitionInfo[a.replace(/^#/,"")+":"+b.replace(/^#/,"")]=c},findTransitionViews:function(a){if(!a)return[];
a=m.byId(a.replace(/^#/,""));if(!a)return[];for(var b=a.getParent();b;b=b.getParent())b.isVisible&&!b.isVisible()&&(a=b);return[a.getShowingView(),a]},onHashChange:function(a){this.settingHash?this.settingHash=!1:(a=this.handleFragIds(a),a.hashchange=!0,a.moveTo&&(new u(r.body(),a)).dispatch())},handleFragIds:function(a){var b,c,d,l;if(a){a=a.replace(/^#/,"").split(/,/);for(var e=0;e<a.length;e++){var f=m.byId(a[e]);if(f&&!f.isVisible()){for(var n=!0,k=h.getParentView(f);k;k=h.getParentView(k))if(-1===
g.indexOf(a,k.id)){n=!1;break}n?(b=this.findTransitionViews(a[e]),2===b.length&&(c=a[e])):g.forEach(f.getSiblingViews(),function(a){a.domNode.style.display=a===f?"":"none"})}}}else c=h.initialView.id,b=this.findTransitionViews(c);b&&(d=this.getTransitionInfo(b[0].id,b[1].id),l=1,d||(d=this.getTransitionInfo(b[1].id,b[0].id),l=-1));return{moveTo:c?"#"+c:null,transitionDir:d?d.transitionDir*l:1,transition:d?d.transition:"none"}},setFragIds:function(a){a=g.filter(h.getViews(),function(a){return a.isVisible()});
this.settingHash=!0;t(g.map(a,function(a){return a.id}).join(","))}};p.subscribe("/dojo/hashchange",null,function(){c.onHashChange.apply(c,arguments)});q.extend(v,{getTransitionInfo:function(){c.getTransitionInfo.apply(c,arguments)},addTransitionInfo:function(){c.addTransitionInfo.apply(c,arguments)},handleFragIds:function(){c.handleFragIds.apply(c,arguments)},setFragIds:function(){c.setFragIds.apply(c,arguments)}});return c});