-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3917.17e4c3e6ca5cfd4aaccc.js
More file actions
1 lines (1 loc) · 88 KB
/
3917.17e4c3e6ca5cfd4aaccc.js
File metadata and controls
1 lines (1 loc) · 88 KB
1
(self.webpackChunkudonarium_lily_gk=self.webpackChunkudonarium_lily_gk||[]).push([[3917],{3917:function(Ze,Je,Qe){var e,B,A,U,I,x,H,m,M,J,D,c,F,$;Qe(4656),Opal.modules["i18n/backend/fallbacks"]=function(e){function Y(M,i){return"number"==typeof M&&"number"==typeof i?M-i:M["$-"](i)}var i,m,U,x,j,A,V,w=[],r=e.nil,D=e.$$$,c=e.$$,F=e.module,$=e.truthy,d=e.send,B=e.send2,t=e.hash2;return i=w,V=[A=F(w[0],"I18n")].concat(i),e.class_variable_set(V[0],"@@fallbacks",r),m=e.get_singleton_class(A),j=[m].concat(V),e.def(m,"$fallbacks",U=function(){var I,n,b;return e.class_variable_set(j[1],"@@fallbacks",$(b=null==(I=j[1].$$cvars["@@fallbacks"])?r:I)?b:D(D(c(j,"I18n"),"Locale"),"Fallbacks").$new()),$(n=c(j,"Thread").$current()["$[]"]("i18n_fallbacks"))?n:null==(I=j[1].$$cvars["@@fallbacks"])?r:I},U.$$arity=0),e.def(m,"$fallbacks=",x=function(I){var z,n;return e.class_variable_set(j[1],"@@fallbacks",$(I["$is_a?"](c(j,"Array")))?D(D(c(j,"I18n"),"Locale"),"Fallbacks").$new(I):I),n=["i18n_fallbacks",null==(z=j[1].$$cvars["@@fallbacks"])?r:z],d(c(j,"Thread").$current(),"[]=",e.to_a(n)),n[Y(n.length,1)]},x.$$arity=1),void function(m,k){var U=[F(m,"Backend")].concat(k);!function(x,H){var b,n,v,s,I=F(x,"Fallbacks"),z=[I].concat(H);e.def(I,"$translate",b=function(S,h,P){try{var g,E=b.$$p,l=this,_=r,o=r,T=r,f=r,R=r,a=r;for(E&&(b.$$p=null),R=0,a=arguments.length,f=new Array(a);R<a;R++)f[R]=arguments[R];return null==P&&(P=c(z,"EMPTY_HASH")),!$(P.$fetch("fallback",!0))||$(P["$[]"]("fallback_in_progress"))?B(l,e.find_super_dispatcher(l,"translate",b,!1,!0),"translate",f,E):($(P["$[]"]("default"))&&(_=l["$extract_non_symbol_default!"](P)),o=P.$merge(t(["fallback_in_progress"],{fallback_in_progress:!0})),d(c(z,"I18n").$fallbacks()["$[]"](S),"each",[],((g=function(G){var Q,Z=null==g.$$s?this:g.$$s;null==G&&(G=r);try{return d(Z,"catch",["exception"],((Q=function(){var ue=null==Q.$$s?this:Q.$$s,ye=r;if(ye=B(ue,e.find_iter_super_dispatcher(ue,"translate",Q.$$def||g.$$def||b,!1,!1),"translate",[G,h,o],null),$(ye["$nil?"]()))return r;$(S.$to_s()["$!="](G.$to_s()))&&ue.$on_fallback(S,G,h,P),e.ret(ye)}).$$s=Z,Q.$$arity=0,Q))}catch(ae){if(!e.rescue(ae,[D(c(z,"I18n"),"InvalidLocale")]))throw ae;try{return r}finally{e.pop_exception()}}}).$$s=l,g.$$arity=1,g)),$($(T=P["$key?"]("default"))?P["$[]"]("default")["$nil?"]():T)?r:$(_)?B(l,e.find_super_dispatcher(l,"translate",b,!1,!0),"translate",[S,r,P.$merge(t(["default"],{default:_}))],null):l.$throw("exception",D(c(z,"I18n"),"MissingTranslation").$new(S,h,P)))}catch(p){if(p===e.returner)return p.$v;throw p}},b.$$arity=-3),e.def(I,"$extract_non_symbol_default!",n=function(S){var h,E,g=r,K=r;return g=[S["$[]"]("default")].$flatten(),E=d(g,"detect",[],((h=function(_){return null==_&&(_=r),_["$is_a?"](c(z,"Symbol"))["$!"]()}).$$s=this,h.$$arity=1,h)),$(E)&&(K=["default",g["$[]"](0,g.$index(E))],d(S,"[]=",e.to_a(K)),Y(K.length,1)),E},n.$$arity=1),e.def(I,"$exists?",v=function(S,h,P){try{var g,E=v.$$p,l=this,_=r,o=r,T=r;for(E&&(v.$$p=null),o=0,T=arguments.length,_=new Array(T);o<T;o++)_[o]=arguments[o];return null==P&&(P=c(z,"EMPTY_HASH")),$(P.$fetch("fallback",!0))?(d(c(z,"I18n").$fallbacks()["$[]"](S),"each",[],((g=function(R){var a=null==g.$$s?this:g.$$s;null==R&&(R=r);try{if(!$(B(a,e.find_iter_super_dispatcher(a,"exists?",g.$$def||v,!1,!1),"exists?",[R,h],null)))return r;e.ret(!0)}catch(p){if(!e.rescue(p,[D(c(z,"I18n"),"InvalidLocale")]))throw p;try{return r}finally{e.pop_exception()}}}).$$s=l,g.$$arity=1,g)),!1):B(l,e.find_super_dispatcher(l,"exists?",v,!1,!0),"exists?",_,E)}catch(f){if(f===e.returner)return f.$v;throw f}},v.$$arity=-3),I.$private(),e.def(I,"$on_fallback",s=function(S,h,P,g){return r},s.$$arity=4)}(U[0],U)}(V[0],V)},Opal.modules["bcdice/randomizer"]=function(e){function Y(m,k){return"number"==typeof m&&"number"==typeof k?m>k:m["$>"](k)}function J(m,k){return"number"==typeof m&&"number"==typeof k?m+k:m["$+"](k)}function w(m,k){return"number"==typeof m&&"number"==typeof k?m<=k:m["$<="](k)}function r(m,k){return"number"==typeof m&&"number"==typeof k?m-k:m["$-"](k)}function D(m,k){return"number"==typeof m&&"number"==typeof k?m*k:m["$*"](k)}var k,I,n,v,s,y,S,h,P,g,E,K,l,z,b,U,$=[],d=e.nil,B=e.$$$,t=e.$$,i=e.klass,A=e.truthy,V=e.send;return k=$,I=U=[(0,e.module)($[0],"BCDice")].concat(k),z=i(U[0],null,"Randomizer"),b=[z].concat(I),z.$$prototype.rand_results=z.$$prototype.detailed_rand_results=d,e.const_set(b[0],"UPPER_LIMIT_DICE_TIMES",200),e.const_set(b[0],"UPPER_LIMIT_DICE_SIDES",1e3),e.const_set(b[0],"UPPER_LIMIT_RANDS",1e4),e.def(z,"$initialize",n=function(){return this.rand_results=[],this.detailed_rand_results=[]},n.$$arity=0),z.$attr_reader("rand_results"),z.$attr_reader("detailed_rand_results"),e.const_set(b[0],"DetailedRandResult",t(b,"Struct").$new("kind","sides","value")),e.def(z,"$roll_barabara",v=function(o,T){var f,a,R=this;return A(Y(J(R.rand_results.$size(),o),t(b,"UPPER_LIMIT_RANDS")))&&R.$raise(t(b,"TooManyRandsError")),A(A(a=w(o,0))?a:Y(o,t(b,"UPPER_LIMIT_DICE_TIMES")))?[]:V(t(b,"Array"),"new",[o],((f=function(){return(null==f.$$s?this:f.$$s).$roll_once(T)}).$$s=R,f.$$arity=0,f))},v.$$arity=2),e.def(z,"$roll_sum",s=function(o,T){return this.$roll_barabara(o,T).$sum()},s.$$arity=2),e.def(z,"$roll_once",y=function(o){var f,R=d;return A(A(f=w(o,0))?f:Y(o,t(b,"UPPER_LIMIT_DICE_SIDES")))?0:(R=this.$rand_inner(o),this.$push_to_detail("normal",o,R),R)},y.$$arity=1),e.def(z,"$roll_index",S=function(o){return r(this.$roll_once(o),1)},S.$$arity=1),e.def(z,"$roll_tens_d10",h=function(){var f,T=d;return(T=this.$rand_inner(10))["$=="](10)&&(T=0),f=D(T,10),this.$push_to_detail("tens_d10",10,f),f},h.$$arity=0),e.def(z,"$roll_d9",P=function(){var T;return T=r(this.$rand_inner(10),1),this.$push_to_detail("d9",10,T),T},P.$$arity=0),e.def(z,"$roll_d66",g=function(o){var T,a,R=d;return R=V(t(b,"Array"),"new",[2],((T=function(){return(null==T.$$s?this:T.$$s).$roll_once(6)}).$$s=this,T.$$arity=0,T)),a=o,B(t(b,"D66SortType"),"ASC")["$==="](a)?R["$sort!"]():B(t(b,"D66SortType"),"DESC")["$==="](a)&&R["$sort!"]()["$reverse!"](),J(D(R["$[]"](0),10),R["$[]"](1))},g.$$arity=1),z.$private(),e.def(z,"$rand_inner",E=function(o){var f,T=this;return A(function(m,k){return"number"==typeof m&&"number"==typeof k?m>=k:m["$>="](k)}(T.rand_results.$size(),t(b,"UPPER_LIMIT_RANDS")))&&T.$raise(t(b,"TooManyRandsError")),f=T.$random(o),T.rand_results["$<<"]([f,o]),f},E.$$arity=1),e.def(z,"$random",K=function(o){return J(t(b,"Kernel").$rand(o),1)},K.$$arity=1),e.def(z,"$push_to_detail",l=function(o,T,f){var a;return a=t(b,"DetailedRandResult").$new(o,T,f),this.detailed_rand_results.$push(a)},l.$$arity=3),void function(x,H,I){[i(x,H,"TooManyRandsError")].concat(I)}(U[0],t(U,"StandardError"),U)},Opal.modules["bcdice/dice_table/roll_result"]=function(e){var B,A,U,I,z,b,n,x,H,m,M,J=[],w=e.nil,D=e.$$,c=e.module,F=e.klass,$=e.truthy;return B=J,A=M=[c(J[0],"BCDice")].concat(B),U=m=[c(M[0],"DiceTable")].concat(A),x=F(m[0],null,"RollResult"),H=[x].concat(U),x.$$prototype.table_name=x.$$prototype.value=x.$$prototype.body=w,e.def(x,"$initialize",I=function(s,y,S){var h=this;return h.table_name=s,h.value=y,h.body=S},I.$$arity=3),x.$attr_reader("table_name"),x.$attr_reader("value"),x.$attr_reader("body"),e.def(x,"$to_s",z=function(){var s=this;return s.table_name+"("+s.value+") \uff1e "+s.body},z.$$arity=0),e.def(x,"$last_body",b=function(){var s=this;return $(s.body["$is_a?"](D(H,"RollResult")))?s.body.$last_body():s.body},b.$$arity=0),void e.def(x,"$empty?",n=function(){return!1},n.$$arity=0)},Opal.modules["bcdice/dice_table/chain_table"]=function(e){var t,V,x,z,b,H,I,k,i,w=[],r=e.nil,c=e.$$,F=e.module,$=e.klass,d=e.truthy;return t=w,V=i=[F(w[0],"BCDice")].concat(t),x=k=[F(i[0],"DiceTable")].concat(V),H=$(k[0],null,"ChainTable"),I=[H].concat(x),H.$$prototype.times=H.$$prototype.sides=H.$$prototype.items=H.$$prototype.name=r,e.def(H,"$initialize",z=function(v,s,y){var S=this,h=r;return S.name=v,S.items=y.$freeze(),h=/(\d+)D(\d+)/i.$match(s),d(h)||S.$raise(c(I,"ArgumentError"),"Unexpected table type: "+s),S.times=h["$[]"](1).$to_i(),S.sides=h["$[]"](2).$to_i()},z.$$arity=3),void e.def(H,"$roll",b=function(v){var y,S,s=this,h=r;return S=function(B,t){return"number"==typeof B&&"number"==typeof t?B-t:B["$-"](t)}(y=v.$roll_sum(s.times,s.sides),s.times),h=s.items["$[]"](S),d(h["$respond_to?"]("roll"))&&(h=h.$roll(v)),c(I,"RollResult").$new(s.name,y,h)},b.$$arity=1)},Opal.modules["bcdice/dice_table/d66_grid_table"]=function(e){function w(M,i){return"number"==typeof M&&"number"==typeof i?M-i:M["$-"](i)}var i,k,I,n,v,s,z,b,U,V,D=[],c=e.nil,$=e.$$,d=e.module,B=e.klass,t=e.hash2;return i=D,k=V=[d(D[0],"BCDice")].concat(i),I=U=[d(V[0],"DiceTable")].concat(k),z=B(U[0],null,"D66GridTable"),b=[z].concat(I),z.$$prototype.name=z.$$prototype.items=c,e.defs(z,"$from_i18n",n=function(S,h){var g=c;return g=$(b,"I18n").$t(S,t(["locale","raise"],{locale:h,raise:!0})),this.$new(g["$[]"]("name"),g["$[]"]("items"))},n.$$arity=2),e.def(z,"$initialize",v=function(S,h){return this.name=S,this.items=h.$freeze()},v.$$arity=2),void e.def(z,"$roll",s=function(S){var P,g,E,K,l;return P=S.$roll_once(6),g=S.$roll_once(6),E=function(M,i){return"number"==typeof M&&"number"==typeof i?M+i:M["$+"](i)}(function(M,i){return"number"==typeof M?10*M:M["$*"](10)}(P),g),K=w(P,1),l=w(g,1),$(b,"RollResult").$new(this.name,E,this.items["$[]"](K)["$[]"](l))},s.$$arity=1)},Opal.modules["bcdice/dice_table/d66_half_grid_table"]=function(e){var B,A,U,I,z,x,H,m,M,J=[],w=e.nil,D=e.$$,c=e.module,F=e.klass,$=e.hash2;return e.top.$require("bcdice/dice_table/d66_grid_table"),B=J,A=M=[c(J[0],"BCDice")].concat(B),U=m=[c(M[0],"DiceTable")].concat(A),x=F(m[0],D(m,"D66GridTable"),"D66HalfGridTable"),H=[x].concat(U),e.defs(x,"$from_i18n",I=function(n,v){var y=w;return y=D(H,"I18n").$t(n,$(["locale","raise"],{locale:v,raise:!0})),this.$new(y["$[]"]("name"),y["$[]"]("items_1_2_3"),y["$[]"]("items_4_5_6"))},I.$$arity=2),void e.def(x,"$initialize",z=function(n,v,s){return this.name=n,this.items=[v,v,v,s,s,s].$freeze()},z.$$arity=3)},Opal.modules["bcdice/dice_table/d66_one_third_table"]=function(e){var B,A,U,I,z,x,H,m,M,J=[],w=e.nil,D=e.$$,c=e.module,F=e.klass,$=e.hash2;return e.top.$require("bcdice/dice_table/d66_grid_table"),B=J,A=M=[c(J[0],"BCDice")].concat(B),U=m=[c(M[0],"DiceTable")].concat(A),x=F(m[0],D(m,"D66GridTable"),"D66OneThirdTable"),H=[x].concat(U),e.defs(x,"$from_i18n",I=function(n,v){var y=w;return y=D(H,"I18n").$t(n,$(["locale","raise"],{locale:v,raise:!0})),this.$new(y["$[]"]("name"),y["$[]"]("items_1_2"),y["$[]"]("items_3_4"),y["$[]"]("items_5_6"))},I.$$arity=2),void e.def(x,"$initialize",z=function(n,v,s,y){return this.name=n,this.items=[v,v,s,s,y,y].$freeze()},z.$$arity=4)},Opal.modules["bcdice/dice_table/d66_table"]=function(e){var i,k,I,n,v,s,z,b,U,V,r=[],D=e.nil,c=e.$$$,F=e.$$,$=e.module,d=e.klass,B=e.hash2,t=e.truthy;return i=r,k=V=[$(r[0],"BCDice")].concat(i),I=U=[$(V[0],"DiceTable")].concat(k),z=d(U[0],null,"D66Table"),b=[z].concat(I),z.$$prototype.sort_type=z.$$prototype.items=z.$$prototype.name=D,e.defs(z,"$from_i18n",n=function(S,h){var E,g=D;return g=F(b,"I18n").$t(S,B(["locale"],{locale:h})),E=F(b,"D66SortType").$const_get(g["$[]"]("d66_sort_type")),this.$new(g["$[]"]("name"),E,g["$[]"]("items"))},n.$$arity=2),e.def(z,"$initialize",v=function(S,h,P){var g=this;return g.name=S,g.sort_type=h,g.items=P.$freeze()},v.$$arity=3),void e.def(z,"$roll",s=function(S){var g,l,h=this,P=D,E=D,K=D;return P=S.$roll_barabara(2,6),g=h.sort_type,c(F(b,"D66SortType"),"ASC")["$==="](g)?P["$sort!"]():c(F(b,"D66SortType"),"DESC")["$==="](g)&&P["$sort!"]()["$reverse!"](),E=function(M,i){return"number"==typeof M&&"number"==typeof i?M+i:M["$+"](i)}(function(M,i){return"number"==typeof M?10*M:M["$*"](10)}(P["$[]"](0)),P["$[]"](1)),K=t(l=h.items["$[]"](E))?l:h.items["$[]"](E.$to_s()),t(K["$respond_to?"]("roll"))&&(K=K.$roll(S)),F(b,"RollResult").$new(h.name,E,K)},s.$$arity=1)},Opal.modules["bcdice/dice_table/d66_left_range_table"]=function(e){function Y(A,V){return"number"==typeof A&&"number"==typeof V?A+V:A["$+"](V)}var V,b,s,n,U,H,k,D=[],c=e.nil,$=e.$$,d=e.module,B=e.klass,t=e.hash2,M=e.send,i=e.send2;return e.top.$require("bcdice/dice_table/d66_table"),V=D,U=k=[d(D[0],"BCDice")].concat(V),b=H=[d(k[0],"DiceTable")].concat(U),[n=B(H[0],$(H,"D66Table"),"D66LeftRangeTable")].concat(b),void e.def(n,"$initialize",s=function(S,h,P){var g,_,l=this;return s.$$p&&(s.$$p=null),_=t([],{}),M(P,"each",[],((g=function(o){function T(f){return o.apply(this,arguments)}return T.toString=function(){return o.toString()},T}(function(o){var f,a,G,T=null==g.$$s?this:g.$$s;return null==o&&(o=c),f=e.to_ary(o),G=null==f[1]?c:f[1],M(null==f[0]?c:f[0],"each",[],((a=function(Q){var ue;return null==Q&&(Q=c),M(G,"each_with_index",[],((ue=function(De,Pe){var Be,me;return null==De&&(De=c),null==Pe&&(Pe=c),Be=Y(function(A,V){return"number"==typeof A?10*A:A["$*"](10)}(Q),Y(Pe,1)),M(_,"[]=",e.to_a(me=[Be,De])),me[function(A,V){return"number"==typeof A?A-1:A["$-"](1)}(me.length)]}).$$s=null==a.$$s?this:a.$$s,ue.$$arity=2,ue))}).$$s=T,a.$$arity=1,a))})).$$s=l,g.$$arity=1,g)),i(l,e.find_super_dispatcher(l,"initialize",s,!1,!0),"initialize",[S,h,_],null)},s.$$arity=3)},Opal.modules["bcdice/dice_table/d66_parity_table"]=function(e){var i,k,I,n,v,z,b,U,V,D=[],c=e.nil,$=e.$$,d=e.module,B=e.klass,t=e.truthy;return i=D,k=V=[d(D[0],"BCDice")].concat(i),I=U=[d(V[0],"DiceTable")].concat(k),z=B(U[0],null,"D66ParityTable"),b=[z].concat(I),z.$$prototype.odd=z.$$prototype.even=z.$$prototype.name=c,e.def(z,"$initialize",n=function(y,S,h){var P=this;return P.name=y,P.odd=S.$freeze(),P.even=h.$freeze()},n.$$arity=3),void e.def(z,"$roll",v=function(y){var P,E,K,S=this,h=c;return h=y.$roll_once(6),P=y.$roll_once(6),E=(t(h["$odd?"]())?S.odd:S.even)["$[]"](function(M,i){return"number"==typeof M?M-1:M["$-"](1)}(P)),K=function(M,i){return"number"==typeof M&&"number"==typeof i?M+i:M["$+"](i)}(function(M,i){return"number"==typeof M?10*M:M["$*"](10)}(h),P),$(b,"RollResult").$new(S.name,K,E)},v.$$arity=1)},Opal.modules["bcdice/dice_table/d66_range_table"]=function(e){var M,m,H,b,n,I,z,j,A,r=[],D=e.nil,F=e.$$,$=e.module,d=e.klass,B=e.send;return M=r,m=A=[$(r[0],"BCDice")].concat(M),H=j=[$(A[0],"DiceTable")].concat(m),I=d(j[0],null,"D66RangeTable"),z=[I].concat(H),I.$$prototype.items=I.$$prototype.name=D,e.def(I,"$initialize",b=function(s,y){return this.name=s,this.items=y.$freeze()},b.$$arity=2),void e.def(I,"$roll",n=function(s){var y,h,P,g,t,S=this,E=D;return h=s.$roll_once(6),P=s.$roll_once(6),g=function(t,M){return"number"==typeof t&&"number"==typeof M?t+M:t["$+"](M)}("number"==typeof(t=h)?10*t:t["$*"](10),P),E=B(S.items,"find",[],((y=function(l){return null==l&&(l=D),l["$[]"](0)["$include?"](g)}).$$s=S,y.$$arity=1,y)),F(z,"RollResult").$new(S.name,g,E["$[]"](1))},n.$$arity=1)},Opal.modules["bcdice/dice_table/range_table"]=function(e){var A,j,z,v,s,y,S,h,P,g,E,K,b,n,x,m,D=[],c=e.nil,$=e.$$,d=e.module,B=e.klass,t=e.send,M=e.truthy;return A=D,j=m=[d(D[0],"BCDice")].concat(A),z=x=[d(m[0],"DiceTable")].concat(j),b=B(x[0],null,"RangeTable"),n=[b].concat(z),b.$$prototype.name=b.$$prototype.items=b.$$prototype.num_of_dice=b.$$prototype.num_of_sides=b.$$prototype.formatter=c,e.const_set(n[0],"RollResult",t($(n,"Struct"),"new",["sum","values","content","formatted"],((v=function(){return(null==v.$$s?this:v.$$s).$alias_method("to_s","formatted")}).$$s=b,v.$$arity=0,v))),e.const_set(n[0],"Item",$(n,"Struct").$new("range","content")),e.const_set(n[0],"DICE_ROLL_METHOD_RE",/^(\d+)D(\d+)$/i.$freeze()),e.const_set(n[0],"DEFAULT_FORMATTER",t(b,"lambda",[],($$2=function(l){function _(o,T){return l.apply(this,arguments)}return _.toString=function(){return l.toString()},_}(function(l,_){return null==$$2.$$s||$$2,null==l&&(l=c),null==_&&(_=c),l.$name()+"("+_.$sum()+") \uff1e "+_.$content()}),$$2.$$s=b,$$2.$$arity=2,$$2))),b.$attr_reader("name"),b.$attr_reader("num_of_dice"),b.$attr_reader("num_of_sides"),e.def(b,"$initialize",s=function(_,o,T){var p,f=s.$$p,R=f||c,a=this,G=c;return f&&(s.$$p=null),f&&(s.$$p=null),a.name=_.$freeze(),a.formatter=M(p=R)?p:$(n,"DEFAULT_FORMATTER"),G=$(n,"DICE_ROLL_METHOD_RE").$match(o),M(G)||a.$raise($(n,"ArgumentError"),a.name+": invalid dice roll method: "+o),a.num_of_dice=G["$[]"](1).$to_i(),a.num_of_sides=G["$[]"](2).$to_i(),a.$store(T)},s.$$arity=3),e.def(b,"$fetch",y=function(_){var o,f,T=this;return f=t(T.items,"find",[],((o=function(a){return null==a&&(a=c),a.$range()["$include?"](_)}).$$s=T,o.$$arity=1,o)),M(f)||T.$raise($(n,"RangeError"),T.name+": value is out of range: "+_),f},y.$$arity=1),e.def(b,"$roll",S=function(_){var f,R,a,i,o=this,T=c;return f=(T=_.$roll_barabara(o.num_of_dice,o.num_of_sides)).$sum(),R=$(n,"RollResult").$new(f,T,o.$fetch(f).$content()),a=[o.formatter["$[]"](o,R)],t(R,"formatted=",e.to_a(a)),"number"==typeof(i=a.length)||i["$-"](1),R},S.$$arity=1),b.$private(),e.def(b,"$store",h=function(_){var o,T,f,a,p,R=this;return a=t(_,"map",[],((o=function(Z,Q){return null==Z&&(Z=c),null==Q&&(Q=c),[(null==o.$$s?this:o.$$s).$coerce_to_int_range(Z),Q]}).$$s=R,o.$$arity=2,o)),p=t(a,"sort_by",[],((T=function(Z,Q){return null==Z&&(Z=c),null==Q&&(Q=c),Z.$min()}).$$s=R,T.$$arity=2,T)),R.$assert_min_sum_is_covered(p),R.$assert_max_sum_is_covered(p),R.$assert_no_gap_or_overlap_in_ranges(p),R.items=t(p,"map",[],(f=function(Z,Q){return null==Z&&(Z=c),null==Q&&(Q=c),$(n,"Item").$new(Z,Q.$freeze()).$freeze()},f.$$s=R,f.$$arity=2,f)).$freeze(),R},h.$$arity=1),e.def(b,"$coerce_to_int_range",P=function(_){var T,f=c;return T=_,$(n,"Integer")["$==="](T)?$(n,"Range").$new(_,_):$(n,"Range")["$==="](T)&&M(M(f=_.$begin()["$is_a?"]($(n,"Integer")))?_.$end()["$is_a?"]($(n,"Integer")):f)?_:this.$raise($(n,"TypeError"),this.name+": "+_+" ("+_.$class()+") must be an Integer or a Range with Integers ")},P.$$arity=1),e.def(b,"$assert_min_sum_is_covered",g=function(_){var T,o=this,f=c;return T=o.num_of_dice,f=_.$first()["$[]"](0),M(f["$include?"](T))||o.$raise($(n,"RangeError"),o.name+": min value ("+T+") is not covered: "+f),o},g.$$arity=1),e.def(b,"$assert_max_sum_is_covered",E=function(_){var T,o=this,f=c;return T=function(i,A){return"number"==typeof i&&"number"==typeof A?i*A:i["$*"](A)}(o.num_of_dice,o.num_of_sides),f=_.$last()["$[]"](0),M(f["$include?"](T))||o.$raise($(n,"RangeError"),o.name+": max value ("+T+") is not covered: "+f),o},E.$$arity=1),void e.def(b,"$assert_no_gap_or_overlap_in_ranges",K=function(_){var o;return t(_,"each_cons",[2],((o=function(R,a){var Q,ae,i,p=null==o.$$s?this:o.$$s,G=c,Z=c;return null==p.name&&(p.name=c),null==R&&(R=c),null==a&&(a=c),G=R["$[]"](0),Z=a["$[]"](0),ae="number"==typeof(i=Q=G.$max())?i+1:i["$+"](1),M(Z["$include?"](Q))&&p.$raise($(n,"RangeError"),p.name+": Range overlap: "+G+" and "+Z),M(Z["$include?"](ae))?c:p.$raise($(n,"RangeError"),p.name+": Range gap: "+G+" and "+Z)}).$$s=this,o.$$arity=2,o)),this},K.$$arity=1)},Opal.modules["bcdice/dice_table/sai_fic_skill_table/category"]=function(e){var t,V,x,n,y,S,h,v,s,I,k,i,w=[],r=e.nil,D=e.$$$,c=e.$$,F=e.module,$=e.klass,d=e.send;return t=w,V=i=[F(w[0],"BCDice")].concat(t),x=k=[F(i[0],"DiceTable")].concat(V),n=I=[$(k[0],null,"SaiFicSkillTable")].concat(x),v=$(I[0],null,"Category"),s=[v].concat(n),v.$$prototype.name=r,e.def(v,"$initialize",y=function(g,E,K,l){var _,o=this;return o.name=g,o.skills=d(E.$map(),"with_index",[2],((_=function(T){function f(R,a){return T.apply(this,arguments)}return f.toString=function(){return T.toString()},f}(function(T,f){return null==T&&(T=r),null==f&&(f=r),D(c(s,"SaiFicSkillTable"),"Skill").$new(g,T,K,f,l)})).$$s=o,_.$$arity=2,_)),o.dice=K},y.$$arity=4),e.def(v,"$roll",S=function(g){return this.$skills()["$[]"](function(B,t){return"number"==typeof B?B-2:B["$-"](2)}(g.$roll_sum(2,6)))},S.$$arity=1),e.def(v,"$to_s",h=function(){return this.name},h.$$arity=0),void v.$attr_reader("name","dice","skills")},Opal.modules["bcdice/dice_table/sai_fic_skill_table/skill"]=function(e){var B,A,b,s,y,n,U,H,m,M,J=[],w=e.nil,c=e.module,F=e.klass,$=e.hash2;return B=J,A=M=[c(J[0],"BCDice")].concat(B),U=m=[c(M[0],"DiceTable")].concat(A),b=H=[F(m[0],null,"SaiFicSkillTable")].concat(U),[n=F(H[0],null,"Skill")].concat(b),n.$$prototype.s_format=n.$$prototype.category_dice=n.$$prototype.row_dice=n.$$prototype.category_name=n.$$prototype.name=w,e.def(n,"$initialize",s=function(h,P,g,E,K){var l=this;return l.category_name=h,l.name=P,l.category_dice=g,l.row_dice=E,l.s_format=K},s.$$arity=5),e.def(n,"$to_s",y=function(){var h=this;return h.$format(h.s_format,$(["category_dice","row_dice","category_name","skill_name"],{category_dice:h.category_dice,row_dice:h.row_dice,category_name:h.category_name,skill_name:h.name}))},y.$$arity=0),void n.$attr_reader("category_name","name","category_dice","row_dice")},Opal.modules["bcdice/dice_table/sai_fic_skill_table"]=function(e){var V,U,b,s,y,S,h,P,g,E,n,v,H,k,w=e.top,r=[],D=e.nil,c=e.$$$,F=e.$$,$=e.module,d=e.klass,B=e.hash2,t=e.send,i=e.truthy;return w.$require("bcdice/dice_table/sai_fic_skill_table/category"),w.$require("bcdice/dice_table/sai_fic_skill_table/skill"),V=r,U=k=[$(r[0],"BCDice")].concat(V),b=H=[$(k[0],"DiceTable")].concat(U),n=d(H[0],null,"SaiFicSkillTable"),v=[n].concat(b),n.$$prototype.rtt=n.$$prototype.rtt_format=n.$$prototype.rct=n.$$prototype.rct_format=n.$$prototype.rttn=n.$$prototype.rttn_format=n.$$prototype.categories=D,e.defs(n,"$from_i18n",s=function(l,_,o){var T,f,R,a,Q,Z=D;if(null==o)o=B([],{});else if(!o.$$is_hash)throw e.ArgumentError.$new("expected kwargs");return null==(T=o.$$smap.rtt)&&(T=D),null==(f=o.$$smap.rct)&&(f=D),null==(R=o.$$smap.rttn)&&(R=D),Q=(Z=F(v,"I18n").$t("RTT",B(["locale","raise","default"],{locale:_,raise:!1,default:B([],{})})).$merge(F(v,"I18n").$t(l,B(["locale","raise"],{locale:_,raise:!0}))))["$[]"]("items"),Z=t(Z,"select",[],((a=function(ae){function ue(ye,De){return ae.apply(this,arguments)}return ue.toString=function(){return ae.toString()},ue}(function(ae,ue){return null==ae&&(ae=D),null==ue&&(ue=D),["rtt_format","rttn_format","rct_format","s_format"]["$include?"](ae)})).$$s=this,a.$$arity=2,a)),this.$new(Q,e.to_hash(Z).$merge(B(["rtt","rct","rttn"],{rtt:T,rct:f,rttn:R})))},s.$$arity=-3),e.const_set(v[0],"DEFAULT_RTT","\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868(%<category_dice>d,%<row_dice>d) \uff1e %<text>s"),e.const_set(v[0],"DEFAULT_RCT","\u30e9\u30f3\u30c0\u30e0\u5206\u91ce\u8868(%<category_dice>d) \uff1e %<category_name>s"),e.const_set(v[0],"DEFAULT_RTTN","%<category_name>s\u5206\u91ce\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868(%<row_dice>d) \uff1e %<text>s"),e.const_set(v[0],"DEFAULT_S","\u300a%<skill_name>s\uff0f%<category_name>s%<row_dice>d\u300b"),e.def(n,"$initialize",y=function(l,_){var o,T,f,R,a,p,G,Z,Q=this;if(null==_)_=B([],{});else if(!_.$$is_hash)throw e.ArgumentError.$new("expected kwargs");return null==(o=_.$$smap.rtt)&&(o=D),null==(T=_.$$smap.rct)&&(T=D),null==(f=_.$$smap.rttn)&&(f=D),null==(R=_.$$smap.rtt_format)&&(R=F(v,"DEFAULT_RTT")),null==(a=_.$$smap.rct_format)&&(a=F(v,"DEFAULT_RCT")),null==(p=_.$$smap.rttn_format)&&(p=F(v,"DEFAULT_RTTN")),null==(G=_.$$smap.s_format)&&(G=F(v,"DEFAULT_S")),Q.categories=t(l.$map(),"with_index",[1],((Z=function(ue,ye){var Pe,Be,me;return null==ue&&(ue=D),null==ye&&(ye=D),Be=null==(Pe=e.to_ary(ue))[0]?D:Pe[0],me=null==Pe[1]?D:Pe[1],c(F(v,"SaiFicSkillTable"),"Category").$new(Be,me,ye,G)}).$$s=Q,Z.$$arity=2,Z.$$has_top_level_mlhs_arg=!0,Z)),Q.rtt=o,Q.rct=T,Q.rttn=f.$to_a(),Q.rtt_format=R,Q.rct_format=a,Q.rttn_format=p},y.$$arity=-2),e.const_set(v[0],"RTTN",["RTT1","RTT2","RTT3","RTT4","RTT5","RTT6"].$freeze()),n.$attr_reader("categories"),e.def(n,"$roll_command",S=function(l,_){var T,o=this,f=D,R=D,a=D;return i(["RTT",o.rtt]["$include?"](T=_))?o.$format_skill(o.rtt_format,o.$roll_skill(l)):i(["RCT",o.rct]["$include?"](T))?(f=o.$roll_category(l),o.$format(o.rct_format,B(["category_dice","category_name"],{category_dice:f.$dice(),category_name:f.$name()}))):i(i(R=a=F(v,"RTTN").$index(T))?R:a=o.rttn.$index(T))?o.$format_skill(o.rttn_format,o.categories["$[]"](a).$roll(l)):D},S.$$arity=2),e.def(n,"$roll_category",h=function(l){return this.categories["$[]"](function(A,V){return"number"==typeof A?A-1:A["$-"](1)}(l.$roll_once(6)))},h.$$arity=1),e.def(n,"$roll_skill",P=function(l){return this.$roll_category(l).$roll(l)},P.$$arity=1),e.def(n,"$prefixes",g=function(){var l=this;return function(A,V){return"number"==typeof A&&"number"==typeof V?A+V:A["$+"](V)}(["RTT[1-6]?","RCT",l.rtt,l.rct],l.rttn).$compact()},g.$$arity=0),n.$private(),void e.def(n,"$format_skill",E=function(l,_){return this.$format(l,B(["category_dice","row_dice","category_name","skill_name","text"],{category_dice:_.$category_dice(),row_dice:_.$row_dice(),category_name:_.$category_name(),skill_name:_.$name(),text:_.$to_s()}))},E.$$arity=2)},Opal.modules["bcdice/dice_table/table"]=function(e){var M,m,H,b,n,v,s,I,z,j,A,w=[],r=e.nil,c=e.$$,F=e.module,$=e.klass,d=e.hash2,B=e.truthy;return M=w,m=A=[F(w[0],"BCDice")].concat(M),H=j=[F(A[0],"DiceTable")].concat(m),I=$(j[0],null,"Table"),z=[I].concat(H),I.$$prototype.times=I.$$prototype.sides=I.$$prototype.name=I.$$prototype.items=r,e.defs(I,"$from_i18n",b=function(S,h){var g=r;return g=c(z,"I18n").$t(S,d(["locale"],{locale:h})),this.$new(g["$[]"]("name"),g["$[]"]("type"),g["$[]"]("items"))},b.$$arity=2),e.def(I,"$initialize",n=function(S,h,P){var g=this,E=r;return g.name=S,g.items=P.$freeze(),E=/(\d+)D(\d+)/i.$match(h),B(E)||g.$raise(c(z,"ArgumentError"),"Unexpected table type: "+h),g.times=E["$[]"](1).$to_i(),g.sides=E["$[]"](2).$to_i()},n.$$arity=3),e.def(I,"$roll",v=function(S){var P,h=this;return P=S.$roll_sum(h.times,h.sides),h.$choice(P)},v.$$arity=1),void e.def(I,"$choice",s=function(S){var P,h=this;return P=function(t,M){return"number"==typeof t&&"number"==typeof M?t-M:t["$-"](M)}(S,h.times),c(z,"RollResult").$new(h.name,S,h.items["$[]"](P))},s.$$arity=1)},Opal.modules["bcdice/dice_table"]=function(e){var Y=e.top;return Y.$require("bcdice/dice_table/roll_result"),Y.$require("bcdice/dice_table/chain_table"),Y.$require("bcdice/dice_table/d66_grid_table"),Y.$require("bcdice/dice_table/d66_half_grid_table"),Y.$require("bcdice/dice_table/d66_one_third_table"),Y.$require("bcdice/dice_table/d66_left_range_table"),Y.$require("bcdice/dice_table/d66_parity_table"),Y.$require("bcdice/dice_table/d66_range_table"),Y.$require("bcdice/dice_table/d66_table"),Y.$require("bcdice/dice_table/range_table"),Y.$require("bcdice/dice_table/sai_fic_skill_table"),Y.$require("bcdice/dice_table/table")},Opal.modules["bcdice/enum"]=function(e){var $,M,A,B,J=[],c=e.module;return $=J,M=B=[c(J[0],"BCDice")].concat($),A=[c(B[0],"D66SortType")].concat(M),e.const_set(A[0],"NO_SORT","no_sort"),e.const_set(A[0],"ASC","asc"),e.const_set(A[0],"DESC","desc"),void function(t,M){var A=[c(t,"RoundType")].concat(M);e.const_set(A[0],"CEIL","ceil"),e.const_set(A[0],"FLOOR","floor"),e.const_set(A[0],"ROUND","round")}(B[0],B)},Opal.modules["bcdice/translate"]=function(e){var B,A,k,V,m,M,J=[],w=e.nil,D=e.$$,c=e.module,F=e.hash2;return B=J,A=M=[c(J[0],"BCDice")].concat(B),V=c(M[0],"Translate"),m=[V].concat(A),void e.def(V,"$translate",k=function(U,x){var H,I=this;if(null==I.locale&&(I.locale=w),null==x)x=F([],{});else if(!x.$$is_hash)throw e.ArgumentError.$new("expected kwargs");return H=e.kwrestargs(x,{}),D(m,"I18n").$translate(U,F(["locale","raise"],{locale:I.locale,raise:!0}).$merge(e.to_hash(H)))},k.$$arity=-2)},Opal.modules["bcdice/result"]=function(e){function Y(B,t){return"number"==typeof B&&"number"==typeof t?B-t:B["$-"](t)}var t,v,S,h,P,g,E,m,U,x,H,I,z,b,n,k,j,i,w=[],r=e.nil,$=e.klass,d=e.send;return t=w,m=i=[(0,e.module)(w[0],"BCDice")].concat(t),j=[k=$(i[0],null,"Result")].concat(m),k.$$prototype.secret=k.$$prototype.success=k.$$prototype.failure=k.$$prototype.critical=k.$$prototype.fumble=r,[v=e.get_singleton_class(k)].concat(j),e.def(v,"$success",S=function(l){var _;return d(this.$new(),"tap",[],((_=function(T){function f(R){return T.apply(this,arguments)}return f.toString=function(){return T.toString()},f}(function(T){var R=r;return null==T&&(T=r),d(T,"text=",e.to_a(R=[l])),Y(R.length,1),d(T,"success=",e.to_a(R=[!0])),R[Y(R.length,1)]})).$$s=this,_.$$arity=1,_))},S.$$arity=1),e.def(v,"$failure",h=function(l){var _;return d(this.$new(),"tap",[],((_=function(f){var a=r;return null==f&&(f=r),d(f,"text=",e.to_a(a=[l])),Y(a.length,1),d(f,"failure=",e.to_a(a=[!0])),a[Y(a.length,1)]}).$$s=this,_.$$arity=1,_))},h.$$arity=1),e.def(v,"$critical",P=function(l){var _;return d(this.$new(),"tap",[],((_=function(f){var a=r;return null==f&&(f=r),d(f,"text=",e.to_a(a=[l])),Y(a.length,1),d(f,"critical=",e.to_a(a=[!0])),Y(a.length,1),d(f,"success=",e.to_a(a=[!0])),a[Y(a.length,1)]}).$$s=this,_.$$arity=1,_))},P.$$arity=1),e.def(v,"$fumble",g=function(l){var _;return d(this.$new(),"tap",[],((_=function(f){var a=r;return null==f&&(f=r),d(f,"text=",e.to_a(a=[l])),Y(a.length,1),d(f,"fumble=",e.to_a(a=[!0])),Y(a.length,1),d(f,"failure=",e.to_a(a=[!0])),a[Y(a.length,1)]}).$$s=this,_.$$arity=1,_))},g.$$arity=1),e.def(v,"$nothing",E=function(){return"nothing"},E.$$arity=0),e.def(k,"$initialize",U=function(s){var y=this;return null==s&&(s=r),y.text=s,y.rands=r,y.detailed_rands=r,y.secret=!1,y.success=!1,y.failure=!1,y.critical=!1,y.fumble=!1},U.$$arity=-1),k.$attr_accessor("text","rands","detailed_rands"),k.$attr_writer("secret","success","failure","critical","fumble"),e.def(k,"$secret?",x=function(){return this.secret},x.$$arity=0),e.def(k,"$success?",H=function(){return this.success},H.$$arity=0),e.def(k,"$failure?",I=function(){return this.failure},I.$$arity=0),e.def(k,"$critical?",z=function(){return this.critical},z.$$arity=0),e.def(k,"$fumble?",b=function(){return this.fumble},b.$$arity=0),void e.def(k,"$condition=",n=function(s){return this.success=s,this.failure=s["$!"]()},n.$$arity=1)},Opal.modules["racc/parser"]=function(e){function Y(U,x){return"number"==typeof U&&"number"==typeof x?U<x:U["$<"](x)}function J(U,x){return"number"==typeof U&&"number"==typeof x?U-x:U["$-"](x)}function w(U,x){return"number"==typeof U&&"number"==typeof x?U+x:U["$+"](x)}function r(U,x){return"number"==typeof U&&"number"==typeof x?U>=x:U["$>="](x)}function D(U,x){return"number"==typeof U&&"number"==typeof x?U>x:U["$>"](x)}function c(U,x){return"number"==typeof U&&"number"==typeof x?U<=x:U["$<="](x)}var z,b,n,x,I,B=[],t=e.nil,M=e.$$$,i=e.$$,A=e.module,V=e.klass,m=e.truthy,k=e.gvars,j=e.send;return x=B,z=(I=[A(B[0],"Racc")].concat(x))[0],b=i(I,"StandardError"),n=I,[V(z,b,"ParseError")].concat(n),m(M("::","ParseError","skip_raise")?"constant":t)||e.const_set(B[0],"ParseError",M(i(B,"Racc"),"ParseError")),function(U,x){var v,S,h,P,g,E,K,l,_,o,T,f,R,a,p,G,Z,Q,ae,ue,ye,De,Pe,Me,Be,s,y,I=[A(U,"Racc")].concat(x);m(i(I,"Racc_No_Extensions","skip_raise")?"constant":t)||e.const_set(I[0],"Racc_No_Extensions",!1),v=I,s=V(I[0],null,"Parser"),y=[s].concat(v),s.$$prototype.yydebug=s.$$prototype.racc_debug_out=s.$$prototype.racc_error_status=s.$$prototype.racc_t=s.$$prototype.racc_vstack=s.$$prototype.racc_val=s.$$prototype.racc_state=s.$$prototype.racc_tstack=t,e.const_set(y[0],"Racc_Runtime_Version","1.4.6"),e.const_set(y[0],"Racc_Runtime_Revision",["originalRevision:","1.8"]["$[]"](1)),e.const_set(y[0],"Racc_Runtime_Core_Version_R","1.4.6"),e.const_set(y[0],"Racc_Runtime_Core_Revision_R",["originalRevision:","1.8"]["$[]"](1)),e.const_set(y[0],"Racc_Main_Parsing_Routine","_racc_do_parse_rb"),e.const_set(y[0],"Racc_YY_Parse_Method","_racc_yyparse_rb"),e.const_set(y[0],"Racc_Runtime_Core_Version",i(y,"Racc_Runtime_Core_Version_R")),e.const_set(y[0],"Racc_Runtime_Core_Revision",i(y,"Racc_Runtime_Core_Revision_R")),e.const_set(y[0],"Racc_Runtime_Type","ruby"),e.defs(i(y,"Parser"),"$racc_runtime_type",S=function(){return i(y,"Racc_Runtime_Type")},S.$$arity=0),e.def(s,"$_racc_setup",h=function(){var re,ee,u=this,q=t,C=t,L=t;return null==k.stderr&&(k.stderr=t),m(M(u.$class(),"Racc_debug_parser"))||(u.yydebug=!1),m(null!=(re=u.yydebug)&&re!==t?"instance-variable":t)||(u.yydebug=!1),m(u.yydebug)&&(m(null!=(ee=u.racc_debug_out)&&ee!==t?"instance-variable":t)||(u.racc_debug_out=k.stderr),u.racc_debug_out=m(q=u.racc_debug_out)?q:k.stderr),C=M(u.$class(),"Racc_arg"),m(Y(C.$size(),14))&&(j(C,"[]=",e.to_a(L=[13,!0])),J(L.length,1)),C},h.$$arity=0),e.def(s,"$_racc_init_sysvars",P=function(){var re=this;return re.racc_state=[0],re.racc_tstack=[],re.racc_vstack=[],re.racc_t=t,re.racc_val=t,re.racc_read_next=!0,re.racc_user_yyerror=!1,re.racc_error_status=0},P.$$arity=0),e.def(s,"$do_parse",g=function(){return this.$__send__(i(y,"Racc_Main_Parsing_Routine"),this.$_racc_setup(),!1)},g.$$arity=0),e.def(s,"$next_token",E=function(){return this.$raise(i(y,"NotImplementedError"),this.$class()+"#next_token is not defined")},E.$$arity=0),e.def(s,"$_racc_do_parse_rb",K=function(re,ee){var u,C,L=this,O=t,te=t,$e=t,be=t,ie=t,ve=t,ge=t,de=t;return u=e.to_ary(re),O=null==u[0]?t:u[0],te=null==u[1]?t:u[1],$e=null==u[2]?t:u[2],be=null==u[3]?t:u[3],ie=null==u[10]?t:u[10],L.$_racc_init_sysvars(),ve=ge=de=t,j(L,"catch",["racc_end_parse"],((C=function(){var Ce,Ae,se=null==C.$$s?this:C.$$s,Re=t,Ie=t,ze=t;for(null==se.racc_state&&(se.racc_state=t),null==se.racc_read_next&&(se.racc_read_next=t),null==se.racc_t&&(se.racc_t=t),null==se.yydebug&&(se.yydebug=t),null==se.racc_val&&(se.racc_val=t);m(!0);)for(m(de=be["$[]"](se.racc_state["$[]"](-1)))?(m(se.racc_read_next)&&m(se.racc_t["$!="](0))&&(Ae=se.$next_token(),Ce=e.to_ary(Ae),ve=null==Ce[0]?t:Ce[0],se.racc_val=null==Ce[1]?t:Ce[1],se.racc_t=m(ve)?m(Re=ie["$[]"](ve))?Re:1:0,m(se.yydebug)&&se.$racc_read_token(se.racc_t,ve,se.racc_val),se.racc_read_next=!1),de=w(de,se.racc_t),m(m(Ie=m(ze=r(de,0))?ge=O["$[]"](de):ze)?te["$[]"](de)["$=="](se.racc_state["$[]"](-1)):Ie)||(ge=$e["$[]"](se.racc_state["$[]"](-1)))):ge=$e["$[]"](se.racc_state["$[]"](-1));m(ge=se.$_racc_evalact(ge,re)););}).$$s=L,C.$$arity=0,C))},K.$$arity=2),e.def(s,"$yyparse",l=function(re,ee){return this.$__send__(i(y,"Racc_YY_Parse_Method"),re,ee,this.$_racc_setup(),!0)},l.$$arity=2),e.def(s,"$_racc_yyparse_rb",_=function(re,ee,u,q){var C,O,$e=t,be=t,ne=t,ie=t,ge=t,de=t,Te=t;return C=e.to_ary(u),$e=null==C[0]?t:C[0],be=null==C[1]?t:C[1],ne=null==C[2]?t:C[2],ie=null==C[3]?t:C[3],ge=null==C[10]?t:C[10],this.$_racc_init_sysvars(),de=t,Te=t,j(this,"catch",["racc_end_parse"],((O=function(){var Re,ke=null==O.$$s?this:O.$$s;for(null==ke.racc_state&&(ke.racc_state=t);!m(Te=ie["$[]"](ke.racc_state["$[]"](-1)));)for(;m(de=ke.$_racc_evalact(ne["$[]"](ke.racc_state["$[]"](-1)),u)););return j(re,"__send__",[ee],((Re=function(ze,Le){var We,Ue,Se=null==Re.$$s?this:Re.$$s,qe=t,Ge=t,je=t,He=t,ce=t,W=t,le=t;for(null==Se.racc_t&&(Se.racc_t=t),null==Se.racc_state&&(Se.racc_state=t),null==Se.racc_read_next&&(Se.racc_read_next=t),null==ze&&(ze=t),null==Le&&(Le=t),Se.racc_t=m(ze)?m(qe=ge["$[]"](ze))?qe:1:0,Se.racc_val=Le,Se.racc_read_next=!1,Te=w(Te,Se.racc_t),m(m(We=m(Ue=r(Te,0))?de=$e["$[]"](Te):Ue)?be["$[]"](Te)["$=="](Se.racc_state["$[]"](-1)):We)||(de=ne["$[]"](Se.racc_state["$[]"](-1)));m(de=Se.$_racc_evalact(de,u)););for(;m(m(Ge=m(je=(Te=ie["$[]"](Se.racc_state["$[]"](-1)))["$!"]())?je:Se.racc_read_next["$!"]())?Ge:Se.racc_t["$=="](0));)for(m(m(He=m(ce=m(W=m(le=Te)?Te=w(Te,Se.racc_t):le)?r(Te,0):W)?de=$e["$[]"](Te):ce)?be["$[]"](Te)["$=="](Se.racc_state["$[]"](-1)):He)||(de=ne["$[]"](Se.racc_state["$[]"](-1)));m(de=Se.$_racc_evalact(de,u)););}).$$s=ke,Re.$$arity=2,Re))}).$$s=this,O.$$arity=0,O))},_.$$arity=4),e.def(s,"$_racc_evalact",o=function(re,ee){var u,C,ne,ve,L=this,O=t,te=t,be=t,ie=t,ge=t,de=t,Te=t,se=t,ke=t,Ce=t;if(O=null==(u=e.to_ary(ee))[0]?t:u[0],te=null==u[1]?t:u[1],be=null==u[3]?t:u[3],ne=null==u[11]?t:u[11],ie=null==u[12]?t:u[12],m(m(ve=D(re,0))?Y(re,ne):ve))m(D(L.racc_error_status,0))&&(L.racc_t["$=="](1)||(L.racc_error_status=J(L.racc_error_status,1))),L.racc_vstack.$push(L.racc_val),L.racc_state.$push(re),L.racc_read_next=!0,m(L.yydebug)&&(L.racc_tstack.$push(L.racc_t),L.$racc_shift(L.racc_t,L.racc_tstack,L.racc_vstack));else if(m(m(ge=Y(re,0))?D(re,ie["$-@"]()):ge)){if(de=j(L,"catch",["racc_jump"],((C=function(){var Re=null==C.$$s?this:C.$$s;return null==Re.racc_state&&(Re.racc_state=t),Re.racc_state.$push(Re.$_racc_do_reduce(ee,re)),!1}).$$s=L,C.$$arity=0,C)),m(de)){if(1["$==="](Te=de))return L.racc_user_yyerror=!0,ie["$-@"]();if(2["$==="](Te))return ne;L.$raise("[Racc Bug] unknown jump code")}}else if(re["$=="](ne))m(L.yydebug)&&L.$racc_accept(),L.$throw("racc_end_parse",L.racc_vstack["$[]"](0));else{if(re["$=="](ie["$-@"]())){for((0)["$==="](Te=L.racc_error_status)?m(ee["$[]"](21))||L.$on_error(L.racc_t,L.racc_val,L.racc_vstack):3["$==="](Te)&&(L.racc_t["$=="](0)&&L.$throw("racc_end_parse",t),L.racc_read_next=!0),L.racc_user_yyerror=!1,L.racc_error_status=3;m(!0)&&(!m(se=be["$[]"](L.racc_state["$[]"](-1)))||(se=w(se,1),!m(m(ke=m(Ce=r(se,0))?re=O["$[]"](se):Ce)?te["$[]"](se)["$=="](L.racc_state["$[]"](-1)):ke)));)m(c(L.racc_state.$size(),1))&&L.$throw("racc_end_parse",t),L.racc_state.$pop(),L.racc_vstack.$pop(),m(L.yydebug)&&(L.racc_tstack.$pop(),L.$racc_e_pop(L.racc_state,L.racc_tstack,L.racc_vstack));return re}L.$raise("[Racc Bug] unknown action "+re.$inspect())}return m(L.yydebug)&&L.$racc_next_state(L.racc_state["$[]"](-1),L.racc_state),t},o.$$arity=2),e.def(s,"$_racc_do_reduce",T=function(re,ee){var u,ne,ve,Ce,Ae,Re,Se,C=this,O=t,te=t,$e=t,be=t,ie=t,ge=t,de=t,Te=t,se=t,ke=t,Ie=t,ze=t,Le=t,Fe=t,Ne=t,qe=t;return O=null==(u=e.to_ary(re))[4]?t:u[4],te=null==u[5]?t:u[5],$e=null==u[6]?t:u[6],be=null==u[7]?t:u[7],ne=null==u[8]?t:u[8],ie=null==u[9]?t:u[9],ve=null==u[13]?t:u[13],ge=C.racc_state,de=C.racc_vstack,Te=C.racc_tstack,se=function(U,x){return"number"==typeof U?-3*U:U["$*"](-3)}(ee),ke=ie["$[]"](se),Ce=ie["$[]"](w(se,1)),Ae=ie["$[]"](w(se,2)),Re=[],m(C.yydebug)&&(Ie=Te["$[]"](ke["$-@"](),ke)),ze=de["$[]"](ke["$-@"](),ke),m(C.yydebug)&&(Le=[ke["$-@"](),ke,Re],j(Te,"[]=",e.to_a(Le)),J(Le.length,1)),Le=[ke["$-@"](),ke,Re],j(de,"[]=",e.to_a(Le)),J(Le.length,1),Le=[ke["$-@"](),ke,Re],j(ge,"[]=",e.to_a(Le)),J(Le.length,1),m(ve)?de.$push(C.$__send__(Ae,ze,de,ze["$[]"](0))):de.$push(C.$__send__(Ae,ze,de)),Te.$push(Ce),m(C.yydebug)&&C.$racc_reduce(Ie,Ce,Te,de),Se=J(Ce,ne),m(se=be["$[]"](Se))&&(se=w(se,ge["$[]"](-1)),m(m(Fe=m(Ne=r(se,0))?qe=O["$[]"](se):Ne)?te["$[]"](se)["$=="](Se):Fe))?qe:$e["$[]"](Se)},T.$$arity=2),e.def(s,"$on_error",f=function(re,ee,u){var C,q=this;return q.$raise(i(y,"ParseError"),q.$sprintf("\nparse error on value %s (%s)",ee.$inspect(),m(C=q.$token_to_str(re))?C:"?"))},f.$$arity=3),e.def(s,"$yyerror",R=function(){return this.$throw("racc_jump",1)},R.$$arity=0),e.def(s,"$yyaccept",a=function(){return this.$throw("racc_jump",2)},a.$$arity=0),e.def(s,"$yyerrok",p=function(){return this.racc_error_status=0},p.$$arity=0),e.def(s,"$racc_read_token",G=function(re,ee,u){var q=this;return q.racc_debug_out.$print("read "),q.racc_debug_out.$print(ee.$inspect(),"(",q.$racc_token2str(re),") "),q.racc_debug_out.$puts(u.$inspect()),q.racc_debug_out.$puts()},G.$$arity=3),e.def(s,"$racc_shift",Z=function(re,ee,u){var q=this;return q.racc_debug_out.$puts("shift "+q.$racc_token2str(re)),q.$racc_print_stacks(ee,u),q.racc_debug_out.$puts()},Z.$$arity=3),e.def(s,"$racc_reduce",Q=function(re,ee,u,q){var C,L=this,O=t;return(O=L.racc_debug_out).$print("reduce "),m(re["$empty?"]())?O.$print(" <none>"):j(re,"each",[],((C=function($e){return null==$e&&($e=t),O.$print(" ",(null==C.$$s?this:C.$$s).$racc_token2str($e))}).$$s=L,C.$$arity=1,C)),O.$puts(" --\x3e "+L.$racc_token2str(ee)),L.$racc_print_stacks(u,q),L.racc_debug_out.$puts()},Q.$$arity=4),e.def(s,"$racc_accept",ae=function(){return this.racc_debug_out.$puts("accept"),this.racc_debug_out.$puts()},ae.$$arity=0),e.def(s,"$racc_e_pop",ue=function(re,ee,u){var q=this;return q.racc_debug_out.$puts("error recovering mode: pop token"),q.$racc_print_states(re),q.$racc_print_stacks(ee,u),q.racc_debug_out.$puts()},ue.$$arity=3),e.def(s,"$racc_next_state",ye=function(re,ee){var u=this;return u.racc_debug_out.$puts("goto "+re),u.$racc_print_states(ee),u.racc_debug_out.$puts()},ye.$$arity=2),e.def(s,"$racc_print_stacks",De=function(re,ee){var u,C=t;return(C=this.racc_debug_out).$print(" ["),j(re,"each_index",[],((u=function(O){return null==O&&(O=t),C.$print(" (",(null==u.$$s?this:u.$$s).$racc_token2str(re["$[]"](O))," ",ee["$[]"](O).$inspect(),")")}).$$s=this,u.$$arity=1,u)),C.$puts(" ]")},De.$$arity=2),e.def(s,"$racc_print_states",Pe=function(re){var ee,q=t;return(q=this.racc_debug_out).$print(" ["),j(re,"each",[],((ee=function(L){return null==L&&(L=t),q.$print(" ",L)}).$$s=this,ee.$$arity=1,ee)),q.$puts(" ]")},Pe.$$arity=1),e.def(s,"$racc_token2str",Me=function(re){var u;return m(u=M(this.$class(),"Racc_token_to_s_table")["$[]"](re))?u:this.$raise("[Racc Bug] can't convert token "+re+" to string")},Me.$$arity=1),e.def(s,"$token_to_str",Be=function(re){return M(this.$class(),"Racc_token_to_s_table")["$[]"](re)},Be.$$arity=1)}(B[0],B)},Opal.modules["bcdice/arithmetic/node"]=function(e){function Y(B,t){return"number"==typeof B&&"number"==typeof t?B/t:B["$/"](t)}var t,V,U,I,z,b,s,y,S,h,P,g,n,v,H,k,i,w=[],r=e.nil,D=e.$$$,c=e.$$,F=e.module,$=e.klass,d=e.send2;return t=w,V=i=[F(w[0],"BCDice")].concat(t),U=k=[F(i[0],"Arithmetic")].concat(V),function(I,z,b){var s,y,S,h,P,n=$(I,null,"BinaryOp");[n].concat(b),n.$$prototype.lhs=n.$$prototype.rhs=n.$$prototype.op=r,e.def(n,"$initialize",s=function(E,K,l){var _=this;return _.lhs=E,_.op=K,_.rhs=l},s.$$arity=3),e.def(n,"$eval",y=function(E){var _,K=this,l=r;return l=K.lhs.$eval(E),_=K.rhs.$eval(E),l.$send(K.op,_)},y.$$arity=1),e.def(n,"$output",S=function(){var E=this;return""+E.lhs.$output()+E.op+E.rhs.$output()},S.$$arity=0),e.def(n,"$s_exp",h=function(){var E=this;return"("+E.$op_for_s_exp()+" "+E.lhs.$s_exp()+" "+E.rhs.$s_exp()+")"},h.$$arity=0),e.def(n,"$op_for_s_exp",P=function(){return this.op},P.$$arity=0)}((H=[F(k[0],"Node")].concat(U))[0],0,H),I=H[0],z=c(H,"BinaryOp"),b=H,n=$(I,z,"DivideBase"),v=[n].concat(b),n.$$prototype.lhs=n.$$prototype.rhs=n.$$prototype.op=r,e.def(n,"$initialize",s=function(K,l){return s.$$p&&(s.$$p=null),d(this,e.find_super_dispatcher(this,"initialize",s,!1,!0),"initialize",[K,"/",l],null)},s.$$arity=2),e.def(n,"$eval",y=function(K){var _,l=this,o=r;return _=l.lhs.$eval(K),(o=l.rhs.$eval(K))["$=="](0)&&l.$raise(c(v,"ZeroDivisionError")),l.$divide_and_round(_,o,K)},y.$$arity=1),e.def(n,"$output",S=function(){var K=S.$$p,_=this,o=r,T=r,f=r;for(K&&(S.$$p=null),T=0,f=arguments.length,o=new Array(f);T<f;T++)o[T]=arguments[T];return""+d(_,e.find_super_dispatcher(_,"output",S,!1,!0),"output",o,K)+_.$rounding_method()},S.$$arity=0),n.$private(),e.def(n,"$rounding_method",h=function(){return D(this.$class(),"ROUNDING_METHOD")},h.$$arity=0),e.def(n,"$op_for_s_exp",P=function(){return""+this.op+this.$rounding_method()},P.$$arity=0),e.def(n,"$divide_and_round",g=function(K,l,_){return this.$raise(c(v,"NotImplementedError"))},g.$$arity=3),function(I,z,b){var s,n=$(I,z,"DivideWithGameSystemDefault"),v=[n].concat(b);e.const_set(v[0],"ROUNDING_METHOD",""),n.$private(),e.def(n,"$divide_and_round",s=function(S,h,P){var E;return E=P,D(c(v,"RoundType"),"CEIL")["$==="](E)?Y(S.$to_f(),h).$ceil():D(c(v,"RoundType"),"ROUND")["$==="](E)?Y(S.$to_f(),h).$round():Y(S,h).$to_i()},s.$$arity=3)}(H[0],c(H,"DivideBase"),H),function(I,z,b){var s,n=$(I,z,"DivideWithCeil"),v=[n].concat(b);e.const_set(v[0],"ROUNDING_METHOD","C"),n.$private(),e.def(n,"$divide_and_round",s=function(S,h,P){return Y(S.$to_f(),h).$ceil()},s.$$arity=3)}(H[0],c(H,"DivideBase"),H),function(I,z,b){var s,n=$(I,z,"DivideWithRound"),v=[n].concat(b);e.const_set(v[0],"ROUNDING_METHOD","R"),n.$private(),e.def(n,"$divide_and_round",s=function(S,h,P){return Y(S.$to_f(),h).$round()},s.$$arity=3)}(H[0],c(H,"DivideBase"),H),function(I,z,b){var s,n=$(I,z,"DivideWithFloor"),v=[n].concat(b);e.const_set(v[0],"ROUNDING_METHOD","F"),n.$private(),e.def(n,"$divide_and_round",s=function(S,h,P){return Y(S,h).$to_i()},s.$$arity=3)}(H[0],c(H,"DivideBase"),H),function(I,z,b){var s,y,S,h,n=$(I,null,"Negative");[n].concat(b),n.$$prototype.body=r,e.def(n,"$initialize",s=function(g){return this.body=g},s.$$arity=1),e.def(n,"$eval",y=function(g){return this.body.$eval(g)["$-@"]()},y.$$arity=1),e.def(n,"$output",S=function(){return"-"+this.body.$output()},S.$$arity=0),e.def(n,"$s_exp",h=function(){return"(- "+this.body.$s_exp()+")"},h.$$arity=0)}(H[0],0,H),function(I,z,b){var s,y,S,h,n=$(I,null,"Parenthesis");[n].concat(b),n.$$prototype.expr=r,e.def(n,"$initialize",s=function(g){return this.expr=g},s.$$arity=1),e.def(n,"$eval",y=function(g){return this.expr.$eval(g)},y.$$arity=1),e.def(n,"$output",S=function(){return"("+this.expr.$output()+")"},S.$$arity=0),e.def(n,"$s_exp",h=function(){return"(Parenthesis "+this.expr.$s_exp()+")"},h.$$arity=0)}(H[0],0,H),void function(I,z,b){var s,y,S,n=$(I,null,"Number");[n].concat(b),n.$$prototype.value=r,e.def(n,"$initialize",s=function(P){return this.value=P},s.$$arity=1),e.def(n,"$eval",y=function(P){return this.value},y.$$arity=1),e.def(n,"$output",S=function(){return this.value.$to_s()},S.$$arity=0),e.alias(n,"s_exp","output")}(H[0],0,H)},Opal.modules.strscan=function(e){var M,V,m,k,j,U,x,H,I,z,b,n,v,s,y,S,h,P,g,E,K,l,_,o,T,f,i,A,w=[],r=e.nil,c=e.$$,$=e.truthy,d=e.send;return M=w,i=(0,e.klass)(w[0],null,"StringScanner"),A=[i].concat(M),i.$$prototype.pos=i.$$prototype.string=i.$$prototype.working=i.$$prototype.matched=i.$$prototype.prev_pos=i.$$prototype.match=r,i.$attr_reader("pos"),i.$attr_reader("matched"),e.def(i,"$initialize",V=function(a){var p=this;return p.string=a,p.pos=0,p.matched=r,p.working=a,p.match=[]},V.$$arity=1),i.$attr_reader("string"),e.def(i,"$beginning_of_line?",m=function(){var a=this;return 0===a.pos||"\n"===a.string.charAt(a.pos-1)},m.$$arity=0),e.alias(i,"bol?","beginning_of_line?"),e.def(i,"$scan",k=function(a){var p=this,G=(a=p.$anchor(a)).exec(p.working);return null==G?p.matched=r:"object"==typeof G?(p.prev_pos=p.pos,p.pos+=G[0].length,p.working=p.working.substring(G[0].length),p.matched=G[0],p.match=G,G[0]):"string"==typeof G?(p.pos+=G.length,p.working=p.working.substring(G.length),G):r},k.$$arity=1),e.def(i,"$scan_until",j=function(a){var p=this;a=p.$anchor(a);for(var Q,G=p.pos,Z=p.working;;){if(Q=a.exec(Z),G+=1,Z=Z.substr(1),null!=Q)return p.matched=p.string.substr(p.pos,G-p.pos-1+Q[0].length),p.match=Q,p.prev_pos=G-1,p.pos=G,p.working=Z.substr(Q[0].length),p.matched;if(0===Z.length)return p.match=[],p.matched=r}},j.$$arity=1),e.def(i,"$[]",U=function(a){var G;if($(this.match["$empty?"]()))return r;G=a,c(A,"Symbol")["$==="](G)?a=a.$to_s():c(A,"String")["$==="](G)||(a=c(A,"Opal")["$coerce_to!"](a,c(A,"Integer"),"to_int"));var Z=this.match;return a<0&&(a+=Z.length),a<0||a>=Z.length||null==Z[a]?r:Z[a]},U.$$arity=1),e.def(i,"$check",x=function(a){var p=this,G=(a=p.$anchor(a)).exec(p.working);return p.matched=null==G?r:G[0]},x.$$arity=1),e.def(i,"$check_until",H=function(a){var p=this,G=p.prev_pos,Z=p.pos,Q=p.$scan_until(a);return Q!==r&&(p.matched=Q.substr(-1),p.working=p.string.substr(Z)),p.prev_pos=G,p.pos=Z,Q},H.$$arity=1),e.def(i,"$peek",I=function(a){return this.working.substring(0,a)},I.$$arity=1),e.def(i,"$eos?",z=function(){return 0===this.working.length},z.$$arity=0),e.def(i,"$exist?",b=function(a){var G=a.exec(this.working);return null==G?r:0==G.index?0:G.index+1},b.$$arity=1),e.def(i,"$skip",n=function(a){var p=this,G=(a=p.$anchor(a)).exec(p.working);if(null==G)return p.match=[],p.matched=r;var Z=G[0],Q=Z.length;return p.matched=Z,p.match=G,p.prev_pos=p.pos,p.pos+=Q,p.working=p.working.substring(Q),Q},n.$$arity=1),e.def(i,"$skip_until",v=function(a){var G=this.$scan_until(a);return G===r?r:(this.matched=G.substr(-1),G.length)},v.$$arity=1),e.def(i,"$get_byte",s=function(){var a=this,p=r;return a.pos<a.string.length?(a.prev_pos=a.pos,a.pos+=1,p=a.matched=a.working.substring(0,1),a.working=a.working.substring(1)):a.matched=r,p},s.$$arity=0),e.alias(i,"getch","get_byte"),e.def(i,"$match?",y=function(a){var p=this,G=(a=p.$anchor(a)).exec(p.working);return null==G?r:(p.prev_pos=p.pos,G[0].length)},y.$$arity=1),e.def(i,"$pos=",S=function(a){var p=this;return a<0&&(a+=p.string.$length()),p.pos=a,p.working=p.string.slice(a)},S.$$arity=1),e.def(i,"$matched_size",h=function(){return this.matched===r?r:this.matched.length},h.$$arity=0),e.def(i,"$post_match",P=function(){var a=this;return a.matched===r?r:a.string.substr(a.pos)},P.$$arity=0),e.def(i,"$pre_match",g=function(){var a=this;return a.matched===r?r:a.string.substr(0,a.prev_pos)},g.$$arity=0),e.def(i,"$reset",E=function(){var a=this;return a.working=a.string,a.matched=r,a.pos=0},E.$$arity=0),e.def(i,"$rest",K=function(){return this.working},K.$$arity=0),e.def(i,"$rest?",l=function(){return 0!==this.working.length},l.$$arity=0),e.def(i,"$rest_size",_=function(){return this.$rest().$size()},_.$$arity=0),e.def(i,"$terminate",o=function(){var p,a=this;return a.match=r,p=[a.string.$length()],d(a,"pos=",e.to_a(p)),p[function(B,t){return"number"==typeof B?B-1:B["$-"](1)}(p.length)]},o.$$arity=0),e.def(i,"$unscan",T=function(){var a=this;return a.pos=a.prev_pos,a.prev_pos=r,a.match=r,a},T.$$arity=0),i.$private(),e.def(i,"$anchor",f=function(a){var G=a.toString().match(/\/([^\/]+)$/);return G=G?G[1]:void 0,new RegExp("^(?:"+a.source+")",G)},f.$$arity=1),r&&"anchor"},Opal.modules["bcdice/normalize"]=function(e){var M,V,m,i,$,B,J=[],w=e.nil,c=e.module;return $=J,M=B=[c(J[0],"BCDice")].concat($),[i=c(B[0],"Normalize")].concat(M),i.$module_function(),e.def(i,"$comparison_operator",V=function(j){var x;return/<=|=</["$==="](x=j)?"<=":/>=|=>/["$==="](x)?">=":/<>|!=|=!/["$==="](x)?"!=":/</["$==="](x)?"<":/>/["$==="](x)?">":/=/["$==="](x)?"==":w},V.$$arity=1),void e.def(i,"$target_number",m=function(j){return j["$=="]("?")?j:j.$to_i()},m.$$arity=1)},Opal.modules["bcdice/command/lexer"]=function(e){var M,m,H,b,n,v,I,z,j,A,Y=e.top,J=[],w=e.nil,D=e.$$,c=e.module,F=e.klass,$=e.hash2,d=e.truthy,B=e.send;return Y.$require("strscan"),Y.$require("bcdice/normalize"),M=J,m=A=[c(J[0],"BCDice")].concat(M),H=j=[c(A[0],"Command")].concat(m),I=F(j[0],null,"Lexer"),z=[I].concat(H),I.$$prototype.scanner=I.$$prototype.notations=w,e.const_set(z[0],"SYMBOLS",$(["+","-","*","/","(",")","?","@","#","$"],{"+":"PLUS","-":"MINUS","*":"ASTERISK","/":"SLASH","(":"PARENL",")":"PARENR","?":"QUESTION","@":"AT","#":"SHARP",$:"DOLLAR"}).$freeze()),e.def(I,"$initialize",b=function(y,S){var h,P,g,K,E=this;return y=d(K=(P=(h=y)===w||null==h?w:B(h,"split",[" ",2]))===w||null==P?w:B(P,"first",[]))?K:"",E.scanner=D(z,"StringScanner").$new(y),E.notations=B(S,"map",[],((g=function(l){function _(o){return l.apply(this,arguments)}return _.toString=function(){return l.toString()},_}(function(l){return null==l&&(l=w),d(l["$is_a?"](D(z,"String")))?D(z,"Regexp").$new(l):l})).$$s=E,g.$$arity=1,g))},b.$$arity=2),e.def(I,"$next_token",n=function(){try{var y,S=this,h=w,P=w,E=w,K=w;return d(S.scanner["$eos?"]())?[!1,"$"]:(B(S.notations,"each",[],((y=function(_){var T,o=null==y.$$s?this:y.$$s;if(null==o.scanner&&(o.scanner=w),null==_&&(_=w),T=o.scanner.$scan(_),!d(T))return w;e.ret(["NOTATION",T])}).$$s=S,y.$$arity=1,y)),d(h=S.scanner.$scan(/\d+/))?["NUMBER",h.$to_i()]:d(P=S.scanner.$scan(/[<>!=]+/))?(P=D(z,"Normalize").$comparison_operator(P),[d(P)?"CMP_OP":"ILLEGAL",P]):(E=S.scanner.$getch().$upcase(),[d(K=D(z,"SYMBOLS")["$[]"](E))?K:E.$to_sym(),E]))}catch(l){if(l===e.returner)return l.$v;throw l}},n.$$arity=0),void e.def(I,"$source",v=function(){return this.scanner.$string()},v.$$arity=0)},Opal.modules["bcdice/command/parsed"]=function(e){var B,A,U,I,z,b,x,H,m,M,J=[],w=e.nil,D=e.$$,c=e.module,F=e.klass,$=e.truthy;return B=J,A=M=[c(J[0],"BCDice")].concat(B),U=m=[c(M[0],"Command")].concat(A),x=F(m[0],null,"Parsed"),H=[x].concat(U),x.$$prototype.question_target=x.$$prototype.critical=x.$$prototype.fumble=x.$$prototype.dollar=x.$$prototype.modify_number=x.$$prototype.target_number=x.$$prototype.prefix_number=x.$$prototype.command=x.$$prototype.suffix_number=x.$$prototype.cmp_op=w,x.$attr_accessor("command"),x.$attr_accessor("prefix_number"),x.$attr_accessor("suffix_number"),x.$attr_accessor("critical"),x.$attr_accessor("fumble"),x.$attr_accessor("dollar"),x.$attr_accessor("modify_number"),x.$attr_accessor("cmp_op"),x.$attr_accessor("target_number"),x.$attr_writer("question_target"),e.def(x,"$initialize",I=function(){var v=this;return v.prefix_number=w,v.suffix_number=w,v.critical=w,v.fumble=w,v.dollar=w,v.cmp_op=w,v.target_number=w,v.question_target=!1},I.$$arity=0),e.def(x,"$question_target?",z=function(){return this.question_target},z.$$arity=0),void e.def(x,"$to_s",b=function(v){var E,s=this,y=w,S=w,h=w,P=w,g=w;return null==v&&(v="after_command"),y=$(s.critical)?"@"+s.critical:w,S=$(s.fumble)?"#"+s.fumble:w,h=$(s.dollar)?"$"+s.dollar:w,P=D(H,"Format").$modifier(s.modify_number),g=$(s.question_target)?"?":s.target_number,"after_command"["$==="](E=v)?[s.prefix_number,s.command,s.suffix_number,y,S,h,P,s.cmp_op,g].$join():"after_modify_number"["$==="](E)?[s.prefix_number,s.command,s.suffix_number,P,y,S,h,s.cmp_op,g].$join():"after_target_number"["$==="](E)?[s.prefix_number,s.command,s.suffix_number,P,s.cmp_op,g,y,S,h].$join():w},b.$$arity=-1)},Opal.modules["bcdice/command/parser"]=function(e){function Y(A,V){return"number"==typeof A&&"number"==typeof V?A-V:A["$-"](V)}var V,U,I,z,b,s,y,S,h,P,g,E,K,l,_,o,T,f,R,a,p,G,Z,Q,ae,ue,ye,De,Pe,Me,Be,me,re,ee,u,q,C,L,O,te,$e,be,ne,ie,ve,ge,de,Te,se,ke,Ce,Ae,Re,Ie,ze,Le,Se,Fe,Ne,qe,Ge,n,v,H,k,J=e.top,w=[],r=e.nil,D=e.$$$,c=e.$$,F=e.klass,$=e.module,d=e.hash2,B=e.send2,t=e.send,M=e.hash,i=e.truthy;return J.$require("racc/parser.rb"),J.$require("bcdice/arithmetic/node"),J.$require("bcdice/command/lexer"),J.$require("bcdice/command/parsed"),function(A,V,m){[F(A,V,"Parser")].concat(m)}(D(c(w,"BCDice"),"Command"),D(c(w,"Racc"),"Parser"),w),V=w,U=k=[$(w[0],"BCDice")].concat(V),I=(H=[$(k[0],"Command")].concat(U))[0],z=D(c(H,"Racc"),"Parser"),b=H,n=F(I,z,"Parser"),v=[n].concat(b),n.$$prototype.notations=n.$$prototype.lexer=n.$$prototype.modifier=n.$$prototype.prefix_number=n.$$prototype.suffix_number=n.$$prototype.need_suffix_number=n.$$prototype.need_prefix_number=n.$$prototype.critical=n.$$prototype.fumble=n.$$prototype.dollar=n.$$prototype.allowed_cmp_op=n.$$prototype.question_target=r,e.def(n,"$initialize",s=function(W,le){var X,N,_e,xe,pe=s.$$p,fe=this;if(pe&&(s.$$p=null),X=e.slice.call(arguments,0,arguments.length),null==(N=e.extract_kwargs(X)))N=d([],{});else if(!N.$$is_hash)throw e.ArgumentError.$new("expected kwargs");if(_e=X,!e.hasOwnProperty.call(N.$$smap,"round_type"))throw e.ArgumentError.$new("missing keyword: round_type");return xe=N.$$smap.round_type,B(fe,e.find_super_dispatcher(fe,"initialize",s,!1,!0),"initialize",[],null),fe.notations=_e,fe.round_type=xe,fe.prefix_number=!1,fe.suffix_number=!1,fe.need_prefix_number=!1,fe.need_suffix_number=!1,fe.modifier=!0,fe.critical=!1,fe.fumble=!1,fe.dollar=!1,fe.allowed_cmp_op=[r,">=",">","<=","<","==","!="],fe.question_target=!1},s.$$arity=-2),e.def(n,"$disable_modifier",y=function(){return this.modifier=!1,this},y.$$arity=0),e.def(n,"$enable_prefix_number",S=function(){return this.prefix_number=!0,this},S.$$arity=0),e.def(n,"$enable_suffix_number",h=function(){return this.suffix_number=!0,this},h.$$arity=0),e.def(n,"$has_prefix_number",P=function(){var W=this;return W.prefix_number=!0,W.need_prefix_number=!0,W},P.$$arity=0),e.def(n,"$has_suffix_number",g=function(){var W=this;return W.suffix_number=!0,W.need_suffix_number=!0,W},g.$$arity=0),e.def(n,"$enable_critical",E=function(){return this.critical=!0,this},E.$$arity=0),e.def(n,"$enable_fumble",K=function(){return this.fumble=!0,this},K.$$arity=0),e.def(n,"$enable_dollar",l=function(){return this.dollar=!0,this},l.$$arity=0),e.def(n,"$restrict_cmp_op_to",_=function(W){var le,N=this;return le=e.slice.call(arguments,0,arguments.length),N.allowed_cmp_op=le,N},_.$$arity=-1),e.def(n,"$enable_question_target",o=function(){return this.question_target=!0,this},o.$$arity=0),e.def(n,"$parse",T=function(W){try{return this.lexer=c(v,"Lexer").$new(W,this.notations),this.$do_parse()}catch(X){if(!e.rescue(X,[c(v,"ParseError"),c(v,"ZeroDivisionError")]))throw X;try{return r}finally{e.pop_exception()}}},T.$$arity=1),n.$private(),e.def(n,"$parsed",f=function(W,le,X,N){var _e;return t(c(v,"Parsed").$new(),"tap",[],((_e=function(he){var we,Ee,Ke,Xe,Ye,Ve,fe=null==_e.$$s?this:_e.$$s,oe=r;return null==fe.round_type&&(fe.round_type=r),null==he&&(he=r),oe=[W["$[]"]("command")],t(he,"command=",e.to_a(oe)),Y(oe.length,1),oe=[(we=W["$[]"]("prefix"),we===r||null==we?r:t(we,"eval",[fe.round_type]))],t(he,"prefix_number=",e.to_a(oe)),Y(oe.length,1),oe=[(Ee=W["$[]"]("suffix"),Ee===r||null==Ee?r:t(Ee,"eval",[fe.round_type]))],t(he,"suffix_number=",e.to_a(oe)),Y(oe.length,1),oe=[(Ke=le["$[]"]("critical"),Ke===r||null==Ke?r:t(Ke,"eval",[fe.round_type]))],t(he,"critical=",e.to_a(oe)),Y(oe.length,1),oe=[(Xe=le["$[]"]("fumble"),Xe===r||null==Xe?r:t(Xe,"eval",[fe.round_type]))],t(he,"fumble=",e.to_a(oe)),Y(oe.length,1),oe=[(Ye=le["$[]"]("dollar"),Ye===r||null==Ye?r:t(Ye,"eval",[fe.round_type]))],t(he,"dollar=",e.to_a(oe)),Y(oe.length,1),oe=[X.$eval(fe.round_type)],t(he,"modify_number=",e.to_a(oe)),Y(oe.length,1),oe=[N["$[]"]("cmp_op")],t(he,"cmp_op=",e.to_a(oe)),Y(oe.length,1),N["$[]"]("target")["$=="]("?")?(t(he,"question_target=",e.to_a(oe=[!0])),Y(oe.length,1),t(he,"target_number=",e.to_a(oe=[0])),oe[Y(oe.length,1)]):(t(he,"question_target=",e.to_a(oe=[!1])),Y(oe.length,1),oe=[(Ve=N["$[]"]("target"),Ve===r||null==Ve?r:t(Ve,"eval",[fe.round_type]))],t(he,"target_number=",e.to_a(oe)),oe[Y(oe.length,1)])}).$$s=this,_e.$$arity=1,_e))},f.$$arity=4),e.def(n,"$next_token",R=function(){return this.lexer.$next_token()},R.$$arity=0),Ae=[6,6,6,6,7,28,29,17,18,5,5,5,5,6,26,12,4,45,17,18,10,11,5,10,11,6,23,24,25,26,17,18,6,20,5,33,34,17,18,6,35,5,28,29,17,18,6,r,5,36,37,17,18,6,r,5,36,37,17,18,6,r,5,36,37,17,18,6,r,5,33,34,17,18,6,r,5,36,37,17,18,6,r,5,36,37,17,18,6,r,5,36,37,17,18,6,r,5,36,37,17,18,6,r,5,r,r,17,18,6,r,5,r,r,17,18,r,r,5,23,24,25,26,56,54,55,57],Re=[0,4,26,12,1,21,21,26,26,0,4,26,12,5,21,3,0,26,5,5,8,8,5,2,2,10,8,8,8,8,10,10,11,7,10,14,14,11,11,17,14,11,9,9,17,17,18,r,17,15,15,18,18,23,r,18,30,30,23,23,24,r,23,31,31,24,24,25,r,24,44,44,25,25,28,r,25,47,47,28,28,29,r,28,48,48,29,29,33,r,29,49,49,33,33,34,r,33,50,50,34,34,36,r,34,r,r,36,36,37,r,36,r,r,37,37,r,r,37,27,27,27,27,52,52,52,52],Ie=[-2,4,16,-3,-1,11,r,33,13,35,23,30,1,r,28,40,r,37,44,r,r,-2,r,51,58,65,0,106,72,79,47,54,r,86,93,r,100,107,r,r,r,r,r,r,63,r,r,68,75,82,89,r,120,r,r,r,r,r],ze=[-35,-35,-8,-35,-7,-35,-34,-35,-16,-8,-35,-35,-5,-6,-35,-21,-24,-35,-35,-32,58,-16,-3,-35,-35,-35,-35,-16,-35,-35,-12,-13,-4,-35,-35,-33,-35,-35,-30,-31,-1,-9,-10,-11,-17,-18,-2,-14,-15,-19,-20,-22,-25,-23,-26,-27,-28,-29],Le=[30,31,38,39,14,8,1,22,41,42,43,9,27,2,53,r,r,21,47,48,40,51,52,49,50,44,46,3,r,r,r,13,r,r,r,r,r,r,r,32],Se=[8,8,7,7,9,3,1,5,7,7,7,4,3,2,10,r,r,4,8,8,5,7,7,8,8,9,5,6,r,r,r,6,r,r,r,r,r,r,r,6],Fe=[r,6,13,3,9,-1,27,-15,-10,-1,-38],Ne=[r,r,r,r,r,r,19,16,15,r,r],qe=[0,0,"racc_error",4,20,"_reduce_1",4,20,"_reduce_2",3,20,"_reduce_3",3,21,"_reduce_4",2,21,"_reduce_5",2,21,"_reduce_6",1,21,"_reduce_7",0,22,"_reduce_8",3,22,"_reduce_9",3,22,"_reduce_10",3,22,"_reduce_11",2,23,"_reduce_12",2,23,"_reduce_13",3,23,"_reduce_14",3,23,"_reduce_15",0,24,"_reduce_16",2,24,"_reduce_17",2,24,"_reduce_18",3,28,"_reduce_19",3,28,"_reduce_20",1,28,"_reduce_none",3,27,"_reduce_22",4,27,"_reduce_23",1,27,"_reduce_none",0,29,"_reduce_25",1,29,"_reduce_26",1,29,"_reduce_27",1,29,"_reduce_28",1,29,"_reduce_29",2,26,"_reduce_30",2,26,"_reduce_31",1,26,"_reduce_none",3,25,"_reduce_33",1,25,"_reduce_34"],Ge=M(!1,0,"error",1,"NUMBER",2,"R",3,"U",4,"C",5,"F",6,"PLUS",7,"MINUS",8,"ASTERISK",9,"SLASH",10,"PARENL",11,"PARENR",12,"AT",13,"SHARP",14,"DOLLAR",15,"CMP_OP",16,"QUESTION",17,"NOTATION",18),e.const_set(v[0],"Racc_arg",[Ae,Re,ze,Ie,Le,Se,Ne,Fe,19,qe,Ge,58,35,!0]),e.const_set(v[0],"Racc_token_to_s_table",["$end","error","NUMBER","R","U","C","F","PLUS","MINUS","ASTERISK","SLASH","PARENL","PARENR","AT","SHARP","DOLLAR","CMP_OP","QUESTION","NOTATION","$start","expr","notation","option","modifier","target","term","unary","mul","add","round_type"]),e.const_set(v[0],"Racc_debug_parser",!1),e.def(n,"$_reduce_1",a=function(W,le,X){var N;return i(this.modifier)||this.$raise(c(v,"ParseError")),N=e.to_ary(W),this.$parsed(null==N[0]?r:N[0],null==N[1]?r:N[1],null==N[2]?r:N[2],null==N[3]?r:N[3])},a.$$arity=3),e.def(n,"$_reduce_2",p=function(W,le,X){var N;return i(this.modifier)||this.$raise(c(v,"ParseError")),N=e.to_ary(W),this.$parsed(null==N[0]?r:N[0],null==N[2]?r:N[2],null==N[1]?r:N[1],null==N[3]?r:N[3])},p.$$arity=3),e.def(n,"$_reduce_3",G=function(W,le,X){var N,fe;return fe=null==(N=e.to_ary(W))[2]?r:N[2],this.$parsed(null==N[0]?r:N[0],null==N[1]?r:N[1],D(D(c(v,"Arithmetic"),"Node"),"Number").$new(0),fe)},G.$$arity=3),e.def(n,"$_reduce_4",Z=function(W,le,X){var _e,N=this;return i(i(_e=N.prefix_number)?N.suffix_number:_e)||N.$raise(c(v,"ParseError")),d(["command","prefix","suffix"],{command:W["$[]"](1),prefix:W["$[]"](0),suffix:W["$[]"](2)})},Z.$$arity=3),e.def(n,"$_reduce_5",Q=function(W,le,X){var N=this;return i(N.prefix_number)||N.$raise(c(v,"ParseError")),i(N.need_suffix_number)&&N.$raise(c(v,"ParseError")),d(["command","prefix"],{command:W["$[]"](1),prefix:W["$[]"](0)})},Q.$$arity=3),e.def(n,"$_reduce_6",ae=function(W,le,X){var N=this;return i(N.suffix_number)||N.$raise(c(v,"ParseError")),i(N.need_prefix_number)&&N.$raise(c(v,"ParseError")),d(["command","suffix"],{command:W["$[]"](0),suffix:W["$[]"](1)})},ae.$$arity=3),e.def(n,"$_reduce_7",ue=function(W,le,X){var _e,N=this;return i(i(_e=N.need_prefix_number)?_e:N.need_suffix_number)&&N.$raise(c(v,"ParseError")),d(["command"],{command:W["$[]"](0)})},ue.$$arity=3),e.def(n,"$_reduce_8",ye=function(W,le,X){return d([],{})},ye.$$arity=3),e.def(n,"$_reduce_9",De=function(W,le,X){var N,fe,Ee,we,pe=r;return pe=null==(N=e.to_ary(W))[0]?r:N[0],fe=null==N[2]?r:N[2],i(i(we=this.critical)?pe["$[]"]("critical")["$nil?"]():we)||this.$raise(c(v,"ParseError")),t(pe,"[]=",e.to_a(Ee=["critical",fe])),Y(Ee.length,1),pe},De.$$arity=3),e.def(n,"$_reduce_10",Pe=function(W,le,X){var N,fe,Ee,we,pe=r;return pe=null==(N=e.to_ary(W))[0]?r:N[0],fe=null==N[2]?r:N[2],i(i(we=this.fumble)?pe["$[]"]("fumble")["$nil?"]():we)||this.$raise(c(v,"ParseError")),t(pe,"[]=",e.to_a(Ee=["fumble",fe])),Y(Ee.length,1),pe},Pe.$$arity=3),e.def(n,"$_reduce_11",Me=function(W,le,X){var N,fe,Ee,we,pe=r;return pe=null==(N=e.to_ary(W))[0]?r:N[0],fe=null==N[2]?r:N[2],i(i(we=this.dollar)?pe["$[]"]("dollar")["$nil?"]():we)||this.$raise(c(v,"ParseError")),t(pe,"[]=",e.to_a(Ee=["dollar",fe])),Y(Ee.length,1),pe},Me.$$arity=3),e.def(n,"$_reduce_12",Be=function(W,le,X){return W["$[]"](1)},Be.$$arity=3),e.def(n,"$_reduce_13",me=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"Negative").$new(W["$[]"](1))},me.$$arity=3),e.def(n,"$_reduce_14",re=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"BinaryOp").$new(W["$[]"](0),"+",W["$[]"](2))},re.$$arity=3),e.def(n,"$_reduce_15",ee=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"BinaryOp").$new(W["$[]"](0),"-",W["$[]"](2))},ee.$$arity=3),e.def(n,"$_reduce_16",u=function(W,le,X){return i(this.allowed_cmp_op["$include?"](r))||this.$raise(c(v,"ParseError")),d([],{})},u.$$arity=3),e.def(n,"$_reduce_17",q=function(W,le,X){var N,pe,he;return he=null==(N=e.to_ary(W))[1]?r:N[1],i(this.allowed_cmp_op["$include?"](pe=null==N[0]?r:N[0]))||this.$raise(c(v,"ParseError")),d(["cmp_op","target"],{cmp_op:pe,target:he})},q.$$arity=3),e.def(n,"$_reduce_18",C=function(W,le,X){var _e,N=this;return _e=W["$[]"](0),i(N.question_target)||N.$raise(c(v,"ParseError")),i(N.allowed_cmp_op["$include?"](_e))||N.$raise(c(v,"ParseError")),d(["cmp_op","target"],{cmp_op:_e,target:"?"})},C.$$arity=3),e.def(n,"$_reduce_19",L=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"BinaryOp").$new(W["$[]"](0),"+",W["$[]"](2))},L.$$arity=3),e.def(n,"$_reduce_20",O=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"BinaryOp").$new(W["$[]"](0),"-",W["$[]"](2))},O.$$arity=3),e.def(n,"$_reduce_22",te=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"BinaryOp").$new(W["$[]"](0),"*",W["$[]"](2))},te.$$arity=3),e.def(n,"$_reduce_23",$e=function(W,le,X){return W["$[]"](3).$new(W["$[]"](0),W["$[]"](2))},$e.$$arity=3),e.def(n,"$_reduce_25",be=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"DivideWithGameSystemDefault")},be.$$arity=3),e.def(n,"$_reduce_26",ne=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"DivideWithCeil")},ne.$$arity=3),e.def(n,"$_reduce_27",ie=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"DivideWithCeil")},ie.$$arity=3),e.def(n,"$_reduce_28",ve=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"DivideWithRound")},ve.$$arity=3),e.def(n,"$_reduce_29",ge=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"DivideWithFloor")},ge.$$arity=3),e.def(n,"$_reduce_30",de=function(W,le,X){return W["$[]"](1)},de.$$arity=3),e.def(n,"$_reduce_31",Te=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"Negative").$new(W["$[]"](1))},Te.$$arity=3),e.def(n,"$_reduce_33",se=function(W,le,X){return W["$[]"](1)},se.$$arity=3),e.def(n,"$_reduce_34",ke=function(W,le,X){return D(D(c(v,"Arithmetic"),"Node"),"Number").$new(W["$[]"](0))},ke.$$arity=3),void e.def(n,"$_reduce_none",Ce=function(W,le,X){return W["$[]"](0)},Ce.$$arity=3)},Opal.modules["bcdice/deprecated/checker"]=function(e){var B,A,j,H,I,z,b,n,v,U,x,m,M,J=[],w=e.nil,D=e.$$,c=e.module,F=e.send,$=e.truthy;return B=J,A=M=[c(J[0],"BCDice")].concat(B),j=m=[c(M[0],"Deprecated")].concat(A),U=c(m[0],"Checker"),x=[U].concat(j),U.$private(),e.def(U,"$check_result_legacy",H=function(y,S,h,P){var l,T,g=this,E=w,K=w,_=w,o=w,f=w;return E=F(S,"map",[],"sides".$to_proc()),l=(K=F(S,"map",[],"value".$to_proc())).$sum(),_=[100]["$==="](o=E)?g.$check_1D100(y,l,h,P):[20]["$==="](o)?g.$check_1D20(y,l,h,P):[6,6]["$==="](o)?g.$check_2D6(y,l,K,h,P):w,$($(T=_["$nil?"]())?T:_["$empty?"]())&&(o=E.$uniq(),_=[10]["$==="](o)?g.$check_nD10(y,l,K,h,P):[6]["$==="](o)?g.$check_nD6(y,l,K,h,P):w,$($(f=_["$nil?"]())?f:_["$empty?"]()))?w:D(x,"Result").$new(_.$delete_prefix(" \uff1e "))},H.$$arity=4),e.def(U,"$check_1D100",I=function(y,S,h,P){return w},I.$$arity=4),e.def(U,"$check_1D20",z=function(y,S,h,P){return w},z.$$arity=4),e.def(U,"$check_nD10",b=function(y,S,h,P,g){return w},b.$$arity=5),e.def(U,"$check_2D6",n=function(y,S,h,P,g){return w},n.$$arity=5),void e.def(U,"$check_nD6",v=function(y,S,h,P,g){return w},v.$$arity=5)},Opal.modules["bcdice/base"]=function(e){function Y(k,j){return"number"==typeof k&&"number"==typeof j?k+j:k["$+"](j)}function J(k,j){return"number"==typeof k&&"number"==typeof j?k-j:k["$-"](j)}var j,z,v,s,y,S,h,P,g,E,K,l,_,o,T,f,R,a,p,G,Z,Q,ae,ue,ye,De,Pe,Me,Be,me,re,ee,C,L,O,te,$e,q,b,n,x,c=e.top,F=[],$=e.nil,d=e.$$$,B=e.$$,t=e.module,M=e.klass,i=e.truthy,A=e.send,V=e.range,m=$;return c.$require("i18n"),c.$require("i18n/backend/fallbacks"),c.$require("bcdice/randomizer"),c.$require("bcdice/dice_table"),c.$require("bcdice/enum"),c.$require("bcdice/translate"),c.$require("bcdice/result"),c.$require("bcdice/command/parser"),c.$require("bcdice/deprecated/checker"),j=F,z=x=[t(F[0],"BCDice")].concat(j),b=M(x[0],null,"Base"),n=[b].concat(z),b.$$prototype.sort_add_dice=b.$$prototype.sort_barabara_dice=b.$$prototype.enabled_d9=b.$$prototype.raw_input=b.$$prototype.randomizer=b.$$prototype.enabled_upcase_input=b.$$prototype.debug=$,ee=e.get_singleton_class(b),q=[ee].concat(n),ee.$attr_reader("prefixes"),e.def(ee,"$register_prefix",C=function(ne){var ve,ge=this,de=$;return null==ge.prefixes&&(ge.prefixes=$),ve=e.slice.call(arguments,0,arguments.length),ge.prefixes=i(de=ge.prefixes)?de:[],ge.prefixes.$concat(ve.$flatten())},C.$$arity=-1),e.def(ee,"$register_prefix_from_super_class",L=function(){return this.$register_prefix(this.$superclass().$prefixes())},L.$$arity=0),e.def(ee,"$prefixes_pattern",O=function(){var ie,ne=this,ve=$;return null==ne.prefixes_pattern&&(ne.prefixes_pattern=$),null==ne.prefixes&&(ne.prefixes=$),ne.prefixes_pattern=i(ie=ne.prefixes_pattern)?ie:$,i(ne.prefixes_pattern)?ne.prefixes_pattern:(ne.prefixes=i(ve=ne.prefixes)?ve:[],ne.prefixes.$freeze(),ne.prefixes_pattern=(i(ne.prefixes["$empty?"]())?/(?!)/:e.regexp(["^(S)?(",ne.prefixes.$join("|"),")"],"i")).$freeze())},O.$$arity=0),e.def(ee,"$command_pattern",te=function(){var ne,ve,ie=this,ge=$,de=$;return null==ie.command_pattern&&(ie.command_pattern=$),null==ie.prefixes&&(ie.prefixes=$),ie.command_pattern=i(ve=ie.command_pattern)?ve:$,i(ie.command_pattern)?ie.command_pattern:(ie.prefixes=i(ge=ie.prefixes)?ge:[],ie.prefixes.$freeze(),de=Y(A(d(B(q,"CommonCommand"),"COMMANDS"),"map",[],((ne=function(se){return null==se&&(se=$),d(se,"PREFIX_PATTERN").$source()}).$$s=ie,ne.$$arity=1,ne)),ie.prefixes),ie.command_pattern=e.regexp(["^S?(",de.$join("|"),")"],"i").$freeze())},te.$$arity=0),e.def(ee,"$eval",$e=function(ne){return this.$new(ne).$eval()},$e.$$arity=1),b.$include(B(n,"Translate")),b.$include(d(B(n,"Deprecated"),"Checker")),e.def(b,"$initialize",v=function(u){var q=this;return q.raw_input=u,q.sort_add_dice=!1,q.sort_barabara_dice=!1,q.d66_sort_type=d(B(n,"D66SortType"),"NO_SORT"),q.enabled_d9=!1,q.round_type=d(B(n,"RoundType"),"FLOOR"),q.sides_implicit_d=6,q.upper_dice_reroll_threshold=$,q.reroll_dice_reroll_threshold=$,q.default_cmp_op=$,q.default_target_number=$,q.enabled_upcase_input=!0,q.locale="ja_jp",q.randomizer=d(B(n,"BCDice"),"Randomizer").$new(),q.debug=!1},v.$$arity=1),b.$attr_accessor("randomizer"),b.$attr_reader("d66_sort_type"),b.$attr_reader("round_type"),b.$attr_reader("sides_implicit_d"),b.$attr_reader("upper_dice_reroll_threshold"),b.$attr_reader("reroll_dice_reroll_threshold"),b.$attr_reader("default_cmp_op"),b.$attr_reader("default_target_number"),e.def(b,"$sort_add_dice?",s=function(){return this.sort_add_dice},s.$$arity=0),e.def(b,"$sort_barabara_dice?",y=function(){return this.sort_barabara_dice},y.$$arity=0),e.def(b,"$enabled_d9?",S=function(){return this.enabled_d9},S.$$arity=0),e.def(b,"$enable_debug",h=function(){return this.debug=!0},h.$$arity=0),e.def(b,"$eval",P=function(){var q,C,L,u=this,O=$;return q=d(B(n,"BCDice"),"Preprocessor").$process(u.raw_input,u),C=i(L=u.$dice_command(q))?L:u.$eval_common_command(u.raw_input),i(C)?(O=[u.randomizer.$rand_results()],A(C,"rands=",e.to_a(O)),J(O.length,1),O=[u.randomizer.$detailed_rand_results()],A(C,"detailed_rands=",e.to_a(O)),J(O.length,1),C):$},P.$$arity=0),e.def(b,"$change_text",g=function(u){return u},g.$$arity=1),e.def(b,"$check_result",E=function(u,q,C,L){var O=this,te=$,$e=$,be=$,ne=$,ie=$;return te=O.$check_result_legacy(u,q,C,L),i(te)?te:($e=A(q,"map",[],"sides".$to_proc()),ne=(be=A(q,"map",[],"value".$to_proc())).$sum(),(te=[100]["$==="](ie=$e)?O.$result_1d100(u,ne,C,L):[20]["$==="](ie)?O.$result_1d20(u,ne,C,L):[6,6]["$==="](ie)?O.$result_2d6(u,ne,be,C,L):$)["$=="](B(n,"Result").$nothing())?$:i(te)?te:(ie=$e.$uniq(),(te=[10]["$==="](ie)?O.$result_nd10(u,ne,be,C,L):[6]["$==="](ie)?O.$result_nd6(u,ne,be,C,L):$)["$=="](B(n,"Result").$nothing())?$:i(te)?te:O.$result_ndx(u,C,L)))},E.$$arity=4),e.def(b,"$grich_text",K=function(u,q,C){return $},K.$$arity=3),b.$private(),e.def(b,"$eval_common_command",l=function(u){try{var q;return u=this.$change_text(u),A(d(B(n,"CommonCommand"),"COMMANDS"),"each",[],((q=function(O){var $e,te=null==q.$$s?this:q.$$s;if(null==te.randomizer&&(te.randomizer=$),null==O&&(O=$),$e=O.$eval(u,te,te.randomizer),!i($e))return $;e.ret($e)}).$$s=this,q.$$arity=1,q)),$}catch(L){if(L===e.returner)return L.$v;throw L}},l.$$arity=1),e.def(b,"$dice_command",_=function(u){var q,C=this,L=$,O=$,te=$,$e=$,be=$,ne=$,ie=$;return i(C.enabled_upcase_input)&&(u=u.$upcase()),L=C.$class().$prefixes_pattern().$match(u),i(L)?(O=L["$[]"](1)["$nil?"]()["$!"](),i(O)&&(u=u["$[]"](V(1,-1,!1))),te=C.$eval_game_system_specific_command(u),i(te["$is_a?"](B(n,"Result")))?($e=[i(be=te["$secret?"]())?be:O],A(te,"secret=",e.to_a($e)),J($e.length,1),te):i(i(ne=i(ie=te["$nil?"]())?ie:te["$empty?"]())?ne:te["$=="]("1"))?$:A(B(n,"Result").$new(),"tap",[],((q=function(ge){return null==ge&&(ge=$),$e=[te.$to_s()],A(ge,"text=",e.to_a($e)),J($e.length,1),A(ge,"secret=",e.to_a($e=[O])),$e[J($e.length,1)]}).$$s=C,q.$$arity=1,q))):$},_.$$arity=1),e.def(b,"$eval_game_system_specific_command",o=function(u){return $},o.$$arity=1),e.def(b,"$result_ndx",T=function(u,q,C){return i(C["$is_a?"](B(n,"String")))?$:i(u.$send(q,C))?B(n,"Result").$success(this.$translate("success")):B(n,"Result").$failure(this.$translate("failure"))},T.$$arity=3),e.def(b,"$result_1d100",f=function(u,q,C,L){return $},f.$$arity=4),e.def(b,"$result_1d20",R=function(u,q,C,L){return $},R.$$arity=4),e.def(b,"$result_nd10",a=function(u,q,C,L,O){return $},a.$$arity=5),e.def(b,"$result_2d6",p=function(u,q,C,L,O){return $},p.$$arity=5),e.def(b,"$result_nd6",G=function(u,q,C,L,O){return $},G.$$arity=5),e.def(b,"$get_table_by_2d6",Z=function(u){return this.$get_table_by_nD6(u,2)},Z.$$arity=1),e.def(b,"$get_table_by_1d6",Q=function(u){return this.$get_table_by_nD6(u,1)},Q.$$arity=1),e.def(b,"$get_table_by_nD6",ae=function(u,q){return this.$get_table_by_nDx(u,q,6)},ae.$$arity=2),e.def(b,"$get_table_by_nDx",ue=function(u,q,C){var O,te=$;return O=this.randomizer.$roll_sum(q,C),te=this.$get_table_value(u["$[]"](J(O,q))),i(te["$nil?"]())?["1",0]:[te,O]},ue.$$arity=3),e.def(b,"$get_table_by_1d3",ye=function(u){var L,O,q=this,te=$;return q.$debug("get_table_by_1d3"),L=q.randomizer.$roll_sum(1,6),q.$debug("num",L),O=function(k,j){return"number"==typeof k?k/2:k["$/"](2)}(J(L,1)).$to_i(),q.$debug("index",O),te=u["$[]"](O),i(te["$nil?"]())?["1",0]:[te,L]},ye.$$arity=1),e.def(b,"$get_table_by_d66_swap",De=function(u){var C;return C=this.randomizer.$roll_d66(d(B(n,"D66SortType"),"ASC")),[this.$get_table_by_number(C,u),C]},De.$$arity=1),e.def(b,"$get_table_by_d66",Pe=function(u){var C,L,O,$e,te=$;return C=this.randomizer.$roll_once(6),L=this.randomizer.$roll_once(6),O=Y(function(k,j){return"number"==typeof k?6*k:k["$*"](6)}(J(C,1)),J(L,1)),te=u["$[]"](O),$e=""+C+L,i(te["$nil?"]())?["1",$e]:[te,$e]},Pe.$$arity=1),e.def(b,"$get_table_by_number",Me=function(u,q,C){try{var L;return null==C&&(C="1"),A(q,"each",[],((L=function($e){var ne,be=null==L.$$s?this:L.$$s;if(null==$e&&($e=$),ne=$e["$[]"](0),!i(function(k,j){return"number"==typeof k&&"number"==typeof j?k>=j:k["$>="](j)}(ne,u)))return $;e.ret(be.$get_table_value($e["$[]"](1)))}).$$s=this,L.$$arity=1,L)),this.$get_table_value(C)}catch(te){if(te===e.returner)return te.$v;throw te}},Me.$$arity=-3),e.def(b,"$get_table_value",Be=function(u){return i(u["$is_a?"](B(n,"Proc")))?u.$call():u},Be.$$arity=1),e.def(b,"$roll_tables",me=function(u,q){var L=$;return L=q["$[]"](u),i(L)?L.$roll(this.randomizer).$to_s():$},me.$$arity=2),e.def(b,"$debug",re=function(u,q){var L,O,te=this,$e=$,be=$;return L=e.slice.call(arguments,1,arguments.length),i(te.debug)?($e=i(u["$is_a?"](B(n,"String")))?u:u.$inspect(),i(L["$empty?"]())?te.$warn($e):(be=A(L,"map",[],((O=function(ie){return null==ie&&(ie=$),i(ie["$is_a?"](B(n,"String")))?'"'+ie+'"':ie.$inspect()}).$$s=te,O.$$arity=1,O)),te.$warn($e+": "+be.$join(", ")))):$},re.$$arity=-2),d(d(B(F,"I18n"),"Backend"),"Simple").$include(d(d(B(F,"I18n"),"Backend"),"Fallbacks")),B(F,"I18n").$load_path()["$<<"](B(F,"Dir")["$[]"](B(F,"File").$join(c.$__dir__(),"../../i18n/**/*.yml"))),m=["ja_jp"],A(B(F,"I18n"),"default_locale=",e.to_a(m)),J(m.length,1),m=[["ja_jp"]],A(B(F,"I18n").$fallbacks(),"defaults=",e.to_a(m)),m[J(m.length,1)]},Opal.modules["bcdice/game_system/MagicaLogia"]=function(e){function Y(m,k){return"number"==typeof m&&"number"==typeof k?m<=k:m["$<="](k)}function J(m,k){return"number"==typeof m&&"number"==typeof k?m>=k:m["$>="](k)}function w(m,k){return"number"==typeof m&&"number"==typeof k?m+k:m["$+"](k)}function r(m,k){return"number"==typeof m&&"number"==typeof k?m-k:m["$-"](k)}var k,H,b,n,v,S,h,P,g,l,T,f,R,a,p,_,o,s,y,z,U,c=[],F=e.nil,$=e.$$$,d=e.$$,B=e.module,t=e.klass,M=e.send2,i=e.truthy,A=e.send,V=e.hash2;return e.top.$require("bcdice/base"),k=c,H=U=[B(c[0],"BCDice")].concat(k),b=(z=[B(U[0],"GameSystem")].concat(H))[0],n=d(z,"Base"),v=z,s=t(b,n,"MagicaLogia"),y=[s].concat(v),s.$$prototype.randomizer=F,e.const_set(y[0],"ID","MagicaLogia"),e.const_set(y[0],"NAME","\u30de\u30ae\u30ab\u30ed\u30ae\u30a2"),e.const_set(y[0],"SORT_KEY","\u307e\u304d\u304b\u308d\u304d\u3042"),e.const_set(y[0],"HELP_MESSAGE","\u30fb\u5224\u5b9a\n\u30b9\u30da\u30b7\u30e3\u30eb\uff0f\u30d5\u30a1\u30f3\u30d6\u30eb\uff0f\u6210\u529f\uff0f\u5931\u6557\u3092\u5224\u5b9a\n\u30fb\u5404\u7a2e\u8868\n\u7d4c\u6b74\u8868\u3000BGT/\u521d\u671f\u30a2\u30f3\u30ab\u30fc\u8868\u3000DAT/\u904b\u547d\u5c5e\u6027\u8868\u3000FAT\n\u9858\u3044\u8868\u3000WIT/\u30d7\u30e9\u30a4\u30ba\u8868\u3000PT\n\u6642\u306e\u6d41\u308c\u8868\u3000TPT/\u5927\u5224\u6642\u306e\u6d41\u308c\u8868\u3000TPTB\n\u4e8b\u4ef6\u8868\u3000AT\n\u30d5\u30a1\u30f3\u30d6\u30eb\u8868\u3000FT\uff0f\u5909\u8abf\u8868\u3000WT\n\u904b\u547d\u5909\u8ee2\u8868\u3000FCT\n\u3000\u5178\u578b\u7684\u707d\u5384 TCT\uff0f\u7269\u7406\u7684\u707d\u5384 PCT\uff0f\u7cbe\u795e\u7684\u707d\u5384 MCT\uff0f\u72c2\u6c17\u7684\u707d\u5384 ICT\n\u3000\u793e\u4f1a\u7684\u707d\u5384 SCT\uff0f\u8d85\u5e38\u7684\u707d\u5384 XCT\uff0f\u4e0d\u601d\u8b70\u7cfb\u707d\u5384 WCT\uff0f\u30b3\u30df\u30ab\u30eb\u7cfb\u707d\u5384 CCT\n\u3000\u9b54\u6cd5\u4f7f\u3044\u306e\u707d\u5384 MGCT\n\u30b7\u30fc\u30f3\u8868\u3000ST\uff0f\u5927\u5224\u30b7\u30fc\u30f3\u8868\u3000STB\n\u3000\u6975\u9650\u74b0\u5883 XEST\uff0f\u5185\u9762\u4e16\u754c IWST\uff0f\u9b54\u6cd5\u90fd\u5e02 MCST\n\u3000\u6b7b\u5f8c\u4e16\u754c WDST\uff0f\u8ff7\u5bae\u4e16\u754c LWST\n\u3000\u9b54\u6cd5\u66f8\u67b6 MBST\uff0f\u9b54\u6cd5\u5b66\u9662 MAST\uff0f\u30af\u30ec\u30c9\u306e\u5854 TCST\n\u3000\u4e26\u884c\u4e16\u754c PWST\uff0f\u7d42\u672b\u3000\u3000 PAST\uff0f\u7570\u4e16\u754c\u9152\u5834 GBST\n\u3000\u307b\u3057\u304b\u3052 SLST\uff0f\u65e7\u56f3\u66f8\u9928 OLST\n\u4e16\u754c\u6cd5\u5247\u8ffd\u52a0\u8868 WLAT/\u3055\u307e\u3088\u3046\u602a\u7269\u8868 WMT\n\u30e9\u30f3\u30c0\u30e0\u5206\u91ce\u8868\u3000RCT\n\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868\u3000RTT\n\u3000\u661f\u5206\u91ce\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868 RTS, RTT1\n\u3000\u7363\u5206\u91ce\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868 RTB, RTT2\n\u3000\u529b\u5206\u91ce\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868 RTF, RTT3\n\u3000\u6b4c\u5206\u91ce\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868 RTP, RTT4\n\u3000\u5922\u5206\u91ce\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868 RTD, RTT5\n\u3000\u95c7\u5206\u91ce\u30e9\u30f3\u30c0\u30e0\u7279\u6280\u8868 RTN, RTT6\n\u30d6\u30e9\u30f3\u30af\u79d8\u5bc6\u8868\u3000BST/\n\u3000\u5bbf\u6575\u8868\u3000MIT/\u8b00\u7565\u8868\u3000MOT/\u56e0\u7e01\u8868\u3000MAT\n\u3000\u5947\u4eba\u8868\u3000MUT/\u529b\u5834\u8868\u3000MFT/\u540c\u76df\u8868\u3000MLT\n\u843d\u82b1\u8868\u3000FFT\n\u305d\u306e\u5f8c\u8868 FLT\n\u30fbD66\u30c0\u30a4\u30b9\u3042\u308a\n"),e.def(s,"$initialize",S=function(K){var o=this;return S.$$p&&(S.$$p=null),M(o,e.find_super_dispatcher(o,"initialize",S,!1,!0),"initialize",[K],null),o.sort_add_dice=!0,o.sort_barabara_dice=!0,o.d66_sort_type=$(d(y,"D66SortType"),"ASC")},S.$$arity=1),e.def(s,"$result_2d6",h=function(K,l,_,o,T){var f=this,R=F,a=F;return T["$=="]("?")||!o["$=="](">=")?F:(a=[w((R=i(Y(l,2))?d(y,"Result").$fumble(f.$translate("fumble")):i(J(l,12))?d(y,"Result").$critical(f.$translate("MagicaLogia.special")):i(J(K,T))?d(y,"Result").$success(f.$translate("success")):d(y,"Result").$failure(f.$translate("failure"))).$text(),f.$gain_magic_element(_["$[]"](0),_["$[]"](1)))],A(R,"text=",e.to_a(a)),r(a.length,1),R)},h.$$arity=5),e.def(s,"$eval_game_system_specific_command",P=function(K){var _,l=this;return i(_=$(l.$class(),"SKILL_TABLE").$roll_command(l.randomizer,K))?_:l.$roll_tables(K,$(l.$class(),"TABLES"))},P.$$arity=1),s.$private(),e.def(s,"$gain_magic_element",g=function(K,l){var _=this,o=F;return K["$=="](l)?(o=_.$translate("MagicaLogia.elements.items")["$[]"](r(K,1)),w(" \uff1e ",_.$format(_.$translate("MagicaLogia.elements.format"),V(["text"],{text:o})))):""},g.$$arity=2),l=y,_=t(y[0],null,"SkillExpandTable"),o=[_].concat(l),_.$$prototype.times=_.$$prototype.sides=_.$$prototype.items=_.$$prototype.name=_.$$prototype.skill_table=F,e.defs(_,"$from_i18n",T=function(Z,Q,ae){var ye=F;return ye=d(o,"I18n").$t(Z,V(["locale","raise"],{locale:Q,raise:!1})),this.$new(ye["$[]"]("name"),ye["$[]"]("type"),ye["$[]"]("items"),ae)},T.$$arity=3),e.def(_,"$initialize",f=function(Z,Q,ae,ue){var ye=this,De=F;return ye.name=Z,ye.items=ae.$freeze(),ye.skill_table=ue,De=/(\d+)D(\d+)/i.$match(Q),i(De)||ye.$raise(d(o,"ArgumentError"),"Unexpected table type: "+Q),ye.times=De["$[]"](1).$to_i(),ye.sides=De["$[]"](2).$to_i()},f.$$arity=4),e.def(_,"$roll",R=function(Z){var ae,ue,Q=this;return ae=Z.$roll_sum(Q.times,Q.sides),ue=Q.$expand(Q.items["$[]"](r(ae,Q.times)),Z),$(d(o,"DiceTable"),"RollResult").$new(Q.name,ae,ue)},R.$$arity=1),_.$private(),e.def(_,"$expand",a=function(Z,Q){var ae;return A(Z,"gsub",[/%{([a-z]+)}/],((ae=function(){var Me,De=null==ae.$$s?this:ae.$$s;return Me=d(o,"Regexp").$last_match()["$[]"](1).$to_sym(),De.$roll_skill(Me,Q)}).$$s=this,ae.$$arity=0,ae))},a.$$arity=2),e.const_set(o[0],"CATEGORIES",["star","beast","force","poem","dream","night"].$freeze()),e.def(_,"$roll_skill",p=function(Z,Q){var ue=F;return Z["$=="]("skill")?this.skill_table.$roll_skill(Q):Z["$=="]("element")?this.skill_table.$roll_category(Q):(ue=d(o,"CATEGORIES").$index(Z),i(ue)||this.$raise(d(o,"ArgumentError")),this.skill_table.$categories()["$[]"](ue).$roll(Q).$name())},p.$$arity=2),function(E,K,l){var T,f,R,_=t(E,null,"FallenAfterTable"),o=[_].concat(l);_.$$prototype.lower=_.$$prototype.higher=_.$$prototype.name=F,e.defs(_,"$from_i18n",T=function(p,G){var Q=F;return Q=d(o,"I18n").$t(p,V(["locale","raise"],{locale:G,raise:!0})),this.$new(Q["$[]"]("name"),Q["$[]"]("items_lower"),Q["$[]"]("items_higher"))},T.$$arity=2),e.def(_,"$initialize",f=function(p,G,Z){var Q=this;return Q.name=p,Q.lower=G,Q.higher=Z},f.$$arity=3),e.def(_,"$roll",R=function(p){var G,Z,ae,ue,Q=this,ye=F;return Z=p.$roll_barabara(2,6),ue=null==(G=e.to_ary(Z))[1]?F:G[1],ye=i(Y(ae=null==G[0]?F:G[0],3))?Q.lower:Q.higher,Q.name+"("+ae+","+ue+") \uff1e "+ye["$[]"](r(ue,1))},R.$$arity=1)}(y[0],0,y),function(E,K){var _,o,l=[E].concat(K);E.$private(),e.def(E,"$translate_skill_table",_=function(f){return $(d(l,"DiceTable"),"SaiFicSkillTable").$from_i18n("MagicaLogia.skill_table",f,V(["rttn"],{rttn:["RTS","RTB","RTF","RTP","RTD","RTN"]}))},_.$$arity=1),e.def(E,"$translate_tables",o=function(f,R){var p,G,Z,Q,ae,ue;return p=d(l,"SkillExpandTable").$from_i18n("MagicaLogia.inveterate_enemy_table",f,R),G=$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.conspiracy_table",f),Z=$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.fate_table",f),Q=$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.cueball_table",f),ae=$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.force_field_table",f),ue=d(l,"SkillExpandTable").$from_i18n("MagicaLogia.alliance_table",f,R),V(["TPT","ST","FT","WT","FCT","AT","BGT","DAT","FAT","WIT","TCT","PCT","MCT","ICT","SCT","XCT","WCT","CCT","MIT","MOT","MAT","MUT","MFT","MLT","BST","PT","XEST","IWST","MCST","WDST","LWST","STB","MGCT","MBST","MAST","TCST","PWST","PAST","GBST","SLST","WLAT","WMT","FFT","OLST","TPTB","FLT"],{TPT:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.TPT",f,R),ST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.ST",f,R),FT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.FT",f),WT:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.WT",f,R),FCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.FCT",f),AT:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.AT",f,R),BGT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.BGT",f),DAT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.DAT",f),FAT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.FAT",f),WIT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.WIT",f),TCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.TCT",f),PCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.PCT",f),MCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.MCT",f),ICT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.ICT",f),SCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.SCT",f),XCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.XCT",f),WCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.WCT",f),CCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.CCT",f),MIT:p,MOT:G,MAT:Z,MUT:Q,MFT:ae,MLT:ue,BST:$(d(l,"DiceTable"),"ChainTable").$new(d(l,"I18n").$translate("MagicaLogia.tables.BST.name",V(["raise","locale"],{raise:!0,locale:f})),"1D6",[p,G,Z,Q,ae,ue]),PT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.PT",f),XEST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.XEST",f,R),IWST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.IWST",f,R),MCST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.MCST",f,R),WDST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.WDST",f,R),LWST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.LWST",f,R),STB:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.STB",f,R),MGCT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.MGCT",f),MBST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.MBST",f,R),MAST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.MAST",f,R),TCST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.TCST",f,R),PWST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.PWST",f,R),PAST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.PAST",f,R),GBST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.GBST",f,R),SLST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.SLST",f,R),WLAT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.WLAT",f),WMT:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.WMT",f,R),FFT:$(d(l,"DiceTable"),"Table").$from_i18n("MagicaLogia.tables.FFT",f),OLST:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.OLST",f,R),TPTB:d(l,"SkillExpandTable").$from_i18n("MagicaLogia.tables.TPTB",f,R),FLT:d(l,"FallenAfterTable").$from_i18n("MagicaLogia.tables.FLT",f)})},o.$$arity=2)}(e.get_singleton_class(s),y),e.const_set(y[0],"SKILL_TABLE",s.$translate_skill_table("ja_jp")),e.const_set(y[0],"TABLES",s.$translate_tables("ja_jp",d(y,"SKILL_TABLE"))),s.$register_prefix(d(y,"SKILL_TABLE").$prefixes()),void s.$register_prefix(d(y,"TABLES").$keys())},J=[],D=(e=Opal).$$,c=e.module,F=e.klass,$=e.send2,e.top.$require("bcdice/game_system/MagicaLogia"),B=J,A=M=[c(J[0],"BCDice")].concat(B),U=m=[c(M[0],"GameSystem")].concat(A),H=[x=F(m[0],D(m,"MagicaLogia"),"MagicaLogia_Korean")].concat(U),e.const_set(H[0],"ID","MagicaLogia:Korean"),e.const_set(H[0],"NAME","\ub9c8\uae30\uce74\ub85c\uae30\uc544"),e.const_set(H[0],"SORT_KEY","\u56fd\u969b\u5316:Korean:\ub9c8\uae30\uce74\ub85c\uae30\uc544"),e.const_set(H[0],"HELP_MESSAGE","\u30fb\ud310\uc815\n\uc2a4\ud398\uc15c\uff0f\ud38c\ube14\uff0f\uc131\uacf5\uff0f\uc2e4\ud328\n\u30fb\uac01\uc885 \ud45c\n\uacbd\ub825 \ud45c BGT/ \ucd08\uae30 \uc575\ucee4 \ud45c DAT/ \uc6b4\uba85 \uc18d\uc131 \ud45c FAT\n\uc18c\uc6d0 \ud45c WIT/ \ud504\ub77c\uc774\uc988 \ud45c PT\n\uc2dc\uac04\uc758 \ud750\ub984 \ud45c(\uad6c\ud310) TPT/ \ub300\ud615\ud310 \uc2dc\uac04\uc758 \ud750\ub984 \ud45c TPTB\n\uc0ac\uac74 \ud45c AT\n\ud38c\ube14 \ud45c FT/ \uc0c1\ud0dc\uc774\uc0c1 \ud45c WT\n\uc6b4\uba85 \ubcc0\uc804 \ud45c FCT\n\u3000\uc804\ud615\uc801 \uc7ac\uc561 TCT\uff0f\ubb3c\ub9ac\uacc4 \uc7ac\uc561 PCT\uff0f\uc815\uc2e0\uacc4 \uc7ac\uc561 MCT\uff0f\uad11\uae30\uacc4 \uc7ac\uc561 ICT\n\u3000\uc0ac\ud68c\uacc4 \uc7ac\uc561 SCT\uff0f\ucd08\uc790\uc5f0\uacc4 \uc7ac\uc561 XCT\uff0f\ubd88\uac00\uc0ac\uc758\uacc4 \uc7ac\uc561 WCT\uff0f\ucf54\ubbf9\uacc4 \uc7ac\uc561 CCT\n\u3000\ub9c8\ubc95\uc0ac \uc7ac\uc561 MGCT\n\uc7a5\uba74\ud45c ST\uff0f\ub300\ud615\ud310 \uc7a5\uba74\ud45c STB\n\u3000\uadf9\ud55c \ud658\uacbd XEST\uff0f\ub0b4\uba74 \uc138\uacc4 IWST\uff0f\ub9c8\ubc95 \ub3c4\uc2dc MCST\n\u3000\uc0ac\ud6c4 \uc138\uacc4 WDST\uff0f\ubbf8\uad81 \uc138\uacc4 LWST\n\u3000\ub9c8\ubc95 \uc11c\uac00 MBST\uff0f\ub9c8\ubc95 \ud559\uc6d0 MAST\uff0f\ud06c\ub808\ub3c4\uc758 \ud0d1 TCST\n\u3000\ubcd1\ud589 \uc138\uacc4 PWST\uff0f\uc885\ub9d0 PAST\uff0f\uc774\uc138\uacc4 \uc220\uc9d1 GBST\n\u3000\ubcc4\ube5b SLST\uff0f\uad6c \ub3c4\uc11c\uad00 OLST\n\uc138\uacc4 \ubc95\uce59 \ucd94\uac00 \ud45c WLAT\uff0f\ub5a0\ub3cc\uc774 \uad34\ubb3c \ud45c WMT\n\ub79c\ub364 \ubd84\uc57c \ud45c RCT\n\ub79c\ub364 \ud2b9\uae30 \ud45c RTT\n\u3000\ubcc4 \ubd84\uc57c \ub79c\ub364 \ud2b9\uae30 \ud45c RTS, RTT1\n\u3000\uc9d0\uc2b9 \ubd84\uc57c \ub79c\ub364 \ud2b9\uae30 \ud45c RTB, RTT2\n\u3000\ud798 \ubd84\uc57c \ub79c\ub364 \ud2b9\uae30 \ud45c RTF, RTT3\n\u3000\ub178\ub798 \ubd84\uc57c \ub79c\ub364 \ud2b9\uae30 \ud45c RTP, RTT4\n\u3000\uafc8 \ubd84\uc57c \ub79c\ub364 \ud2b9\uae30 \ud45c RTD, RTT5\n\u3000\uc5b4\ub460 \ubd84\uc57c \ub79c\ub364 \ud2b9\uae30 \ud45c RTN, RTT6\n\ubc31\uc9c0 \ube44\ubc00 \ud45c\u3000BST/\n\u3000\uc219\uc801\ud45c\u3000MIT/\ubaa8\ub7b5 \ud45c\u3000MOT/\uc778\uc5f0 \ud45c\u3000MAT\n\u3000\uae30\uc778\ud45c\u3000MUT/\uc5ed\uc7a5 \ud45c\u3000MFT/\ub3d9\ub9f9 \ud45c\u3000MLT\n\ub099\ud654 \ud45c\u3000FFT\n\uadf8 \ud6c4\uc758 \uc804\uac1c \ud45c FLT\n\u30fbD66 \ub2e4\uc774\uc2a4 \uc788\uc74c.\n"),x.$register_prefix_from_super_class(),e.def(x,"$initialize",I=function(b){var s=this;return I.$$p&&(I.$$p=null),$(s,e.find_super_dispatcher(s,"initialize",I,!1,!0),"initialize",[b],null),s.locale="ko_kr"},I.$$arity=1),e.const_set(H[0],"SKILL_TABLE",x.$translate_skill_table("ko_kr")),e.const_set(H[0],"TABLES",x.$translate_tables("ko_kr",D(H,"SKILL_TABLE")))}}]);